Skip to content

fix(web): guard request-status-card against undefined deployRequest#735

Open
benhegartysefe wants to merge 1 commit into
mainfrom
fix/request-status-card-deployrequest-undefined
Open

fix(web): guard request-status-card against undefined deployRequest#735
benhegartysefe wants to merge 1 commit into
mainfrom
fix/request-status-card-deployrequest-undefined

Conversation

@benhegartysefe

Copy link
Copy Markdown
Contributor

Problem

The Monitor result page throws a console error on load:

Uncaught (in promise) TypeError: can't access property "Log", this.deployRequest is undefined
    render index-...js:16840

Root cause — a render race

page-monitor-result.ts kicks off three parallel subscriptions (request status, result statuses, attempts) and flips loading to false in each subscription's complete callback. The result-statuses and attempts calls routinely finish before the request call — visible in the console ordering (done loading result Statuses / done loading attempts arrive before done loading request). So <request-status-card> renders while deployRequest is still undefined.

request-status-card.ts then read this.deployRequest.Log (line 158) without optional chaining — the one access in the file that didn't use ?. — and threw, aborting the render. The <request-controls> bindings (lines 308–321) had the same unguarded pattern and would have thrown next once line 158 was fixed.

Fix

Add optional chaining to every deployRequest access in the render path, matching the convention already used throughout the rest of the file. The card now renders harmlessly until the request data arrives and the component self-heals on the next update.

  • Cosmetic-but-noisy: the card eventually recovered, but the exception spammed the console and aborted a render pass on every load.
  • npx tsc --noEmit is clean.

Scope

request-status-card.ts only — diff-local, no behavioural change once data is loaded.

🤖 Generated with Claude Code

The monitor-result page flips `loading` to false as soon as any of its
three parallel subscriptions completes; the result-statuses and attempts
calls routinely finish before the request call, so request-status-card
renders while `deployRequest` is still undefined. Line 158 read
`deployRequest.Log` without optional chaining and threw
"can't access property Log, this.deployRequest is undefined", aborting
the render. The request-controls bindings had the same unguarded pattern
and would have thrown next.

Add optional chaining to all deployRequest accesses in the render path,
matching the rest of the file. Card now renders harmlessly until data
loads. Typecheck clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 8fd2600. ± Comparison against base commit 0f8f087.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant