Skip to content

refactor(app): split components/ into layouts/ and feature sections/#8547

Merged
MarkusNeusinger merged 2 commits into
mainfrom
refactor/frontend-structure-split
Jun 10, 2026
Merged

refactor(app): split components/ into layouts/ and feature sections/#8547
MarkusNeusinger merged 2 commits into
mainfrom
refactor/frontend-structure-split

Conversation

@MarkusNeusinger

Copy link
Copy Markdown
Owner

Summary

Part 7 of the frontend modernization roadmap. Pure git mv + import-specifier rewrite — zero logic changes.

  • src/layouts/: RootLayout, Layout (AppDataProvider), BareLayout, NavBar, Footer, MastheadRule
  • src/sections/landing/: HeroSection, NumbersStrip, PaletteStrip, LibrariesSection, PlotOfTheDay, PlotOfTheDayTerminal, TypewriterText, ScienceNote
  • src/sections/spec-detail/: SpecDetailView, SpecTabs, SpecOverview, RelatedSpecs, CodeShowcase, LibraryPills (used only by SpecPage — placed here instead of plots-gallery as originally sketched)
  • src/sections/plots-gallery/: FilterBar, ImagesGrid, ImageCard, ToolbarActions
  • src/sections/libraries/: LibraryCard
  • src/components/ keeps shared primitives only: LoaderSpinner, SectionHeader, ErrorBoundary, RouteErrorBoundary, CodeHighlighter, ThemeToggle, FeedbackWidget
  • Barrel index.ts per folder; hooks/ barrel completed (+3) and utils/ barrel completed (+4)
  • Tests moved alongside their components; layouts/ and sections/ added to coverage

Note: ScienceNote, CodeShowcase, BareLayout, PlotOfTheDay (non-terminal) and PaletteStrip are currently dead code (only self/test references) — moved as-is rather than deleted; removal is proposed separately.

Verification

yarn lint ✓ · yarn fm:check ✓ · yarn type-check ✓ · yarn test 552/552 ✓ · yarn build

🤖 Generated with Claude Code

Pure git mv + import-specifier rewrite, no logic changes:
- src/layouts/: RootLayout, Layout (AppDataProvider), BareLayout, NavBar,
  Footer, MastheadRule
- src/sections/landing/: HeroSection, NumbersStrip, PaletteStrip,
  LibrariesSection, PlotOfTheDay, PlotOfTheDayTerminal, TypewriterText,
  ScienceNote
- src/sections/spec-detail/: SpecDetailView, SpecTabs, SpecOverview,
  RelatedSpecs, CodeShowcase, LibraryPills (used only by SpecPage — moved
  here instead of plots-gallery as originally sketched)
- src/sections/plots-gallery/: FilterBar, ImagesGrid, ImageCard,
  ToolbarActions
- src/sections/libraries/: LibraryCard
- src/components/ keeps the shared primitives: LoaderSpinner, SectionHeader,
  ErrorBoundary, RouteErrorBoundary, CodeHighlighter, ThemeToggle,
  FeedbackWidget
- Barrel index.ts per folder; hooks/ and utils/ barrels completed
- Tests moved alongside; layouts/ and sections/ added to coverage

Part 7 of the frontend modernization roadmap.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 10, 2026 00:25
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the frontend folder structure by moving UI code from src/components/ into src/layouts/ (app chrome/providers) and src/sections/ (page feature blocks), while updating imports, barrels, and Vitest coverage globs accordingly.

Changes:

  • Introduces src/layouts/ and src/sections/** structure with per-folder index.ts barrels.
  • Rewrites import specifiers across pages/routes/tests to point at the new locations.
  • Extends Vitest coverage include globs to track layouts/ and sections/.

Reviewed changes

Copilot reviewed 41 out of 60 changed files in this pull request and generated no comments.

Show a summary per file
File Description
app/vitest.config.ts Adds coverage include globs for src/layouts/** and src/sections/**.
app/src/utils/index.ts Completes utils/ barrel exports.
app/src/sections/spec-detail/SpecTabs.tsx Spec detail tabs component moved under sections/spec-detail.
app/src/sections/spec-detail/SpecTabs.test.tsx Updates SpecTabs test import path.
app/src/sections/spec-detail/SpecOverview.tsx Spec implementations overview grid moved under sections/spec-detail.
app/src/sections/spec-detail/SpecOverview.test.tsx Updates SpecOverview test import path.
app/src/sections/spec-detail/SpecDetailView.tsx Single-implementation detail view moved under sections/spec-detail.
app/src/sections/spec-detail/SpecDetailView.test.tsx Updates SpecDetailView test import path.
app/src/sections/spec-detail/RelatedSpecs.tsx Similar/related specs section moved under sections/spec-detail.
app/src/sections/spec-detail/RelatedSpecs.test.tsx Updates RelatedSpecs test import path.
app/src/sections/spec-detail/LibraryPills.tsx Library selector “pills” moved under sections/spec-detail.
app/src/sections/spec-detail/LibraryPills.test.tsx Updates LibraryPills test import path.
app/src/sections/spec-detail/index.ts Adds sections/spec-detail barrel.
app/src/sections/spec-detail/CodeShowcase.tsx Moves CodeShowcase section under sections/spec-detail.
app/src/sections/plots-gallery/ToolbarActions.tsx Extracts plots-gallery toolbar actions under sections/plots-gallery.
app/src/sections/plots-gallery/ToolbarActions.test.tsx Updates ToolbarActions test import path.
app/src/sections/plots-gallery/index.ts Adds sections/plots-gallery barrel.
app/src/sections/plots-gallery/ImagesGrid.tsx Moves ImagesGrid under sections/plots-gallery.
app/src/sections/plots-gallery/ImagesGrid.test.tsx Updates ImagesGrid test import path + mocks.
app/src/sections/plots-gallery/ImageCard.tsx Moves ImageCard under sections/plots-gallery.
app/src/sections/plots-gallery/ImageCard.test.tsx Updates ImageCard test import path.
app/src/sections/plots-gallery/FilterBar.tsx Moves FilterBar under sections/plots-gallery and rewires ToolbarActions import.
app/src/sections/plots-gallery/FilterBar.test.tsx Updates FilterBar test import path.
app/src/sections/libraries/LibraryCard.tsx Moves LibraryCard under sections/libraries.
app/src/sections/libraries/LibraryCard.test.tsx Updates LibraryCard test import path.
app/src/sections/libraries/index.ts Adds sections/libraries barrel.
app/src/sections/landing/TypewriterText.tsx Moves TypewriterText under sections/landing.
app/src/sections/landing/ScienceNote.tsx Updates ScienceNote imports to new landing section locations.
app/src/sections/landing/PlotOfTheDayTerminal.tsx Moves PlotOfTheDayTerminal under sections/landing.
app/src/sections/landing/PlotOfTheDayTerminal.test.tsx Updates PlotOfTheDayTerminal test import path.
app/src/sections/landing/PlotOfTheDay.tsx Moves PlotOfTheDay under sections/landing.
app/src/sections/landing/PlotOfTheDay.test.tsx Updates PlotOfTheDay test import path.
app/src/sections/landing/PaletteStrip.tsx Moves PaletteStrip under sections/landing.
app/src/sections/landing/NumbersStrip.tsx Moves NumbersStrip under sections/landing.
app/src/sections/landing/LibrariesSection.tsx Updates LibrariesSection to use sections/libraries/LibraryCard.
app/src/sections/landing/index.ts Adds sections/landing barrel.
app/src/sections/landing/HeroSection.tsx Updates HeroSection imports to landing section locations.
app/src/sections/landing/HeroSection.test.tsx Updates HeroSection test mocks/imports for new paths.
app/src/routes/index.tsx Switches router wiring to layouts/Layout and layouts/RootLayout.
app/src/pages/SpecPage.tsx Repoints SpecPage to sections/spec-detail/* (including lazy imports).
app/src/pages/SpecPage.test.tsx Updates SpecPage lazy-component mocks to new paths.
app/src/pages/PlotsPage.tsx Repoints PlotsPage to sections/plots-gallery/*.
app/src/pages/PlotsPage.test.tsx Updates PlotsPage mocks to new paths (including Footer).
app/src/pages/LibrariesPage.tsx Repoints LibrariesPage to sections/libraries/LibraryCard.
app/src/pages/LandingPage.tsx Repoints LandingPage to sections/landing/*.
app/src/pages/LandingPage.test.tsx Updates LandingPage mocks to new paths.
app/src/layouts/RootLayout.tsx Moves RootLayout under layouts/ and updates internal imports.
app/src/layouts/RootLayout.test.tsx Updates RootLayout test mocks/imports to new paths.
app/src/layouts/NavBar.tsx Moves NavBar under layouts/.
app/src/layouts/NavBar.test.tsx Updates NavBar test import path.
app/src/layouts/MastheadRule.tsx Moves MastheadRule under layouts/.
app/src/layouts/MastheadRule.test.tsx Updates MastheadRule test import path.
app/src/layouts/Layout.tsx Moves AppDataProvider (Layout) under layouts/.
app/src/layouts/Layout.test.tsx Updates Layout test import path.
app/src/layouts/index.ts Adds layouts/ barrel.
app/src/layouts/Footer.tsx Moves Footer under layouts/.
app/src/layouts/Footer.test.tsx Updates Footer test import path.
app/src/layouts/BareLayout.tsx Adds BareLayout under layouts/.
app/src/hooks/index.ts Completes hooks/ barrel exports.
app/src/components/index.ts Keeps components/ as shared primitives barrel.

@MarkusNeusinger MarkusNeusinger enabled auto-merge (squash) June 10, 2026 00:51
@MarkusNeusinger MarkusNeusinger merged commit c43146c into main Jun 10, 2026
7 checks passed
@MarkusNeusinger MarkusNeusinger deleted the refactor/frontend-structure-split branch June 10, 2026 00:53
MarkusNeusinger added a commit that referenced this pull request Jun 10, 2026
…tion (#8596)

## Summary

Part 11 (final) of the frontend modernization roadmap.

- **`app/ARCHITECTURE.md`**: directory layout
(routes/layouts/pages/sections/components/hooks/lib/theme), conventions
(`src/` alias imports, `paths.*` URL registry, `lib/api` client, theme
tokens, feature folders), data flow, testing pattern, quality gates, and
how-to-add recipes for pages/sections/hooks/endpoints
- **`agentic/docs/project-guide.md`**: frontend section now lists the
full gate (`lint`, `fm:check`, `type-check` incl. tests, `test`),
mentions the dev-time checker overlay, and links the new architecture
doc

With this, the roadmap is complete: tooling baseline (#8519), src/
aliases (#8520), theme split (#8525), global-config (#8529), API client
(#8531), routes registry (#8546), structure split (#8547), FilterBar
(#8559), SpecTabs (#8564), MapPage hook (#8581).

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.

2 participants