Skip to content

refactor: move rails, header and footer into widgets and thin the routes - #96

Merged
dimslaev merged 1 commit into
masterfrom
refactor/frontend-fsd-4-widgets
Oct 23, 2026
Merged

dimslaev merged 1 commit into
masterfrom
refactor/frontend-fsd-4-widgets

Conversation

@dimslaev

Copy link
Copy Markdown
Owner

Chunk 4 of 6 of the frontend FSD + kebab-case move. Stacked on #95.

Changes

  • widgets/rails: rail components in ui/ (panels in ui/panels/), RailsProvider in model/, and the panel registry in config/panels.tsx. Chunk 5 replaces the provider with a store.
  • widgets/header (Header, UserMenu) and widgets/footer (Footer), each with an index.ts.
  • AuthLayout is gone. routes/_auth.tsx is a pathless layout with the same header, centered column and footer. login.tsx and auth.tsx moved under _auth/, and their URLs are unchanged. AuthLayout couldn't live in shared because it renders two widgets.
  • components/Articles/Feed.tsx is folded into the feed route (routes/_layout/index.tsx).
  • developers.tsx split into features/developer-api. The route keeps the heading and composes UpgradeButton and ApiReference. ApiReference returns a fragment so the page spacing stays the same.
  • components/ no longer exists. src/ now holds routes/, widgets/, features/, shared/ plus main.tsx.
  • routeTree.gen.ts regenerated.

Tests

New specs, added before the move:

  • developers.spec.ts: endpoints listed, Upgrade opens "Coming soon", copy puts the response shape on the clipboard.
  • login.spec.ts: the sign-in pages keep the site header and footer.
  • articles.spec.ts: the footer counts the curated articles.

login.spec.ts also gets a fix for an existing race. Two tests requested a sign-in link for the superuser at the same time, and each request replaces the token. The suite failed every time I ran login.spec.ts on its own; full runs passed only because of test scheduling. Those two tests now run serially.

Checks

  • bun run build green. bun run lint has no warnings left (no kebab-case misses).
  • bun run lint:layers (Steiger): no problems.
  • Playwright: 62 passed locally.
  • pre-commit hooks pass.

Generated by Claude Code

@claude

claude Bot commented Oct 23, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@dimslaev
dimslaev force-pushed the refactor/frontend-fsd-3-features branch from f0750aa to 1864673 Compare October 23, 2026 17:42
Base automatically changed from refactor/frontend-fsd-3-features to master October 23, 2026 17:46
@dimslaev
dimslaev force-pushed the refactor/frontend-fsd-4-widgets branch from 4740da8 to 2373d53 Compare October 23, 2026 17:46
@dimslaev
dimslaev merged commit 21e4891 into master Oct 23, 2026
6 checks passed
@dimslaev
dimslaev deleted the refactor/frontend-fsd-4-widgets branch October 23, 2026 17:49
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.

2 participants