This repository was archived by the owner on May 18, 2026. It is now read-only.
fix(sets): parts-error dark-mode text + polling test coverage#232
Open
Goosterhof wants to merge 1 commit into
Open
fix(sets): parts-error dark-mode text + polling test coverage#232Goosterhof wants to merge 1 commit into
Goosterhof wants to merge 1 commit into
Conversation
The parts-error block introduced in the polling feature used bg="brick-red-light" (a static #F8D0CF hex) with no explicit text color, so in dark mode the inherited --brick-page-text (light gray) rendered near-invisible against the light-pink background. Add text="brick-ink" to force readable black text on that surface in both themes, consistent with how other light-bg/forced-dark-text pairs work in the design system (e.g. focused form inputs use focus:text-brick-ink). Also adds four unit tests that were missing for the loadParts() polling logic introduced in da6344d: disabled-button-while-in-flight, sync-message-during-poll, parts-resolved-after-poll, timeout-after-max-attempts, and hard-failure. Pages are excluded from the Istanbul coverage scope, so the 100% metric did not catch the gap. Tests use vi.useFakeTimers() to drive the 2s poll interval without real-time waits. https://claude.ai/code/session_01TzyjXD9NFTqHie3RECxqit
Deploying lego-storage-frontend with
|
| Latest commit: |
ae41e23
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d3ce97b2.lego-storage-frontend.pages.dev |
| Branch Preview URL: | https://claude-charming-newton-yofxk.lego-storage-frontend.pages.dev |
Deploying brick-inventory-showcase with
|
| Latest commit: |
ae41e23
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7fcdde8a.brick-inventory-showcase.pages.dev |
| Branch Preview URL: | https://claude-charming-newton-yofxk.brick-inventory-showcase.pages.dev |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Review of last 24 h commits (da6344d · c01c909 · f740da1 · 70fcafe)
This PR fixes two issues surfaced during review of the commits merged in the past 24 hours.
Commits reviewed
da6344dc01c909f740da170fcafeFinding 1 — parts-error block: near-invisible text in dark mode
da6344dadded aparts-errorblock toSetDetailPage.vue:brick-red-lightis a static hex (#F8D0CF) defined inuno.config.ts— it does not adapt to theme. With no explicit text color on the<p>, the element inherits--brick-page-text, which is light gray (~#e2e2e2) in dark mode. Light gray on light pink is near-invisible.The dark-mode fix commit (
c01c909) did not touch this block because it was added to a different branch after the dark-mode permit was scoped. The follow-up permit audit listedSetDetailPage.vue:417(the missing-parts rows) but theparts-errorblock at line 354 was not on any audit list.Fix:
text="brick-ink"forces#000000on the error paragraph in both themes — same pattern the form inputs use withfocus:text-brick-inkwhen they flip to a yellow background.Finding 2 — polling logic in
loadParts()has no behavioral testsda6344dadded significant new branches toloadParts():PartsSyncPendingvsSetWithPartsresponse shapespartsError = syncTimeout)partsError = syncFailed)None of these paths had unit or integration test coverage. The 100% Istanbul metric did not flag the gap because
src/apps/**/pages/**is explicitly excluded from the coverage scope (pages are verified via integration tests, not Istanbul). The integration test suite has no scenarios for pending/timeout/failure responses.Fix: Four new unit tests using
vi.useFakeTimers()to drive the 2 s poll interval:should disable load parts button while a request is in flightpartsLoadingdisables the button before the first response arrivesshould show sync message then display parts after polling resolvesshould show a timeout error after exhausting all poll attemptssyncTimeouterror blockshould show a failure error when the parts request throwssyncFailederror blockFindings not fixed here (out of scope / pre-existing)
bg="brick-red-light"on the missing-parts rows (line 419) and availability badge (line 506) inSetDetailPage.vue— these are pre-existing and already logged in the dark-mode construction journal as follow-up candidates. No--brick-surface-dangertoken exists yet; fixing them properly requires a new permit.bg="red-100",bg="yellow-300",bg="red-200"inAddSetPage,PartsMissingPage,PartsPage,PartsUnsortedPage— also in the dark-mode journal's follow-up list.src/apps/**/pages/**exclusion from Istanbul coverage — this is intentional per the project's coverage strategy and is not a defect.Gauntlet
format:check·lint·lint:vue·type-check·test:coverage100% (1385/1385 tests) ·knip·build— all pass.Generated by Claude Code