Use the shared createCard in share.spec.js, so a description never lands in the title #250
No reviewers
Labels
No labels
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/Ponente!250
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "test/share-shared-createcard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #249.
share.spec.jshad its owncreateCard, which filled the title and then the description as soon as.modalappeared. 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 sharedcreateCardreturns the new card'sdata-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.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
🤖 Reviewing this PR — the review will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the review runs.
🤖 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.
✅ Verdict: approve — no blocking issues found.
This removes the private
createCardfromshare.spec.jsand 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.createCardinhelpers/boards.jsnow returnsdata-card-id, taken after the card title is visible. Existing callers ignore the return value, so they are unaffected.{ description }option matches the shared signature. The two dropped descriptions were never asserted on..composer-titleand.composer-body, which replace the old.modal-bodyselectors. Those were dropped with the private copy.I did not run the specs. I only read the helper and the diff.
One minor point:
.cardwithhasText: titlematches by substring. TheHolder ${Date.now()}andLinked 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.
Clean follow-up to #249. The shared
createCardnow returns the card'sdata-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 —openComposerretries the Add card click until the dialog opens and then waits for.composer-titleto be focused, which closes the title-vs-description race the private copy had. I checked every othercreateCardcaller acrosssearch,home,filter,boards,permissions,boardandmobile: all pass either no third argument or an options object, so none depended on the removed positionaldescription = '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 ownfillbefore asserting anything, and the cross-board holder keeps its link via{ description: … }. The app-side docs (docs/ui.md) already document theCardModalfocus 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