Repository navigation
Add a Plays navigation section: list plays with their state and open them - #3552
Conversation
Pragmatic Code Review: PR #3552 (issue #3270, Plays navigation section)Review Type: Initial Review Summary: The change is a clear net improvement and matches ADR-090 and ADR-049. The list store holds ids and derives each row from Verified by reading the code and by running the six affected test files (208 tests pass). I did not run Requirements Check
Code Review Findings1. 🟡 Important: the "archived ones left out" test asserts nothing about archived plays The fixture holds no archived play, so Recommendation: make the mock hold an archived play it returns only when 2. 🟡 Important: the Both tests assert on The same applies, harmlessly, to the "switched off" and "suspended" tests: the fetched node's Recommendation: in the two delete tests also wait for 3. 🟢 Suggestion: browser mode misses a play restored after its node was evicted, and the comment says otherwise
4. 🟢 Suggestion: a list load can raise a conflict notice for the user's own switch (narrow race, not reproduced)
Recommendation: skip nodes with a pending local write in the hydrate loop (the write's own response brings the new version), or note the case in the comment if you judge it too rare to handle. 5. 🟢 Suggestion: overlapping loads can apply out of order The generation counter guards database switches only. Two loads in flight in the same database (mount plus reconnect, or debounce plus reconnect) can resolve in reverse order, and the older result then sets 6. 🟢 Suggestion: one place for the Both do Nits
What is done well
RecommendationAPPROVE, with findings 1 and 2 worth fixing in this PR since they are small and the acceptance criteria name those tests. Findings 3 to 6 and the nits are optional. |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Review addressedAddressed (6 findings, 1 nit)
Skipped (3 nits)
Checks: Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: The review approved with no critical findings. The changes are two test tightenings, two small guards in |
…them (closes #3270) - New plays list store, loaded on mount, reloaded on database switch and daemon reconnect - Rows show on / off / suspended (suspension message as tooltip) and open the play; no switch, no writes - Gated behind the Labs Playbooks flag; expanded state persisted - Live refresh from node events in the Tauri and browser sync listeners - Remove the Settings > Playbooks section and its category entry Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…, skip plays with a write in flight - The archived-play test now holds an archived play the backend returns only to an opt-in query - The delete tests wait for the id to leave the list, which only the refresh does - A load applies only while it is the latest, and leaves a play with a pending local write alone - asPlayNode guard shared by the viewer and the list store - Comments corrected for browser-mode restore and the database-switch eviction Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
c86b765 to
fe2b098
Compare
Closes #3270
What
A new Plays section in the left navigation, after AI Chats, shown only while the Labs "Playbooks" flag is on (ADR-090). It lists every participating play, core and user-written, by title. Each row shows the play's state (On, Off or Suspended; a suspended row carries its message as a tooltip) and opens the play in
PlayNodeViewer. Rows have no switch and write nothing.How
stores/plays.svelte.ts: holds which plays are listed. Each row is read fromSharedNodeStore, the node the play's viewer shows and writes, so a switch flipped in the viewer shows on the row at once. The listed plays are pinned in the node store while listed. A load only replaces a stored play with a newer version, so it can't put back what a switch just changed.schedulePlayRefresh(debounced) is called fromtauri-sync-listener.tsandbrowser-sync-service.tswhen a play is created, updated or deleted. The reload is what adds an installed play and drops an archived one (the default query applies the participation rule; nothing here readslifecycle_status).playsExpandedis persisted with the other section states.settings-categories.tsentry.methodology-servicestays, since onboarding still uses it until Make spec, plan and decision core types with checklist criteria and seeded rules; remove the installable methodologies #3542 removes it.playbooksEnableddoc comment now describe what the flag gates.playTitleis shared by the viewer and the nav row.Testing
bun run test:changedpasses (frontend Happy-DOM and Chromium tiers).node:created/node:updated/node:deletedin both sync listeners for install, switch off and on, suspension, archive and removal.🤖 Generated with Claude Code