refactor: theme typing, error UX, a11y, lint config, dev hygiene - #499
Open
aldbr wants to merge 4 commits into
Open
refactor: theme typing, error UX, a11y, lint config, dev hygiene#499aldbr wants to merge 4 commits into
aldbr wants to merge 4 commits into
Conversation
aldbr
force-pushed
the
split/5-quality-hygiene
branch
from
July 14, 2026 13:11
c37266b to
636ba2f
Compare
Contributor
Author
aldbr
force-pushed
the
split/5-quality-hygiene
branch
6 times, most recently
from
July 15, 2026 06:49
c94b4da to
92a433f
Compare
…nular contexts Split the monolithic ApplicationsContext tuple into three purpose-built contexts (AppListContext, DashboardContext, CurrentAppContext) so components subscribe only to the state they read, and rework the dashboard layout around them: - extract drag-and-drop monitoring into a useDashboardDragDrop hook and the context menu into a DrawerContextMenu component; DashboardDrawer now updates dashboard state immutably (no in-place mutation of groups) - rewrite hooks/application.tsx around the granular contexts (useAppList, useDashboard, useApplicationId, useCurrentApplication) and drop useApplicationTitle/useApplicationType - memoize NavigationProvider and OIDCConfigurationProvider values - ProfileButton loses the dead About entry; ThemeToggleButton, Import/ExportButton, ApplicationDialog and ApplicationSelector are adapted to the new contexts - contexts/index.ts now exports the granular contexts explicitly (ApplicationsContext is gone); Dashboard stories/tests updated
useDashboardDragDrop no longer takes userDashboard or mirrors it in a ref. reorderSections receives the source/destination group titles from the drop event and looks the groups up inside the setUserDashboard functional updater, where React hands it the freshest state. This drops the ref, its sync effect, and the userDashboard parameter, and removes the (practically unreachable) window where a drop could read a stale dashboard between a state commit and the ref update. The destination index is copied into a local so the updater stays pure under StrictMode. Draft addressing review comment C6.1 — kept as its own commit for review. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…sition, context split, SWR tuning Rework the Job Monitor stack end to end: - split the monolithic shared/DataTable.tsx into a DataTable/ module (DataTable, DataTableHeader, DataTableToolbar, SplitActionButton) virtualized with @tanstack/react-virtual instead of react-virtuoso; react-virtuoso is dropped from dependencies - extract a reusable shared/PieChart component (with stories and a11y legend tests) and a shared visuallyHidden helper - decompose the SearchBar: state moves into a useSearchBarReducer, URL/filter synchronisation into useFilterSync, and suggestion fetching into useSearchSuggestions; equations gain stable ids and the Operators.EGUALS typo becomes Operators.EQUALS - restructure the Job Monitor: column definitions move to jobColumns.tsx, per-application persistence to useJobMonitorPersistence, and shared state to a JobMonitorContext; jobDataService migrates to the services/fetcher client with SWR keys tuned to avoid refetch storms - finish the fetcher migration: hooks/utils.tsx loses the legacy tuple-based fetcher (now services/client with named options and abort support), hooks/metadata.tsx and the gubbins OwnerMonitor consume the new client, and the package root exports the explicit final API surface - jest config/setup updated for react-virtual (structured-clone ponyfill, layout mocks); e2e specs updated and a mobile viewport spec added; next.config gains a services alias for dev HMR and the app a test:headless script BREAKING CHANGE: the tuple-based fetcher export is gone from @dirac-grid/diracx-web-components/hooks; use the object-based fetcher from @dirac-grid/diracx-web-components/services instead. Operators.EGUALS is renamed Operators.EQUALS, and the DataTable API changed with the module split.
Quality and hygiene follow-ups across the workspace: - ThemeProvider: introduce a ThemeMode union with a type-guarded sessionStorage read, keep render pure (storage is only written on an explicit user toggle), memoize toggleTheme, and derive outlined-input border/label colors for both palette modes; Dashboard tests updated for the new persistence semantics - eslint flat configs (components, app, extensions) tightened, notably enabling eslint-plugin-jsx-a11y; the intentional autoFocus in the drawer rename fields gains documented disable directives - README refreshed - lockfile synchronised with the final dependency set
aldbr
force-pushed
the
split/5-quality-hygiene
branch
from
July 15, 2026 07:14
92a433f to
184c2a6
Compare
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.
Part of #494 (stack 5/5, final). Stacked on #498 — until it merges, review the last commit only (
refactor:).Quality and hygiene tail of the stack:
ThemeMode = "light" | "dark"union replacesstring | null(casts gone); render is pure —sessionStoragewrites move out of the render phase; storage now records only explicit user choices, making the follow-system-preference branch reachable; dark mode gets palette-aware focused-input colors (previously hardcoded light-mode greys/black);eslint-plugin-jsx-a11y(recommended) enabled on the components package — where all the interactive UI lives (0 errors after the a11y fixes earlier in the stack); prettier-conflicting formatting rules (indent,semi,comma-dangle) removed from the app/extension configs;After this merges, the stack tree is identical to the original development branch — closes out #494's implementation phase.
🤖 Generated with Claude Code