forked from dries/ocman
test(frontend): harden browser storage and wails linting #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/frontend-test-lint-hygiene"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
window.localStorageis missing or throws in non-browser/test environments.src/wailsjs/**from ESLint.Actual issue observed
While validating the stack, frontend tests failed in
SessionDetail.integration.test.tsxwith:TypeError: Cannot read properties of undefined (reading 'removeItem')The failure happened in
saveMessageBookmarks, where the code assumedwindow.localStoragewas always present before checkingremoveItem/setItem.We also had Wails-generated bindings/runtime under
frontend/src/wailsjs/; that directory is configured as Wails' generated JS output inwails.jsonand is already gitignored.What we inferred / assumed
localStorageusers in this PR.frontend/src/wailsjs/is generated Wails output, so handwritten wrappers/helpers should live elsewhere if needed.make testvalidation meaningful for the backend PRs above it.Stack
Base:
main. Next PR:codex/opencode-port-affinity(#4).Validation
Run on
codex/frontend-test-lint-hygiene:cd frontend && pnpm lint— passed.make test— passed (105frontend test files,1276frontend tests).Run on the stack tip after rebasing dependent branches:
make test— passed (105frontend test files,1277frontend tests).Note:
make lintcurrently reaches an unrelated base-branch host-helper check failure ininternal/server/loop_engine.go; this PR does not touch that path.ec8272f83btof32a754653f32a754653to4723ccad954723ccad95to9e7a35fd1b9e7a35fd1bto2da8e976412da8e97641to40ff02caa340ff02caa3to18241024b618241024b6tob9050c646dPull request closed