Use the shared createCard in share.spec.js, so a description never lands in the title #250

Merged
Grandiras merged 1 commit from test/share-shared-createcard into main 2026-10-03 14:45:20 +00:00
Owner

Follow-up to #249. share.spec.js had its own createCard, which filled the title and then the description as soon as .modal appeared. The card dialog focuses its title a round trip and a half after it shows (CardModal.OnAfterRenderAsync). A description typed before that focus lands can end up in the title. The private copy also clicked Add card once, so a click before the circuit was up opened nothing.

Change

  • helpers/boards.js: the shared createCard returns the new card's data-card-id. No existing caller reads a return value, so they are unaffected.
  • share.spec.js: the private copy is gone, and the spec uses the shared one. The shared helper retries Add card until the dialog opens, and (since #249) waits for the title's focus. Two descriptions that nothing asserted are dropped: 'The card being pointed at.', and the holder's 'placeholder', which the test overwrites. The cross-board holder keeps its link, passed as { description }.

Verification

Run on an isolated, port-shifted copy of the test stack (ponentesharecard, :38090–:38092), built from #249's head. That tree is identical to this PR's base.

  • share.spec.js --repeat-each=10: 70 passed.
  • Every other spec that uses createCard (boards, home, search, filter, board, permissions, mobile), once: 61 passed.
  • tools/verify.sh: build clean, 584 / 584 unit tests.

No member-visible change, so no changelog line.

🤖 Generated with Claude Code

Follow-up to #249. `share.spec.js` had its own `createCard`, which filled the title and then the description as soon as `.modal` appeared. The card dialog focuses its title a round trip and a half after it shows (`CardModal.OnAfterRenderAsync`). A description typed before that focus lands can end up in the title. The private copy also clicked Add card once, so a click before the circuit was up opened nothing. ## Change - **`helpers/boards.js`**: the shared `createCard` returns the new card's `data-card-id`. No existing caller reads a return value, so they are unaffected. - **`share.spec.js`**: the private copy is gone, and the spec uses the shared one. The shared helper retries Add card until the dialog opens, and (since #249) waits for the title's focus. Two descriptions that nothing asserted are dropped: `'The card being pointed at.'`, and the holder's `'placeholder'`, which the test overwrites. The cross-board holder keeps its link, passed as `{ description }`. ## Verification Run on an isolated, port-shifted copy of the test stack (`ponentesharecard`, `:38090`–`:38092`), built from #249's head. That tree is identical to this PR's base. - `share.spec.js --repeat-each=10`: **70 passed**. - Every other spec that uses `createCard` (`boards`, `home`, `search`, `filter`, `board`, `permissions`, `mobile`), once: **61 passed**. - `tools/verify.sh`: build clean, **584 / 584** unit tests. No member-visible change, so no changelog line. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Make share.spec.js use the shared createCard, which now returns the card's id
All checks were successful
CI / build (pull_request) Successful in 42s
3fb698ffab
The private copy typed the description before the dialog's title took focus,
so it could land in the title, and clicked Add card once without waiting for
the circuit. The shared helper waits for both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator

🤖 Reviewing this PR — the review will link the full session transcript.

📜 Live transcript — updating every ~5 minutes while the review runs.

🤖 Reviewing this PR — the review will link the full session transcript. <!-- opencode-run:review --> 📜 [Live transcript](https://git.grandiras.net/Grandiras/opencode-bot/src/branch/opencode-logs/transcripts/Grandiras/Ponente/pr-250/run-2026-10-03T14-44-09-361Z.md) — updating every ~5 minutes while the review runs.
Collaborator

🤖 Reviewing this PR — follow along in the action run; the reply will link the full session transcript.

📜 Live transcript — updating every ~5 minutes while the task runs.

🤖 Reviewing this PR — follow along in [the action run](https://git.grandiras.net/Grandiras/claude-bot/actions/runs/691); the reply will link the full session transcript. <!-- claude-run:pr_review --> 📜 [Live transcript](https://git.grandiras.net/Grandiras/claude-bot/src/branch/claude-logs/transcripts/Grandiras/Ponente/pr-250/run-691.md) — updating every ~5 minutes while the task runs.
claude-reviewer left a comment

✅ Verdict: approve — no blocking issues found.

This removes the private createCard from share.spec.js and uses the shared helper. The shared helper retries Add card and waits for the title's focus, which fixes both races described in the PR.

  • Helper return value: createCard in helpers/boards.js now returns data-card-id, taken after the card title is visible. Existing callers ignore the return value, so they are unaffected.
  • Call sites: the { description } option matches the shared signature. The two dropped descriptions were never asserted on.
  • Selectors: the shared helper uses .composer-title and .composer-body, which replace the old .modal-body selectors. Those were dropped with the private copy.

I did not run the specs. I only read the helper and the diff.

One minor point: .card with hasText: title matches by substring. The Holder ${Date.now()} and Linked card ${Date.now()} titles are distinct, so there is no collision here.


🧠 claude-sonnet-5-5 · ⏱ 0m 7s · 3 turns · tokens: 11.8k in / 590 out (+34.9k cache-read)
📜 Full session transcript

✅ **Verdict: approve** — no blocking issues found. This removes the private `createCard` from `share.spec.js` and uses the shared helper. The shared helper retries Add card and waits for the title's focus, which fixes both races described in the PR. - **Helper return value:** `createCard` in `helpers/boards.js` now returns `data-card-id`, taken after the card title is visible. Existing callers ignore the return value, so they are unaffected. - **Call sites:** the `{ description }` option matches the shared signature. The two dropped descriptions were never asserted on. - **Selectors:** the shared helper uses `.composer-title` and `.composer-body`, which replace the old `.modal-body` selectors. Those were dropped with the private copy. I did not run the specs. I only read the helper and the diff. One minor point: `.card` with `hasText: title` matches by substring. The `Holder ${Date.now()}` and `Linked card ${Date.now()}` titles are distinct, so there is no collision here. --- 🧠 claude-sonnet-5-5 · ⏱ 0m 7s · 3 turns · tokens: 11.8k in / 590 out (+34.9k cache-read) 📜 [Full session transcript](https://git.grandiras.net/Grandiras/claude-bot/src/branch/claude-logs/transcripts/Grandiras/Ponente/pr-250/run-691.md) <!-- claude-verdict:approve --> <!-- claude-reviewed-head:3fb698ffabd52f0801f9a12205060dd2b8dd78db -->
opencode-reviewer left a comment

✅ Verdict: approve — no blocking issues found.

Clean follow-up to #249. The shared createCard now returns the card's data-card-id, which is exactly what the three share.spec.js call sites feed into .card[data-card-id="…"] selectors, and it inherits #249's waits — openComposer retries the Add card click until the dialog opens and then waits for .composer-title to be focused, which closes the title-vs-description race the private copy had. I checked every other createCard caller across search, home, filter, boards, permissions, board and mobile: all pass either no third argument or an options object, so none depended on the removed positional description = 'Fixture card.' default, and none read a return value that could diverge. Dropping the two unasserted descriptions is safe — the "a link on its own line" test overwrites the holder's description with its own fill before asserting anything, and the cross-board holder keeps its link via { description: … }. The app-side docs (docs/ui.md) already document the CardModal focus gap that #249 addresses, so this test-side dedup matches the documented reality.


⏱ 0m 30s · 6 steps · $0.0048 · tokens: 18.3k in / 726 out (+48.8k cache-read) · Go: 5h 0% · wk 10% · mo 88%
📜 Full session transcript

✅ **Verdict: approve** — no blocking issues found. Clean follow-up to #249. The shared `createCard` now returns the card's `data-card-id`, which is exactly what the three share.spec.js call sites feed into `.card[data-card-id="…"]` selectors, and it inherits #249's waits — `openComposer` retries the Add card click until the dialog opens and then waits for `.composer-title` to be focused, which closes the title-vs-description race the private copy had. I checked every other `createCard` caller across `search`, `home`, `filter`, `boards`, `permissions`, `board` and `mobile`: all pass either no third argument or an options object, so none depended on the removed positional `description = 'Fixture card.'` default, and none read a return value that could diverge. Dropping the two unasserted descriptions is safe — the "a link on its own line" test overwrites the holder's description with its own `fill` before asserting anything, and the cross-board holder keeps its link via `{ description: … }`. The app-side docs (`docs/ui.md`) already document the `CardModal` focus gap that #249 addresses, so this test-side dedup matches the documented reality. --- ⏱ 0m 30s · 6 steps · $0.0048 · tokens: 18.3k in / 726 out (+48.8k cache-read) · Go: 5h 0% · wk 10% · mo 88% 📜 [Full session transcript](https://git.grandiras.net/Grandiras/opencode-bot/src/branch/opencode-logs/transcripts/Grandiras/Ponente/pr-250/run-2026-10-03T14-44-09-361Z.md) <!-- opencode-reviewed-head:3fb698ffabd52f0801f9a12205060dd2b8dd78db --> <!-- opencode-verdict:approve -->
Grandiras deleted branch test/share-shared-createcard 2026-10-03 14:45:21 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Grandiras/Ponente!250
No description provided.