Repository navigation
fix(web): unify API fetch, add error boundaries and route splitting, and clean types - #1854
Merged
Merged
Conversation
The credentials helper showed the server's text only when it was short, so a proxy's HTML error page fell back to the status line. The shared helper lost that cap and showed any body in full. Trim the detail and use the status line when it is empty or longer than 300 characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ttyd starts a new shell for each connection. An automatic reconnect keeps the old screen, so the new prompt appeared below the output of a shell that no longer exists. Write a dim marker line where the new shell starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st facts Review pass over the files this change touched: - base.ts: the header lost what a split-host deployment needs (the injected origin, TRUSTED_ORIGINS, the shared cookie domain). State it again in a short form. - useHarnessEnv, SpecShellPage: apiFetch already sends the JSON Accept header, so remove the copies. - router.tsx, AutomationEditor, useApps, useIntegrations: move the new imports into the import block (one sat above the file header). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening the shell resumes an idle session. The work pane keeps the terminal mounted when it is hidden, so an automatic reconnect from a hidden pane could resume a session that was just evicted. A drop while hidden now waits, and the pane reconnects when it is shown again, with the same retry budget. A retry that is pending when the pane is hidden also waits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Improves
web/reliability, bundle splitting, API consistency, and type safety:request<T>helpers (all of which clobberedAccept: application/jsonwheninit.headerswas passed) and ad-hocfetchcalls with a singleapi-fetch.tshelper respectingAPI_CREDENTIALS, plus a shareduseAuthConfig()hook. An error message is the server's text when it is short (300 characters or fewer), else the status line, as the credentials helper did. A 204 resolves toundefinedfor every caller.ErrorBoundarywrapping the app and heavy interactive panes (keyed by session, spec, or automation so a new page starts clean), and configuresdefaultErrorComponentanddefaultNotFoundComponenton TanStack Router.lazyRouteComponent(layout routes, the start screen, and the login page stay in the main bundle).lazyRouteComponentreloads the page once when a chunk is missing after a deploy.TerminalPane. A normal close, a refusal, or unmount does not reconnect. ttyd starts a new shell for each connection, so the pane writes a marker line where the new shell starts. Removesanyescapes inRegistriesPanel.tsxanduseEnableJobs.ts, and deletes stale trackedweb/bun.lock.Behavior note
Opening the shell resumes an idle session and pins it against idle eviction (coordinator
ShellRelay). The work pane keeps the terminal mounted while it is hidden, so the terminal reconnects only while it is shown: a drop while the shell tab or the pane is hidden waits, and the terminal reconnects when it is shown again, with the same retry budget. A hidden tab never resumes an evicted session. A drop while the terminal is shown reconnects after the backoff, at most 5 times.Validation
pnpm format:check: passed.pnpm lint: passed.pnpm test: passed (one unrelated Mermaid render test timed out under machine load and passes alone).pnpm build: passed with separate chunks emitted for the lazy routes.🤖 Generated with Claude Code