Skip to content

refactor(frontend): post-Phase-6 layout polish (slices, pages/Admin, util, hooks)#23

Merged
revtex merged 1 commit intodevfrom
refactor/frontend-layout-polish
Apr 25, 2026
Merged

refactor(frontend): post-Phase-6 layout polish (slices, pages/Admin, util, hooks)#23
revtex merged 1 commit intodevfrom
refactor/frontend-layout-polish

Conversation

@revtex
Copy link
Copy Markdown
Owner

@revtex revtex commented Apr 25, 2026

Summary

Follow-up cleanup after Phases 4–6 of the directory restructure plan. Four small, mechanical moves bundled into one PR. No runtime behaviour change.

Moves

# Before After Why
1 app/slices/{authSlice,scannerSlice,callsSlice,shareSlice,adminSlice,activitySlice}.ts (flat) app/slices/shared/authSlice.ts, app/slices/scanner/{scannerSlice,callsSlice,shareSlice}.ts, app/slices/admin/{adminSlice,activitySlice}.ts Match the feature grouping introduced for hooks/ and services/
2 components/admin/AdminLayout.tsx + 5-line shim at pages/Admin.tsx pages/Admin.tsx (260 LOC, default export renamed AdminLayoutAdmin); test moves to pages/Admin.test.tsx Page-level shell belongs in pages/, drop the trivial shim
3 services/downloadFilename.ts services/util/downloadFilename.ts Match the established ws/ + audio/ subfolder pattern; future pure helpers go here
4 components/admin/NavigationGuardContext.tsx hooks/admin/useNavigationGuard.tsx (added to hooks/admin barrel) It's a hook + provider, not a UI component

All call sites updated via sed; no @/components/admin/NavigationGuardContext, @/services/downloadFilename, @/components/admin/AdminLayout, or flat @/app/slices/* imports remain.

Verification

  • pnpm exec tsc --noEmit — clean
  • pnpm test -- --run188/188 pass (same baseline as Phases 4/5/6)

CHANGELOG

One bullet appended under [Unreleased] ### Changed describing all four moves.

…util, hooks)

- app/slices/ split into shared/ (authSlice), scanner/ (scannerSlice,
  callsSlice, shareSlice), admin/ (adminSlice, activitySlice)
- components/admin/AdminLayout.tsx inlined into pages/Admin.tsx;
  default export renamed to Admin; test file moved to pages/Admin.test.tsx
- components/admin/NavigationGuardContext.tsx relocated to
  hooks/admin/useNavigationGuard.tsx and added to the hooks/admin barrel
- services/downloadFilename.ts moved to services/util/downloadFilename.ts

All 188 tests pass; tsc --noEmit clean. No runtime behaviour change.
@revtex revtex merged commit 3a54c8f into dev Apr 25, 2026
7 checks passed
@revtex revtex deleted the refactor/frontend-layout-polish branch April 25, 2026 17:22
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