Skip to content

fix(tui): render console org load errors inline#33040

Merged
rekram1-node merged 1 commit into
devfrom
org-error-boundary
Jun 19, 2026
Merged

fix(tui): render console org load errors inline#33040
rekram1-node merged 1 commit into
devfrom
org-error-boundary

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Problem

The "Switch org" dialog (DialogConsoleOrg) loads orgs via console.listOrgs({}, { throwOnError: true }). On failure the resource rejects and enters an errored state; reading orgs() inside the options/current memos then re-throws, which tears down the dialog instead of showing anything actionable.

This is the same failure class fixed for the move dialog in #32241.

Fix

Catch the failure into a loadError signal so the rejected resource never reaches the memos, and render an inline error inside the dialog instead of crashing. Reuses the emptyView slot added to DialogSelect in #32241:

  • renderFilter={false}, locked, and options={[]} in the error state
  • red bold "Could not load orgs" title + muted error message
  • esc dismisses; the dialog keeps the same shell

No source signal / refetch here, so the load is single-shot: success renders the list, failure renders the inline error.

Testing

  • bun typecheck and bun prettier --check pass from packages/tui.
  • Verified with termctrl using a forced fetch failure: compact inline error in the same dialog shell, filter hidden, esc dismisses cleanly, no crash.

@rekram1-node rekram1-node merged commit e6cdc54 into dev Jun 19, 2026
8 of 11 checks passed
@rekram1-node rekram1-node deleted the org-error-boundary branch June 19, 2026 23:41
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