Repository navigation
Conversation
Node 24 exposes localStorage/sessionStorage getters that resolve to undefined without --localstorage-file, and jsdom's populateGlobal does not override existing globals, so all Storage-based specs failed. Point the globals at the jsdom window in a vitest setup file and pin the jsdom URL. Raise metadata text from quiet gray to muted gray, lift the 11px metadata to the 12px floor, grow mobile zoom and send/stop controls to 44px, and include the current scale in the zoom control's accessible name.
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.
Problem
NODE_OPTIONSworkarounds: 57 of 340 specs die withTypeError: Cannot read properties of undefined (reading 'setItem').DESIGN.md: metadata usestext-gray-400(#9ca3af, 2.6:1 on white), metadata text is 11px, mobile controls are 28–32px, and the canvas zoom control's accessible name never matches the percentage it shows.Cause
Node 24 defines
localStorage/sessionStorageaccessors onglobalThisthat resolve toundefinedunless--localstorage-fileis passed. jsdom'spopulateGlobalonly fills in globals that are absent, so the broken Node accessors shadow the realStorageinstances on the jsdom window.Changes
ui/vitest.setup.tsto re-pointlocalStorage/sessionStorageatglobalThis.jsdom.window, guarded so a missing jsdom window is a no-op. Register it fromui/vitest.config.tsand pin the jsdom URL so storage has a non-opaque origin.gray-400togray-500across page cards, preview placeholders, preset groups, import help, and the archive dropzone. The remaininggray-400usages are decorative icons only.PageCard.mdbreakpoint; desktop sizes are unchanged.Reproduction
Node 24.22.3,
NODE_OPTIONSunset:Before:
Test Files 3 failed | 28 passed (31),Tests 57 failed | 283 passed (340).After:
Test Files 31 passed (31),Tests 340 passed (340).Validation
pnpm --dir ui type-check— no errors.pnpm --dir ui test:unit --run— 340 passed,NODE_OPTIONSempty.pnpm --dir ui build— succeeds, only the pre-existing chunk-size warning.bash gradlew haloServer, plugin in dev mode), measured in the browser at 1440px and 375px: metadata renders at 12px#6b7280; zoom buttons are 28×28 at 1440px and 44×44 at 375px; send is 32×32 at 1440px and 44×44 at 375px; the zoom control's accessible name reads适应画布,当前 27%.Reviewer note
The run-status and theme-warning badges move from 11px to 12px.
DESIGN.mdallows 10–11px for badges specifically; this trades that exception for the 12px floor. Revert those two classes if the badge spec should win.Screenshots
Captured from the isolated instance at 1440×900 and 375×812.
Page list, metadata in muted gray at 12px:
Create screen, preset group labels and the manual-create/import links:
Workbench at 1440px, zoom control unchanged at 28px:
Canvas at 375px, zoom buttons at 44px with the scale in the accessible name:
Composer at 375px, send at 44px:
The instance ships AI Foundation 1.0.0, below the 1.1.1 this plugin requires, so the composer and preset chips render in their disabled state and no generation flow is shown. Everything else above is the real packaged plugin UI.