Skip to content

web: make the everyday screens usable and presentable - #85

Merged
TusanHomichi merged 3 commits into
mainfrom
claude/84-usable-shell
Oct 14, 2026
Merged

TusanHomichi merged 3 commits into
mainfrom
claude/84-usable-shell

Conversation

@TusanHomichi

@TusanHomichi TusanHomichi commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Primary Issue

Closes #84

Problem And Outcome

A screenshot tour of all 51 screens, using invented data at 1280×800 and 390×844, showed that the workflows work but present badly:

  • No identity or sign-out. Sign out existed only at the bottom of home, and nothing said who was signed in.
  • Wrong home page. Every role landed on a server fact sheet with raw capability identifiers.
  • Unbounded notices. A trainer had 10 near-identical notices.
  • Broken dates. Date cells wrapped one fragment per line.
  • Phone width. Every signed-in page scrolled sideways.
  • Bare error pages. A refused or missing page was a lowercase server string naming internal capabilities, with no way back.

After this PR, each role lands on its own work. Identity and sign out are on every page. No page scrolls sideways at 390 px (tour re-run: 0 of 51 screens overflow, down from every signed-in page). Refused and missing pages explain themselves.

Changes

  • Shell (+layout.svelte):
    • Signed-in name and Sign out on every page; the current section is marked (aria-current); the nav wraps on phones; the unread badge sits on Home.
    • Sign out leaves by ordinary navigation before ending the session, so a draft with unsaved or refused text can refuse while the session still works.
  • Home (+page.svelte):
    • The <h1> is "Home". Sections run review queue → My sessions → My trainees → a trainee records card → Notices → exports → people admin.
    • Notices: unread first, five shown, "Show all", "Mark all read".
    • Installation facts are folded into "About this installation", with readable capability names (capabilityName).
    • Sessions: a "When" column (2026-06-04 / 07:00–15:00 local, via localSpan), status pills, and a visibly labelled close-session control. On phones each session stacks as a card.
  • Global styles:
    • Tables scroll inside their card; on narrow screens every table.grid is its own scroller.
    • .nowrap for dates.
    • Disabled buttons read as unavailable rather than faint.
    • div.row wraps.
  • ProblemState (src/lib/ui/): a heading, plain explanation, the server detail under "Details", and a link home, keyed on HTTP status (401/403/404/other). Used by the draft and enrollment pages when their load fails.
  • My records: "Evaluations" leads, with an awaiting-acknowledgment count; packets and signoffs follow.
  • Finalized record: "Integrity and export" moves below Attribution (maintainer feedback).
  • Enrollment page: readable session times and no-wrap dates.
  • Program editor: the sticky action bar wraps.
  • e2e: every click on the nav's Home link is scoped to the Primary navigation (33 sites), so page content that mentions "Home" cannot make it ambiguous.

Authorization is unchanged; the server still decides, and the UI only presents.

Correction rung: 2 (mechanical) for the sign-out ordering hazard. A browser test with a negative control was added: with the naive logout-first order it fails with Expected: 200, Received: 401. The rest is presentation, held by the existing e2e suite.

Scope

  • In scope: the items above, plus the e2e updates they need. 16 "Installation status" heading waits become Home level 1; the session-time and capability assertions follow the new presentation.
  • Out of scope:

Verification

  • Candidate revision: 08a2af1 (this branch merged with main at e992101)
  • Local full gates passed on 08a2af1: all 7 steps, 57 browser tests including the new sign-out test, permission-bypass capabilities dropped, system Chromium 141. Receipt: web: make the everyday screens usable and presentable #85 (comment)
  • Preserved failure: the earlier run on bee5b1d failed 2 browser tests from this PR's own changes. Both were fixed in b2cb996; details in the same receipt comment.
  • Hosted pr-gate passed on 08a2af1: https://github.com/FieldmouseWorks/consolebook/actions/runs/38596659350/job/115965694663
  • Automated review: completed on 08a2af1 with no findings.
  • New test signing out from a draft with a failed save keeps the draft and the session:
    • passes against this change;
    • fails with the naive sign-out order (Expected: 200, Received: 401), then restored.
  • Screenshot tour re-run, 51 screens × 2 widths: all steps completed; no page-level horizontal overflow at 390 px.
  • Added or updated tests when behavior changed
  • ADR: not applicable; presentation only, no durable behavior or format change
  • All fixtures and examples are invented

Review And Merge Notes

  • Review focus: the sign-out ordering in +layout.svelte; the ProblemState status mapping; home section gating, which still uses the existing capability checks.
  • Review performed: self-review, screenshot comparison, and one automated review (no findings); no independent human review.
  • User impact: every signed-in screen changes visually. The home <h1> changes from "Installation status" to "Home".

🤖 Generated with Claude Code

https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts

The shell now names who is signed in, offers sign out on every page,
marks the current section, and wraps at phone width. Sign out leaves the
page by ordinary navigation first, so a draft with unsaved or refused
text can still refuse while the session works; a browser test with a
negative control covers it.

Home leads with each role's work (review queue, sessions, trainees),
shows unread notices compactly with "Mark all read", and folds the
installation facts into "About this installation" with readable
capability names. Session times read as a date and a range, statuses
are pills, and on a phone each session stacks as a card. Tables scroll
inside their cards instead of pushing the page sideways, dates do not
wrap, and disabled buttons read as unavailable.

Refused and missing draft and enrollment pages explain themselves with
a heading, plain words, the server's detail folded away, and a link
home. The trainee's evaluations lead My records with a count of those
awaiting acknowledgment. A finalized record's integrity and export
controls move below attribution.

Refs #84

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T16:20:18.692962Z 08a2af1 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The full local gates failed two browser tests on bee5b1d. A page whose
load fails now offers "Back to Home", so an unscoped
getByRole('link', { name: 'Home' }) matched two links; scope every such
click to the Primary navigation. Restore the parentheses around a
session's time zone on the enrollment page, which a sessions test reads.

Refs #84

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts

Copy link
Copy Markdown
Member Author

Local proof receipts

bee5b1d: failed (kept). Two browser tests failed because of this PR's own changes:

  • draft-recovery.spec.ts:1567: ProblemState's "Back to Home" link made an unscoped getByRole('link', { name: 'Home' }) match two links.
  • sessions.spec.ts:46: the test reads the time zone in parentheses, which this PR had dropped.

Fixed in b2cb996: every nav-Home click in the specs is scoped to the Primary navigation (33 sites), and the parentheses are restored. main was then merged in (08a2af1) to pick up scripts/proof.py.

08a2af1: passed. Every step ran with the permission-bypass capabilities dropped and system Chromium 141.0.7390.37.

# Step Result Seconds
1 scripts/check-guidance-names.sh passed 0.1
2 (cd web && npm ci && npm run check && npm run build) passed 20.1
3 cargo fmt --check passed 0.6
4 cargo clippy --workspace --all-targets -- -D warnings passed 4.3
5 cargo test --workspace passed 185.5
6 cargo build -p consolebook-server passed 0.5
7 npm run e2e: 57 passed, including the new sign-out test passed 382.4

Hosted pr-gate is running on 08a2af1.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web: make the everyday screens usable and presentable (shell, home, tables, error states, phone width)

2 participants