Skip to content

Refactor components - #433

Merged
brucetony merged 14 commits into
developfrom
404-refactor-components
Oct 20, 2026
Merged

brucetony merged 14 commits into
developfrom
404-refactor-components

Conversation

@brucetony

Copy link
Copy Markdown
Collaborator

Remove several unused components, refactor code, update dependencies

Remove the unreferenced hub Pinia store, leftover mock data in
public/analyses.json, the unused next-auth.patch (pnpm-workspace.yaml
only applies next-auth-no-proxy.patch), the empty statusTag type module,
the unused missing-registry-credentials toast and unused interfaces.
Internal-only types are no longer exported. Drop the no-op toast
mouse handlers, an unused import and unused CSS rules.

Claude-Session: https://claude.ai/code/session_01HyHCR2zAKwwvrasBdDvM2q
Move the ESLint ignore list into its own config object so it applies
globally (it previously only scoped the rules block, so .nuxt/.output
were linted) and drop paths from another project. Trim boilerplate
.gitignore entries for tools this project does not use and ignore
.superpowers/. Widen coverage to app/** excluding the generated Api.ts.
Remove the explicit api plugin entry from nuxt.config; Nuxt already
registers app/plugins/ and resolves the same plugin order without it.

Claude-Session: https://claude.ai/code/session_01HyHCR2zAKwwvrasBdDvM2q
…Dependencies

Remove chart.js, webpack, sass-loader, @types/uuid, @primevue/forms
(still pulled in by @primevue/nuxt-module), @tailwindcss/postcss,
tailwindcss-primeui, @vitejs/plugin-vue and
@types/eslint-config-prettier; nothing imports or configures them.
Move prettier, swagger-typescript-api, globals, sass, tailwindcss and
@tailwindcss/vite to devDependencies. proxy-agent stays because the
next-auth patch requires https-proxy-agent and proxy-from-env, which
only it provides.

Claude-Session: https://claude.ai/code/session_01HyHCR2zAKwwvrasBdDvM2q
Move the header, footer and page shell from app.vue into
app/layouts/default.vue, leaving app.vue with the global Toast, the
loading indicator and NuxtLayout/NuxtPage.

Register components without path prefixes so templates use the file
name (which is already unique and descriptive), and drop the manual
imports of local and PrimeVue components in favour of Nuxt's
auto-imports. Move MenuHeader and Footer to components/app/ as
AppHeader and AppFooter, move SearchBar to components/shared/, and use
NuxtLink instead of vue-router's RouterLink in the header.

Claude-Session: https://claude.ai/code/session_01HyHCR2zAKwwvrasBdDvM2q
…bles/

- components/data-stores/create/index.ts -> types/dataStore.ts (Nuxt was
  registering it as a component called "Create")
- flattenLogs moves from types/logs.ts to utils/flatten-logs.ts
- connectionErrorToast, useServiceHealth and useIdpHealth contain no
  Vue/Nuxt context and move to utils/ (connection-error-toast,
  uptime-slots, idp-health)
- the fetch and merge helpers of useProjectAnalysisSummary move to
  utils/project-analysis-data.ts; the composable stays
- useDatastoreRequirement is renamed useDataStoreRequirement to match
  useDataStoreList
- nuxt-auth.d.ts moves to shared/types/next-auth.d.ts, which the app,
  server and shared tsconfigs all include

Tests are moved to mirror the new locations.

Claude-Session: https://claude.ai/code/session_01HyHCR2zAKwwvrasBdDvM2q
Pages now own the route-level concerns: the card, title and description
text, and reading route params and query. The large page components
keep rendering and delegate state to composables, with pure transforms
moved to utils/ and unit tested:

- AnalysesTable: fetching, caching, pagination and polling move to
  useAnalyses(); row parsing to utils/analysis-row.ts; filter options,
  matcher and toggling to utils/analysis-filters.ts. The page passes the
  description through a slot so the container counter keeps its place.
- ProjectsTable: data loading moves to useProjects(), the status meter
  helpers to utils/project-status-meter.ts. Drop its unused ConfirmDialog.
- DataStoreList is folded into pages/data-stores/index.vue (it only
  wired useDataStoreList to the table); DetailedDataStoreTable's row
  building moves to utils/data-store-rows.ts.
- EventViewer: event fetching and paging move to useEvents(); tag
  filtering, level counts and formatting to utils/event-format.ts.
- DataStoreProjectInitializer: form state and submission move to
  useDataStoreForm(), project loading to useAvailableProjects(), and
  helpers to utils/data-store-form.ts. The projectId query is read by
  the page and passed as a prop.
- ContainerLogs takes the analysis and node ids as props from the page.

Nothing in app/ imports vue-router directly any more; the 403 page uses
Nuxt's useRouter and the global vue-router test mock is gone.

Claude-Session: https://claude.ai/code/session_01HyHCR2zAKwwvrasBdDvM2q
Nothing imports vue-router directly any more; Nuxt provides it and its
composables. Also exclude the local .playwright-mcp/ output from ESLint.

Claude-Session: https://claude.ai/code/session_01HyHCR2zAKwwvrasBdDvM2q
main.css now imports elements, table, preferences and toast CSS, so
nuxt.config only lists main.css and the primeicons stylesheet. The
selectors in these files are all still used by templates or PrimeVue
classes.

Claude-Session: https://claude.ai/code/session_01HyHCR2zAKwwvrasBdDvM2q
@brucetony brucetony linked an issue Oct 20, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 130 files, which is 30 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a2219d56-43c3-4133-903f-326d35ea34c5
📥 Commits

Reviewing files that changed from the base of the PR and between 4c2aac6 and b9b3624.

⛔ Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing: 130
  • .gitignore
  • README.md
  • app/app.vue
  • app/assets/css/main.css
  • app/components/analysis/AnalysesTable.vue
  • app/components/analysis/AnalysisControlButtons.vue
  • app/components/analysis/AnalysisUpdateButton.vue
  • app/components/analysis/ContainerCounter.vue
  • app/components/analysis/logs/AnalysisLogCardContent.vue
  • app/components/analysis/logs/ContainerLogs.vue
  • app/components/analysis/logs/RefreshSwitch.vue
  • app/components/app/AppFooter.vue
  • app/components/app/AppHeader.vue
  • app/components/data-stores/DataStoreList.vue
  • app/components/data-stores/DetailedDataStoreTable.vue
  • app/components/data-stores/create/DataStoreHelpBox.vue
  • app/components/data-stores/create/DataStoreHelpPanel.vue
  • app/components/data-stores/create/DataStoreProjectInitializer.vue
  • app/components/data-stores/create/index.ts
  • app/components/events/DateFilterGraph.vue
  • app/components/events/EventViewer.vue
  • app/components/events/TagFilterSidePanel.vue
  • app/components/header/AvatarButton.vue
  • app/components/header/CleanupDialog.vue
  • app/components/header/DarkModeToggle.vue
  • app/components/landing/IdpAuthBtns.vue
  • app/components/landing/LandingButtons.vue
  • app/components/preferences/AutostartField.vue
  • app/components/preferences/PreferencesDialog.vue
  • app/components/preferences/RequireDataStoreField.vue
  • app/components/projects/ProjectsTable.vue
  • app/components/shared/DataStoreBadge.vue
  • app/components/shared/SearchBar.vue
  • app/components/uptime/BucketDrilldownDialog.vue
  • app/components/uptime/ServiceUptimeCard.vue
  • app/components/uptime/UptimeToolbar.vue
  • app/components/uptime/UptimeTrack.vue
  • app/composables/useAnalyses.ts
  • app/composables/useAvailableProjects.ts
  • app/composables/useDataStoreForm.ts
  • app/composables/useDataStoreList.ts
  • app/composables/useDataStoreRequirement.ts
  • app/composables/useEvents.ts
  • app/composables/useLogChunks.ts
  • app/composables/useProjectAnalysisSummary.ts
  • app/composables/useProjects.ts
  • app/layouts/default.vue
  • app/pages/analyses/[id].vue
  • app/pages/analyses/index.vue
  • app/pages/data-stores/create.vue
  • app/pages/data-stores/index.vue
  • app/pages/error/403.vue
  • app/pages/events.vue
  • app/pages/index.vue
  • app/pages/projects.vue
  • app/pages/uptime.vue
  • app/plugins/api.ts
  • app/services/Api.ts
  • app/services/hub_adapter_swagger.json
  • app/services/modifiedApiInterfaces.ts
  • app/stores/hubStore.ts
  • app/types/dataStore.ts
  • app/types/eventTag.ts
  • app/types/logs.ts
  • app/types/statusTag.ts
  • app/utils/analysis-filters.ts
  • app/utils/analysis-row.ts
  • app/utils/connection-error-toast.ts
  • app/utils/count-analyses.ts
  • app/utils/data-store-form.ts
  • app/utils/data-store-rows.ts
  • app/utils/event-format.ts
  • app/utils/flatten-logs.ts
  • app/utils/format-data-row.ts
  • app/utils/idp-health.ts
  • app/utils/project-analysis-data.ts
  • app/utils/project-status-meter.ts
  • app/utils/summarise-project-analyses.ts
  • app/utils/uptime-slots.ts
  • docker-compose.yml
  • eslint.config.js
  • eslint.config.mjs
  • nuxt.config.ts
  • package.json
  • patches/next-auth.patch
  • pnpm-workspace.yaml
  • public/analyses.json
  • server/routes/flame/api/auth/[...].ts
  • server/routes/flame/api/health.get.ts
  • shared/types/next-auth.d.ts
  • test/components/analysis/AnalysisControlButtons.spec.ts
  • test/components/analysis/AnalysisTable.spec.ts
  • test/components/analysis/ContainerCounter.spec.ts
  • test/components/analysis/constants.ts
  • test/components/analysis/logs/ContainerLogs.spec.ts
  • test/components/app/AppHeader.spec.ts
  • test/components/data-stores/constants.ts
  • test/components/data-stores/create/DataStoreHelpBox.spec.ts
  • test/components/data-stores/create/DataStoreProjectInitializer.spec.ts
  • test/components/events/EventViewer.spec.ts
  • test/components/header/AvatarButton.spec.ts
  • test/components/projects/ProjectsTable.spec.ts
  • test/components/projects/constants.ts
  • test/components/uptime/BucketDrilldownDialog.spec.ts
  • test/components/uptime/ServiceUptimeCard.spec.ts
  • test/components/uptime/UptimeToolbar.spec.ts
  • test/components/uptime/UptimeTrack.spec.ts
  • test/composables/useDataStoreList.test.ts
  • test/mockapi/api.ts
  • test/mockapi/handlers.ts
  • test/mockapi/setup.ts
  • test/pages/analyses.spec.ts
  • test/pages/data-stores-create.spec.ts
  • test/pages/data-stores.spec.ts
  • test/pages/projects.spec.ts
  • test/pages/uptime.spec.ts
  • test/utils/analysis-filters.test.ts
  • test/utils/analysis-row.test.ts
  • test/utils/connection-error-toast.test.ts
  • test/utils/count-analyses.test.ts
  • test/utils/data-store-form.test.ts
  • test/utils/data-store-rows.test.ts
  • test/utils/event-format.test.ts
  • test/utils/flatten-logs.test.ts
  • test/utils/format-data-row.test.ts
  • test/utils/project-analysis-data.test.ts
  • test/utils/project-status-meter.test.ts
  • test/utils/summarise-project-analyses.test.ts
  • test/utils/uptime-slots.test.ts
  • vitest.config.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brucetony
brucetony merged commit 499b4cc into develop Oct 20, 2026
3 checks passed
@brucetony
brucetony deleted the 404-refactor-components branch October 20, 2026 09:13
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.

Refactor components

1 participant