web: app lifecycle status + machine-readable data attributes on the Apps screen#1660
Open
cliffhall wants to merge 1 commit into
Open
web: app lifecycle status + machine-readable data attributes on the Apps screen#1660cliffhall wants to merge 1 commit into
cliffhall wants to merge 1 commit into
Conversation
…pps screen
AppRenderer:
- New AppRendererStatus ("loading" | "ready" | "error") + onAppStatusChange
callback. Fires "loading" at the start of every (re)build, "ready" on the
view's initialized signal, and "error" on a factory throw/rejection.
AppsScreen:
- appStatus/appError state; handleAppError captures the reason locally and
forwards to the parent onError. resetAppChannels clears both.
- Surfaces the contract as data-testid="apps-form" carrying data-app-status and
data-app-error, renders an error panel (data-testid="apps-error") in place of
the blank frame, and tags the stage button data-testid="apps-stage".
- AppDetailPanel's Open App button gains data-testid="open-app".
App.tsx:
- Wires the bridge factory's onResourceError to a red toast so a malformed/404
UI resource is no longer console-only (the renderer separately drives
data-app-status, so a driver times out on never-reaching-ready and reads it).
Documents the data-testid/data-* automation contract in clients/web/README.md.
Adds AppRenderer status-transition tests and AppsScreen status/error-panel
tests.
Closes #1572
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw
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.
Closes #1572
Exposes the app-renderer lifecycle machine-readably so automated drivers can
waitForSelectorinstead of sleeping (re-implementation of the relevant slice of PR #1510).Changes
AppRenderer
AppRendererStatus(loading|ready|error) +onAppStatusChangecallback. Firesloadingat the start of every (re)build,readyon the view'sinitializedsignal,erroron a factory throw/rejection.AppsScreen
appStatus/appErrorstate;handleAppErrorcaptures the reason locally and forwards to the parentonError.resetAppChannelsclears both.data-testid="apps-form"carryingdata-app-status+data-app-error, renders an error panel (data-testid="apps-error") in place of the blank frame, and tags the stage buttondata-testid="apps-stage".AppDetailPanel's Open App button gainsdata-testid="open-app".App.tsx
onResourceErrorto a red toast so a malformed/404 UI resource is no longer console-only (the renderer separately drivesdata-app-status, so a driver times out on never-reaching-readyand reads the toast).Docs
data-testid/data-*automation contract inclients/web/README.md.Tests
data-app-error+ error panel + parentonErrorforward + clear-on-close.npm run cipasses locally.Stacking
Final PR in the Wave 2 Apps-host stack. Stacked on #1571 (
v2/1571-stage-partial-input). Merge order: #1565 → #1566 → #1567 → #1568 → #1569 → #1570 → #1571 → this.🤖 Generated with Claude Code
https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw