Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add last known good rendering of card in error state to stack item #1834

Merged

Conversation

habdelra
Copy link
Contributor

@habdelra habdelra commented Nov 22, 2024

This PR adds the last known good rendering of a card in an error state for a stack item. In the case there is no last known good HTML, we'll show a generic message.

Note that this does not yet support live updates into and out of an error state. that will come in a subsequent PR.

error

This is the view for a card without a last known good state:

Screenshot from 2024-11-27 13-14-37

Copy link

github-actions bot commented Nov 22, 2024

Host Test Results

    1 files  ±0      1 suites  ±0   19m 59s ⏱️ +36s
688 tests +2  687 ✔️ +2  1 💤 ±0  0 ±0 
693 runs  +2  692 ✔️ +2  1 💤 ±0  0 ±0 

Results for commit af119a7. ± Comparison against base commit 9d3f8f8.

This pull request removes 2 and adds 4 tests. Note that renamed tests count towards both.
Chrome 131.0 ‑ Integration | operator-mode: a 403 from Web Appliction Firewall is handled gracefully when auto-saving
Chrome 131.0 ‑ Integration | operator-mode: opens workspace chooser after closing the only remainingcard on the stack
Chrome 131.0 ‑ Integration | operator-mode: a 403 from Web Application Firewall is handled gracefully when auto-saving
Chrome 131.0 ‑ Integration | operator-mode: it renders a card with an error that has a last known good state
Chrome 131.0 ‑ Integration | operator-mode: it renders a card with an error that has does not have a last known good state
Chrome 131.0 ‑ Integration | operator-mode: opens workspace chooser after closing the only remaining card on the stack

♻️ This comment has been updated with latest results.

@habdelra habdelra marked this pull request as ready for review November 27, 2024 18:57
@habdelra habdelra requested a review from a team November 27, 2024 18:57
@@ -46,6 +46,9 @@ export class StackBackgroundsResource extends Resource<Args> {
}
let bottomMostStackItem = stack[0];
await bottomMostStackItem.ready;
if (bottomMostStackItem.cardError) {
return undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it impossible to know what realm an error doc is from?

Copy link
Contributor Author

@habdelra habdelra Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I’ll look into it. Presumably some realm is returning the error response. Perhaps it’s a header? If so we’ll have to refactor how the stack item calculates the realm, as right now I does so from a running card.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it makes sense for the error doc to carry the realm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in 64e950c

@habdelra habdelra merged commit fca3143 into main Dec 2, 2024
37 checks passed
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.

2 participants