Commit graph

24 commits

Author SHA1 Message Date
Antti Kettunen
39f56fe63f
Promote shell context to the root route
- Wait for the legacy shell bridge/profile before React routes render
- Expose the shell bridge and profile through root TanStack context
- Update issue routes and shell helpers to consume the shared context
- Remove the redundant issues search normalization on read
- Refresh the affected tests around shell bootstrap and routing
2026-05-13 22:26:25 +03:00
Antti Kettunen
b34cea3388
Make compact form controls the default
- tighten the shared button and select primitives to the compact modal style
- remove issues-page select overrides that no longer need to exist
- drop the issue modal button sizing overrides so shared defaults handle the density
2026-05-13 22:26:25 +03:00
Antti Kettunen
497a6f41ed
Restore legacy issue icons
- bring back the old symbol-based issue category icons in the React issues UI
- keep the issue detail modal fallback aligned with the shared metadata
- add a small regression check for the restored icon set
2026-05-13 22:26:25 +03:00
Antti Kettunen
3470654fc5
Move issue detail query into modal
- let the issue detail modal own its selected-issue query and loading states
- keep the issues page focused on route state and modal orchestration
- preserve the loader prefetch so the modal still opens from warm cache
2026-05-13 22:26:25 +03:00
Antti Kettunen
a14d397bea
Refactor shared dialog pieces
- split the modal shell into smaller shared components
- move default dialog styling into the shared dialog module
- simplify the issues modals to use the shared frame/header/body/footer pieces
- keep the issues route search navigation typed against the route
2026-05-13 22:26:24 +03:00
Antti Kettunen
bd6be61b77
Use Base UI and clsx in form primitives
- Adopt Base UI for the shared form field, input, button, and toggle wrappers
- Replace the local class-name helper with clsx to keep the primitives simpler
- Keep native textarea and select controls where they still fit the existing styling pattern
2026-05-13 22:26:24 +03:00
Antti Kettunen
4b2c10fd12
Add MSW-backed issue API tests
- Add a shared MSW server to the Vitest setup
- Cover issue API request, success, and error scenarios
- Add msw as a dev dependency for future API-layer tests
2026-05-13 22:26:24 +03:00
Antti Kettunen
ffd989d0f3
Split issue request code into api module
- Move HTTP and query-option helpers out of -issues.helpers.ts.
- Keep -issues.helpers.ts focused on pure normalization and formatting helpers.
- Update issue route and modal callers to import request code from -issues.api.ts.
2026-05-13 22:26:24 +03:00
Antti Kettunen
9cde9442b7
Improve API JSON error handling
- Keep ky HTTPError instances intact instead of flattening them
- Use the parsed error payload when the server sends a useful message
- Fix the Issues default search type so issueId stays optional
- Add regression tests for the JSON helper behavior
2026-05-13 22:26:24 +03:00
Antti Kettunen
3df5e4b76d
Match the legacy issue modal
- Restore the shell-era issue detail layout and hero ordering.
- Keep external links color-coded by service.
- Hide track details for album issues and keep the track list compact.
- Restore legacy track-list badge colors for format and bitrate.
- Match the neutral dismiss button styling from the old modal.
- Add regression coverage for the album issue modal state.
2026-05-13 22:26:23 +03:00
Antti Kettunen
fac4e1ba1a
Sync issues routing and shell URLs
- Move issue detail selection into route search so the modal is deep-linkable and back-button friendly.
- Normalize issue category and detail params before they reach the loader.
- Keep the legacy shell URL in sync for React-owned home pages.
- Preserve the legacy issues-tour hooks on the React issues page.
- Add Escape handling, focus trapping, and focus restore to the issue detail modal.
- Add route and helper coverage for the new search-state behavior.
2026-05-13 22:26:23 +03:00
Antti Kettunen
a2495aaba7
Format & lint React code 2026-05-13 22:26:23 +03:00
Antti Kettunen
a9976c54ae
Centralize shell bridge glue 2026-05-13 22:26:23 +03:00
Antti Kettunen
484741db5c
Trim issue modal styling
- Remove duplicate button base styles from the issue detail modal CSS
- Keep only the layout and state-specific variants that the shared primitives still need
- Let the shared Button and TextArea own the common control styling
2026-05-13 22:26:22 +03:00
Antti Kettunen
9572035837
Add shared select and button primitives
- Keep Select thin and native, with options supplied as children
- Add a simple shared Button for form actions
- Use both primitives in the issues page and report modal
2026-05-13 22:26:22 +03:00
Antti Kettunen
a19514dae9
Add shared form primitives for issues
- Introduce reusable input, textarea, card, button, and action components
- Use them in the issue report composer as the reference implementation
- Keep the TanStack form logic at the usage site and add focused regression coverage
2026-05-13 22:26:22 +03:00
Antti Kettunen
ad590fb3db
Reduce legacy route flicker
Keep React-owned pages out of the legacy page activator during initial bootstrap, and switch the visible React host before paint when the shell mounts.

That removes the refresh flash on /issues while preserving the legacy-page behavior and browser-history stability.

Verified with the router tests and the issues smoke suite.
2026-05-13 22:26:22 +03:00
Antti Kettunen
972910261b
Keep shell bootstrap aligned with profile selection
- re-render the React shell when legacy profile bootstrap selects or refreshes a profile
- keep the initial page fallback so direct loads still activate the legacy shell chrome
- preserve the smoke coverage for direct loads and browser history
2026-05-13 22:26:22 +03:00
Antti Kettunen
f5d70768c1
Redirect root to profile home
- send / through the configured profile home page
- keep the router regression test in sync with the redirect
- preserve the legacy shell fallback for non-router bootstrap
2026-05-13 22:26:21 +03:00
Antti Kettunen
86bcad491f
Post-rebase cleanup 2026-05-13 22:26:21 +03:00
Antti Kettunen
686bfcc749
Drop server-rendered webui page state
Remove the Flask route-to-page helpers and stop passing initial active-page flags into the shell template.

The web UI now renders static page and nav markup, while the client-side shell remains responsible for establishing active page state after load. This keeps the hybrid Flask + Vite asset setup intact while reducing duplicated route/page ownership logic in the backend template layer.

Also added a previously missing /stream path to the spa exclusions
2026-05-13 22:26:21 +03:00
Antti Kettunen
d65ecbe464
Adopt TanStack Form for issue reporting
- Add @tanstack/react-form to the web UI dependencies

- Move the report issue composer fields and submit validation onto TanStack Form

- Route submit and server errors through form error state while keeping React Query for mutation execution

- Extend issue route coverage for preserving custom report titles across category changes
2026-05-13 22:26:20 +03:00
Antti Kettunen
577e4bdace
Migrate issue domain to React
- Mount a React-owned issue domain host and bridge report issue actions through it
- Add typed issue creation helpers, report payload types, and shared album workflow launchers
- Expand issue detail UI parity with metadata, links, track details, and admin actions
- Remove legacy static issue modal/list/detail code and update tests for the React bridge
2026-05-13 22:26:20 +03:00
Antti Kettunen
d98dcd8606
Initial Vite app scaffolding & issues page impl
- File-based routing with tanstack router
  - Persist top-level navigation state in url, even for most legacy pages
  - Striving for an intuitive and simple folder structure where
    route-related code is colocated, but the amount of files is still
    kept to a minimum
- Replace native fetch with `ky`
  - Familiar api, but more polished
2026-05-13 22:24:46 +03:00