githubnext/chopinPublic

Let's compose rich plans together

Hide the Decisions count on archived documents #383

ClosedMaggieAppletonclosed 1 commit intomainfromrefs/pull/383/head
  1. MA

    ## Why An archived document still showed "Decisions 2" with an "unanswered" accessible name, though nothing can be answered (cards are read-only, Save is gone). The count reads as work to do.

    ## What changed - New `decisionBadgeCount(unanswered, archived)` returns 0 for archived documents. - `room-workspace.tsx` passes that count to the desktop `DecisionViewControl` and the phone tab bar. The Decisions tab stays and is still browsable. Real unanswered counts still drive view selection and attention logic. - Phone header Restore/pill merge intentionally left to #363.

    ## Screenshots Before (desktop tab, phone): ![before tab](https://github.com/user-attachments/assets/d34a00e5-9caa-4668-9778-9db7084ff2eb) ![before phone](https://github.com/user-attachments/assets/e5c68fb0-3a54-44c0-996f-086160af1d1d)

    After: ![after tab](https://github.com/user-attachments/assets/2eade050-355d-4cc0-bcdc-81cdb14004ad) ![after phone](https://github.com/user-attachments/assets/ca323540-f6e9-4d9b-95c7-023332897ff1)

    ## Testing - `bun test apps/web/src/decision-view.test.ts`: 10 pass (new archived-badge test) - `bun run types`, `bun run ci`, `bun run build`: pass (initial JS 246661 B, within budget) - Local e2e suspended per brief; relying on PR CI.

    🤖 Generated with [Claude Code](https://claude.com/claude-code)

  2. MA
    Author

    **Review:** Looks good

    Checked desktop 1440x900 and phone 390x844 in a real browser.

    - Active document: Decisions control shows the count, accessible name "Decisions, 2 unanswered", on both the desktop view switch and the phone tab bar. - Archived: no badge on either, and the accessible name drops to plain "Decisions" (no stale "unanswered"). Archived pill and Restore render correctly; cards are read-only as before. - Restore: the badge and "Decisions, 2 unanswered" name return on both desktop and phone after reload. - Code is minimal: pure `decisionBadgeCount`, used for both consumers, with a test covering the badge markup and the aria-label.

    No findings.

    `gh pr checks 383`: container pass, e2e pass, format/lint/types/tests pass.

  3. MaggieAppletonclosedlast month on GitHub