chore(components): remove dead user prop from MobileNavigation #28
No reviewers
Labels
No labels
agent-context-drift
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: rstillwell/deckhearth#28
Loading…
Reference in a new issue
No description provided.
Delete branch "convoy/cleanup-mobile-nav-dead-props"
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?
Summary
P3 polish convoy.
components/MobileNavigation.jsaccepted auserprop but never read any field of it — the mobile bottom-bar items (Cards, Decks, Dashboard, Community, More) are statically configured and don't branch on auth state, role, or user identity. This PR removes the dead prop in the component signature + the redundantuser={user}JSX attribute at the only active call site (components/Layout.js).The cleanup was originally surfaced as R8 of
fix-layout-default-user(PR #15, squashca302a8) and deferred there to keep that convoy's scope tight; queued ascleanup-mobile-nav-dead-propsin.convoys/ship-readiness.md§ Queued convoys.Audit (pre-edit)
rg '\buser\b' components/MobileNavigation.js→ 1 hit before (line 5 destructure), 0 after.rg "MobileNavigation" components/ pages/ --type js→ only active caller iscomponents/Layout.jsline 598;components/Layout.js.backupalso calls it but is a no-go-zone per.cursor/rules/no-go-zones.mdc§ "Append-only / historical" and stays untouched.useris never accessed (nouser.email,user.role,user.id, no conditional render gated onuser, no pass-through). ThenavigationItemsarray is fully static.Verdict: prop is genuinely dead — the queue entry's premise holds. Safe to remove.
The change
Three-line diff across two files plus the convoy doc:
components/MobileNavigation.jsline 5:({ user, onMenuOpen })→({ onMenuOpen }).components/Layout.jslines 598-601: drop theuser={user}JSX attribute, keeponMenuOpen={...}..convoys/cleanup-mobile-nav-dead-props.md: planning doc with audit, fix, risks, acceptance criteria (Background + Audit results + The fix + Out of scope + Verification plan + R1/R2 + Owns + As-shipped stub).No new code. No refactors elsewhere in MobileNavigation.js (the pre-existing unused
import { useState } from 'react'on line 3 is left for a future hygiene sweep per the convoy's "single-prop removal" scope rule).Test plan
rg '\buser\b' components/MobileNavigation.js→ 0 hits post-edit.rg "MobileNavigation" components/ pages/ --type js→ confirm each active call site passes onlyonMenuOpen(Layout.js verified; .backup intentionally not modified).npm run lint→ exit 1 with 128 problems (baseline preserved, no regression).npm run test:run→ 21/21 pass;test/components/Layout.test.js's logged-out-branch regression-lock (Gotcha #8) unaffected since it does not inspect MobileNavigation's prop shape.npm run buildskipped locally; relying on Vercel preview CI + Playwright smoke + visual-diff workflows on this PR.Risks
user.id, or hiding "Community" for unauthenticated visitors. Accepted: re-adding a prop is one line when the feature actually lands; carrying dead state to hedge hypothetical features obscures the current surface and adds nothing.components/Layout.js.backupstill references the old prop shape. Accepted: the backup is a no-go-zone by repo rule, and is dead code by definition. Leaving it as a stale snapshot is the documented convention; the stale call disappears when the backup is eventually deleted in a separate convoy.Follow-ups
import { useState } from 'react'incomponents/MobileNavigation.js(pre-existing, out of scope here). Will get caught by a futurelint-no-unused-importsrule or a generic hygiene sweep.components/Layout.js.backupcleanup — separate convoy when ready.god-component-split(P2 #13) if that convoy ever lands; this one ships first.Made with Cursor
The latest updates on your projects. Learn more about Vercel for GitHub.
Pipeline Health
Build + CI gates
Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build).
Role reports
See individual comments above for details. This rollup updates automatically.
Visual Diff
Screenshots and diffs uploaded as artifacts: view run
If intentional changes: update snapshots locally with
npx playwright test --project=visual --update-snapshotsand commit.