Skip to content

chore: remove unused UserMenu, move handleSignOut to shared-actions; codegen docs - #54

Merged
chriskehayias merged 2 commits into
devfrom
chore/remove-user-menu
Oct 10, 2026
Merged

chriskehayias merged 2 commits into
devfrom
chore/remove-user-menu

Conversation

@chriskehayias

Copy link
Copy Markdown
Contributor

UserMenu removal

The project won't use the dropdown UserMenu, which was never mounted anywhere.

  • Deleted src/components/user-menu/ (component, barrel, component test).
  • handleSignOut is still used by the /session-error form, so it moved with its tests to src/components/shared-actions/sign-out.ts. Imports and code comments are updated.
  • Removed @heroicons/react, which only the menu used. The vendored shadcn dropdown-menu primitive stays.
  • Docs: deleted components/user-menu.md; updated auth, data-flow (sign-out call graph rewritten to match the current action), GLOSSARY, GOTCHAS, security, testing inventory, CLAUDE.md and README.
  • The security reference now says plainly that /session-error holds the app's only sign-out control and /no-access has none.

Codegen docs

Every direct tsx command for generate-types and generate-storedprocs (README, scripts README, the mp-provider reference) now includes --conditions=react-server, with a note on why: the MP client modules use server-only. The CLIs' --help text now points to the npm scripts, which already pass the flag.

Verification

lint, typecheck and test:coverage pass (2184 tests; the 7 UserMenu component tests were removed with it). npm run build and check:prerender pass. npm run mp:generate:storedprocs -- --help runs.

🤖 Generated with Claude Code

chriskehayias and others added 2 commits October 10, 2026 14:52
…is run

Every direct `tsx` command for generate-types / generate-storedprocs in the
READMEs and references now carries the flag, with a note on why
(`server-only` in the MP client modules). The CLIs' own --help text points
at the npm scripts, which already pass it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The project will not use the dropdown UserMenu (it was never mounted).
`handleSignOut` is still needed by /session-error, so it moves to
`src/components/shared-actions/sign-out.ts` with its tests. Drops
@heroicons/react, which only the menu used. Docs updated to match, including
that /session-error holds the app's only sign-out control.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chriskehayias
chriskehayias merged commit cc10c32 into dev Oct 10, 2026
1 check passed
@chriskehayias
chriskehayias deleted the chore/remove-user-menu branch October 10, 2026 18:55
@codecov

codecov Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

chriskehayias added a commit that referenced this pull request Oct 10, 2026
Sign-in isn't role-gated, so a user with no MP security role gets a
session and lands on `/no-access`. With `UserMenu` removed (#54),
nothing let them end that session before the 12-hour limit.

- `/no-access` now has a **Sign out** form wired to `handleSignOut`, the
same pattern as `/session-error`. The page stays dynamic because it
renders under AuthWrapper, so the CSP nonce is present.
- Added a test that pins the submit button and form.
- Updated the docs (security, oauth-flow, the sign-out call graph,
shared-actions README, README) to name both sign-out forms.

**Verified** against a production build with the CSP enforced. Clicking
Sign out on `/no-access` went to MP's logout page, back to the app,
through `/signin`, and stopped at the MP login prompt, so both sessions
ended. No CSP violations. `lint`, `typecheck` and `test:coverage` pass.

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

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

1 participant