feat(ui): Reconstruction Contract table + retry-handler catch fix - #186
Merged
Conversation
Two changes off current main, salvaged from the superseded #185 (its per-card recommendations.v1 signal already landed via the UI-overhaul series, more richly, as contractEntries): - ReconstructionContractPanel: a collapsible single machine-view of the recommendations.v1 envelope (device · parameter · value · working range · cited measurements) — the verbatim, schema-validated, citation-gated set exported to the asa-ableton .als generator. main pairs the contract per-card; this is the complementary flat table. Built on the CollapsibleCard + DataTable primitives, reusing main's formatContractValue/formatContractRange (no duplicate projection). Renders nothing when the envelope is absent/empty. Mounted after Secret Sauce (V2 only). - Retry-handler catch: handleRetryPitchNoteExtraction / handleRetryInterpretation were try/finally with no catch, so a failed pre-monitor create*Attempt POST (backend down / 4xx) stopped the spinner with no error + an unhandled rejection. Added a guarded catch mirroring handleStartAnalysis + onError's shouldIgnoreRun guard. Verified: npm run lint + build clean; tests/services 830 green. DOM behavior (collapse, retry error banner) covered by the Playwright smoke gate in CI. https://claude.ai/code/session_01YB5QFBLL4nbqPSdtcnxrLy
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.
Off current
main, this lands the two parts of the closed #185 that aren't already onmain. (The per-cardrecommendations.v1signal #185 set out to add already landed via the UI-overhaul series #169–#184 — more richly, as per-cardcontractEntries— so that workstream is dropped.)1. Reconstruction Contract table (
ReconstructionContractPanel.tsx)mainpairs each device card with its contract entry inline (ContractValidatedBadge/ContractEntriesBlock). This adds the complementary single machine-view: a collapsible flat table of the wholerecommendations.v1envelope — Device · Parameter · Value · Working range · Cited measurements — i.e. the exact, schema-validated, citation-gated set exported to theasa-ableton.alsgenerator and thephase2-exportenvelope. Every row carries ≥1 cited measurement by construction.CollapsibleCard+DataTableprimitives; reuses main'sformatContractValue/formatContractRange(no duplicate projection logic).stem_summary) or empty. Mounted after the Secret Sauce section, V2 only.2. Retry-handler catch fix (
App.tsx)handleRetryPitchNoteExtraction/handleRetryInterpretationaretry/finallywith nocatch. The monitor'sonErroronly covers errors surfaced through polling; the awaitedcreate*AttemptPOST runs before the monitor, so a reject (backend down / 4xx) stopped the spinner with no error shown + an unhandled rejection. Added a guardedcatchto both, mirroringhandleStartAnalysisplusonError'sshouldIgnoreRunguard (so an ignored/cancelled run isn't re-surfaced).Verification
npm run lint(tsc) +npm run buildcleantests/services: 830 passed (62 files; main's suite unaffected — the panel is a presentational wrapper over already-tested helpers)Context: #185 was closed as superseded/stale (built 26 commits behind the refactor); this is the clean re-do off
main.https://claude.ai/code/session_01YB5QFBLL4nbqPSdtcnxrLy
🤖 Generated with Claude Code
Generated by Claude Code