refactor(account): solid results, tags, account page, filter presets (@fehmer, @miodec)#7854
Merged
refactor(account): solid results, tags, account page, filter presets (@fehmer, @miodec)#7854
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the account/results experience (account page UI, tags, result filter presets) from legacy snapshot/imperative code to SolidJS + TanStack solid-db collections, and updates related UI helpers/components.
Changes:
- Introduce
results,tags, andresult-filter-presetscollections with live queries + optimistic mutations. - Replace legacy account page HTML/handlers with Solid account page components (filters, tables, charts, mini result chart modal).
- Refactor tag + preset flows (modals/controllers) to use the new collections and shared utilities.
Reviewed changes
Copilot reviewed 77 out of 79 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/schemas/src/users.ts | Adds shared schema/type exports for result filter presets. |
| frontend/static/contributors.json | Formatting-only change. |
| frontend/src/ts/utils/typing-speed-units.ts | Exports unit settings type for reuse by charts. |
| frontend/src/ts/utils/types.ts | Adds type helpers for “exactly one” style options. |
| frontend/src/ts/utils/strings.ts | Extracts underscore/space conversion helpers. |
| frontend/src/ts/utils/local-storage-with-schema.ts | Tightens parsing/migration assignment typing. |
| frontend/src/ts/test/today-tracker.ts | Switches “today” aggregation to results collection access. |
| frontend/src/ts/test/test-screenshot.ts | Adds oxlint compat suppression for ClipboardItem. |
| frontend/src/ts/test/test-logic.ts | Switches active-tags lookup to tags collection. |
| frontend/src/ts/test/result.ts | Refactors tag PB + tag display usage to new tags collection API. |
| frontend/src/ts/test/pace-caret.ts | Moves average/daily/tag PB logic to new results/tags collection helpers. |
| frontend/src/ts/states/snapshot.ts | Updates snapshot typing after tags/results moved out. |
| frontend/src/ts/states/result-filters.ts | Adds local-storage-backed result filters state + migration. |
| frontend/src/ts/states/modals.ts | Adds MiniResultChartModal modal id. |
| frontend/src/ts/states/core.ts | Tracks isUserVerified in core state. |
| frontend/src/ts/pages/settings.ts | Refactors tags settings UI to use tags collection + live query. |
| frontend/src/ts/modals/new-filter-preset.ts | Removes legacy “new preset” modal implementation. |
| frontend/src/ts/modals/mini-result-chart.ts | Removes legacy mini-result chart modal implementation. |
| frontend/src/ts/modals/edit-tag.ts | Refactors tag CRUD + PB clear to use optimistic tag collection actions. |
| frontend/src/ts/modals/edit-result-tags.ts | Refactors result-tag editing to use results collection update flow. |
| frontend/src/ts/modals/edit-preset.ts | Refactors active tag capture to tags collection. |
| frontend/src/ts/index.ts | Removes legacy account handlers/global debug toggle wiring. |
| frontend/src/ts/firebase.ts | Centralizes setting user id + verified state via helper. |
| frontend/src/ts/event-handlers/test.ts | Switches tag existence check to tags collection. |
| frontend/src/ts/event-handlers/settings.ts | Refactors tag popup open params (id only) + error messages. |
| frontend/src/ts/event-handlers/account.ts | Removes legacy account page event handler file. |
| frontend/src/ts/elements/simple-modal.ts | Adds context support to SimpleModal.show. |
| frontend/src/ts/elements/result-batches.ts | Temporary stub/TODO changes while migrating account page. |
| frontend/src/ts/elements/modes-notice.ts | Switches active tags display to tags collection. |
| frontend/src/ts/elements/last-10-average.ts | Uses results collection average helper. |
| frontend/src/ts/db.ts | Moves tags + filter presets + results responsibilities into collections. |
| frontend/src/ts/controllers/tag-controller.ts | Removes legacy tag controller (localStorage + snapshot mutation). |
| frontend/src/ts/controllers/preset-controller.ts | Uses tags collection APIs when applying presets. |
| frontend/src/ts/controllers/page-controller.ts | Migrates account page routing to Solid page w/ results loading gate. |
| frontend/src/ts/controllers/chart-controller.ts | Removes legacy account/mini chart instances (moved to Solid components). |
| frontend/src/ts/constants/default-snapshot.ts | Removes tags/results/filterPresets from snapshot typing; adds computed result fields. |
| frontend/src/ts/components/ui/table/Table.tsx | Updates table styling classes. |
| frontend/src/ts/components/ui/table/DataTable.tsx | Adds styling hooks + optional manual sorting callback handling. |
| frontend/src/ts/components/pages/account/utils.ts | Adds shared filter merge/sanitize helpers for Solid account page. |
| frontend/src/ts/components/pages/account/VerifyNotice.tsx | Adds verification banner with resend action. |
| frontend/src/ts/components/pages/account/TestStats.tsx | Adds Solid account test stats section driven by live queries. |
| frontend/src/ts/components/pages/account/Table.tsx | Adds Solid results table with tags + mini-chart trigger. |
| frontend/src/ts/components/pages/account/MiniResultChart.tsx | Adds Solid mini-result chart modal using query-by-id. |
| frontend/src/ts/components/pages/account/HistoryChart.tsx | Adds Solid account history chart + toggles + trend line. |
| frontend/src/ts/components/pages/account/HistogramChart.tsx | Adds Solid histogram chart. |
| frontend/src/ts/components/pages/account/Filters.tsx | Adds Solid filters + presets UI and preset CRUD modals. |
| frontend/src/ts/components/pages/account/DailyActivityChart.tsx | Adds Solid daily activity chart with tooltip formatting. |
| frontend/src/ts/components/pages/account/Charts.tsx | Composes charts + filter summary for Solid account page. |
| frontend/src/ts/components/pages/account/AccountPage.tsx | New Solid account page root component replacing legacy page. |
| frontend/src/ts/components/pages/AboutPage.tsx | Replaces inline ad markup with reusable Advertisement component. |
| frontend/src/ts/components/mount.tsx | Registers Solid account page mount. |
| frontend/src/ts/components/common/Kbd.tsx | Updates hotkey formatting API usage after dependency bump. |
| frontend/src/ts/components/common/AnimatedModal.tsx | Adds DOM-connectivity guard after awaited work; safer modal open. |
| frontend/src/ts/components/common/Advertisement.tsx | New reusable ad wrapper component gated by config. |
| frontend/src/ts/commandline/lists/tags.ts | Refactors tag commands to tags collection API. |
| frontend/src/ts/collections/utils/misc.ts | Adds temp id helper for optimistic inserts. |
| frontend/src/ts/collections/tags.ts | New tags collection with live queries + optimistic CRUD + active state + PB helpers. |
| frontend/src/ts/collections/results.ts | New results collection with filtering, stats aggregation, tag updates, and helper queries. |
| frontend/src/ts/collections/result-filter-presets.ts | New filter presets collection with optimistic insert/delete and snapshot fill. |
| frontend/src/ts/auth.tsx | Sets user id on auth callback path. |
| frontend/src/styles/test-activity.scss | Moves test activity styles into dedicated stylesheet. |
| frontend/src/styles/popups.scss | Removes legacy mini result chart modal CSS. |
| frontend/src/styles/media-queries-yellow.scss | Removes legacy account-specific responsive overrides. |
| frontend/src/styles/media-queries-purple.scss | Removes legacy account-specific responsive overrides. |
| frontend/src/styles/media-queries-green.scss | Removes legacy account-specific responsive overrides. |
| frontend/src/styles/media-queries-brown.scss | Removes legacy account-specific responsive overrides. |
| frontend/src/styles/media-queries-blue.scss | Removes legacy account/account-settings responsive overrides. |
| frontend/src/styles/index.scss | Stops importing legacy account.scss; adds test-activity.scss. |
| frontend/src/styles/account.scss | Removes legacy account page stylesheet. |
| frontend/src/index.html | Replaces loaded legacy account HTML with Solid mount container. |
| frontend/src/html/popups.html | Removes legacy mini-result chart modal markup. |
| frontend/src/html/pages/account.html | Removes legacy account page HTML. |
| frontend/package.json | Bumps TanStack + trendline plugin versions for new Solid/table stack. |
| frontend/tests/elements/account/result-filters.spec.ts | Removes legacy tests for old filter merge implementation. |
| frontend/tests/controllers/preset-controller.spec.ts | Updates tests for tags migration (controller → collection). |
| backend/src/utils/result.ts | Adds legacy normalization for mode2 numeric and language mapping. |
Comments suppressed due to low confidence (1)
frontend/src/ts/elements/result-batches.ts:34
resultsis hardcoded to an empty array, so this progress UI will always think 0 results are downloaded and compute percentages off that. Either wire this back up to the real results source or remove/disable the component instead of shipping placeholder logic.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 77 out of 79 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
frontend/src/ts/elements/result-batches.ts:24
update()currently uses a hardcoded emptyresultsarray, so percentages can becomeNaN/0 and the UI will never reflect real downloaded/limit state. Either wire this back to the real results source (likely the new results collection) or delete the unused result-batches feature to avoid dead/broken code shipping.
Comment on lines
+294
to
+300
| <Button | ||
| text="save as preset" | ||
| onClick={() => | ||
| newFilterPresetModal.show(undefined, { | ||
| context: { ...unwrap(props.filters), _id: "tmp" }, | ||
| }) | ||
| } |
Comment on lines
+420
to
+426
| show( | ||
| parameters: string[] = [], | ||
| showOptions: ShowOptions & { context?: unknown }, | ||
| ): void { | ||
| activePopup = this; | ||
| this.parameters = parameters; | ||
| this.context = showOptions.context; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates