feat(frontend): move the dashboard to Tailwind CSS v4 and rebuild it around limits - #10
Merged
Merged
Conversation
WindiCSS has been unmaintained since 2023, and its Vite plugin is the only thing still holding the dashboard on it. Tailwind v4 covers the same ground through @tailwindcss/vite and is a maintained dependency again. The move is deliberately mechanical, so the diff reads as a toolchain change and nothing else. src/style.css carries the theme that used to live in windi.config.js, and a compatibility block below it reproduces what Windi emitted. That block is scaffolding for the UI work that follows and is marked for deletion. Six things needed handling rather than translation: - Component style blocks sit outside every cascade layer, which ranked .container above the px-15 utilities several views write beside it. The global rules moved out of App.vue into the layer each one needs. - Tailwind accepts spacing only in multiples of 0.25, so nine classes such as pt-0.4 stopped resolving. They are explicit rem values now. - Windi shipped an `indent` utility of its own, which silently added a text-indent to the token routes, whose component class has the same name. - The dark variant uses :is and not :where, because :where adds no specificity and the indicator vue3-tabs styles then wins. - @tailwindcss/forms styles an input written without a type, which Windi's older port did not. Thirteen inputs were laid out against the untouched browser box. - `dark: bg-gray-900` in the settings styles was a typo that Windi swallowed and Tailwind rejects. Verified by running both versions side by side and comparing every view in both themes at two widths: the desktop views outside the dashboard come out pixel identical. One difference is kept on purpose, a select now inherits the interface font instead of falling back to Arial. Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
The Resources chart drew used memory in megabytes and the thread count on one y-axis. Whichever number happened to be larger got the taller line, so the comparison a reader took from that shape meant nothing. Memory and threads are two charts now, side by side on a shared time axis: the trends stay comparable and the magnitudes stop pretending to be. The rest follows from the same question, what does an operator need to read off this page in ten seconds: - Memory and threads are shares of a limit, so they get a meter rather than "151.5 of 32 MB" as running text, and the meter turns amber at three quarters and red at nine tenths. - latestVersion has been in the status response all along and nothing on this page used it. The version tile now says whether a newer release exists. - The always green dot beside the heading is gone. Failures carry the state instead, and every state ships with a word, never colour on its own. - Series colours come from a palette checked against both card surfaces for colour-vision separation and contrast, instead of eight hand-picked hues. Multi-series charts draw lines rather than stacked translucent areas, which hid each other, and fold everything past the eighth repository into one series. - Loading and empty states. The resolved requests card used to vanish entirely when statistics were switched off, leaving a gap where a reader had no way to tell a disabled feature from a failed request. - Instance status polled once a second and kept polling behind a hidden tab. It asks every five seconds now, pauses while the tab is hidden, and stops by unmounting rather than by checking which tab is selected. Also fixes the tab bar on small screens, where five tabs pinned to a quarter of the width each wrapped onto a second line and cut off the last label. It stays on one line and scrolls. The stub backend grew memory past maxMemory without bound and returned two snapshots, which left the new meters and trends impossible to judge while working on them. Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
Test results 68 files 68 suites 12m 39s ⏱️ Results for commit 6d46bfc. |
7 tasks
9 tasks
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.
Description
Two changes to the dashboard, kept as two commits because they answer different questions and carry different risk.
build(frontend): WindiCSS out, Tailwind CSS v4 in. Windi has been unmaintained since 2023 andvite-plugin-windicsswas the only thing still holding the dashboard on it. The migration is deliberately mechanical:src/style.csscarries the theme that used to live inwindi.config.js, and a clearly marked compatibility block below it reproduces what Windi emitted, so this commit changes the toolchain and nothing a user sees.Six differences needed handling rather than translation, and each is commented where it lands:
<style>blocks sit outside every cascade layer.container { @apply px-10 }outranked thepx-15several views write beside it, shifting whole pages by 20pxpt-0.4silently stopped resolvingindentutility of its owntext-indent: 1.5remon top of their padding:wherein the dark variant contributes no specificityvue3-tabswon and lost its colour in dark mode@tailwindcss/formsstylesinput:not([type]), Windi's older port did notdark: bg-gray-900(with a space) in the settings stylesfeat(frontend): the dashboard rebuilt around limits and single measures. The Resources chart drew used memory in megabytes and the thread count on one y-axis. Whichever number happened to be larger got the taller line, so the comparison a reader took from that shape meant nothing. They are two charts now on a shared time axis.The rest follows from the same question, what does an operator need to read off this page in ten seconds:
151.5 of 32 MBas running text. Amber at three quarters, red at nine tenths.latestVersionhas been in the status response all along and nothing used it. The version tile now says whether a newer release exists.Dark theme and 390px
The stub backend grew memory past
maxMemorywithout bound and returned two snapshots, which made the new meters and trends impossible to judge while working on them.All screenshots come from
fake-api/fake-ingot-backend.js, so the numbers are stub data. They live on the orphan branchassets/pr-10-screenshots, which shares no history withmainand is never merged, so the repository does not carry the PNGs through every clone. Deleting that branch breaks the images above.No backend, configuration, container or plugin surface is touched. ApexCharts is not involved: it was already replaced by Apache ECharts in
dfd70d66.Type of change
feat- new featurebuild/ci/chore- tooling, dependencies, pipelinesHow was this tested?
The frontend has no automated test suite, so the migration was verified by rendering both versions and comparing them.
Both versions were run side by side, the pre-migration tree from a second worktree on port 8899 and this branch on 8888, driven by the same Playwright script: five views times two themes times two viewports, 20 screenshots per version, compared per pixel with ImageMagick.
Result after the six fixes above:
Every remaining difference was traced rather than waved through: toast progress bars mid animation, live data (uptime, chart series, console log lines), and one accepted change, a
<select>now inherits the interface font instead of falling back to Arial, which is a fix.Beyond the screenshots:
indent(visible, restored explicitly and commented) andtab(emitted onlytab-size, no effect).npm run eslint: 7 errors, identical tomain. All of them predate this branch and sit insrc/store/console/connection.js../gradlew buildpasses.Checklist
CLAUDE.md./gradlew buildpasses locallyOn the tests box: the dashboard has no test infrastructure at all and this branch does not add one, so the box stays unticked rather than being explained away. The verification above is a screenshot comparison against the previous implementation, which is reproducible but not committed. If visual regression tests in CI are wanted, that is worth its own PR, and this branch would be a good baseline to start from.