Skip to content

feat: error boundary, UI state flush fix, design system polish, swarm… - #5

Open
carson24wilson-cmyk wants to merge 1 commit into
hesamsheikh:mainfrom
carson24wilson-cmyk:improvements/error-boundary-ui-fixes-design-polish
Open

carson24wilson-cmyk wants to merge 1 commit into
hesamsheikh:mainfrom
carson24wilson-cmyk:improvements/error-boundary-ui-fixes-design-polish

Conversation

@carson24wilson-cmyk

Copy link
Copy Markdown

… prompt escalation

Web

  • Add ErrorBoundary class component wrapping PrimaryViewRouter so a single crashing view can never white-screen the entire shell. Includes styled recovery panel with error message and "Try again" reset button.

  • Fix UI state loss on tab close: add a beforeunload listener in usePersistedUiState that fires navigator.sendBeacon with any pending state that hasn't been flushed through the 250 ms debounce yet.

Design system

  • Upgrade console-theme-tokens.css with a refined deep navy-black palette, multi-layer body gradient, new --accent-glow, --term-red-glow, and --term-green-glow tokens, thinner 6 px scrollbars, ::selection and :focus-visible polish, and global button transition defaults.

  • Add glow box-shadows to live/processing (green) and blocked (red) status badges in terminal-and-status.css. Selected terminal header gains an inset top highlight for active depth.

  • Upgrade chrome-and-buttons.css: nav chrome gets a subtle inset highlight; dropdown menus get a richer multi-layer box-shadow.

  • Add error boundary panel styles to foundation.css.

Prompts

  • Extend swarm-parent.md with a Timeout and Escalation Protocol (5-step: ping → inspect → targeted guidance → ABORT → proceed with done work) and two additional failure modes (infinite waiting, taking over a worker's task).

Dev tooling

  • Add scripts/dev-preview.sh wrapper that exports the full nvm PATH before launching node scripts/dev.mjs, enabling the Claude preview server to start the full dev stack without PATH issues.

… prompt escalation

## Web

- Add `ErrorBoundary` class component wrapping `PrimaryViewRouter` so a
  single crashing view can never white-screen the entire shell. Includes
  styled recovery panel with error message and "Try again" reset button.

- Fix UI state loss on tab close: add a `beforeunload` listener in
  `usePersistedUiState` that fires `navigator.sendBeacon` with any
  pending state that hasn't been flushed through the 250 ms debounce
  yet.

## Design system

- Upgrade `console-theme-tokens.css` with a refined deep navy-black
  palette, multi-layer body gradient, new `--accent-glow`,
  `--term-red-glow`, and `--term-green-glow` tokens, thinner 6 px
  scrollbars, `::selection` and `:focus-visible` polish, and global
  button transition defaults.

- Add glow box-shadows to live/processing (green) and blocked (red)
  status badges in `terminal-and-status.css`. Selected terminal header
  gains an inset top highlight for active depth.

- Upgrade `chrome-and-buttons.css`: nav chrome gets a subtle inset
  highlight; dropdown menus get a richer multi-layer box-shadow.

- Add error boundary panel styles to `foundation.css`.

## Prompts

- Extend `swarm-parent.md` with a **Timeout and Escalation Protocol**
  (5-step: ping → inspect → targeted guidance → ABORT → proceed with
  done work) and two additional failure modes (infinite waiting, taking
  over a worker's task).

## Dev tooling

- Add `scripts/dev-preview.sh` wrapper that exports the full nvm PATH
  before launching `node scripts/dev.mjs`, enabling the Claude preview
  server to start the full dev stack without PATH issues.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
KomalSrinivasan added a commit to KomalSrinivasan/octogent that referenced this pull request Apr 17, 2026
Address feedback from issue hesamsheikh#6 by adding terminal deletion commands and improving remote access configuration for headless server deployments.

Changes:
- Fix hardcoded 127.0.0.1 binding: when OCTOGENT_ALLOW_REMOTE_ACCESS=1 is set, bind to 0.0.0.0 instead of 127.0.0.1
- Add terminal lifecycle CLI commands:
  - octogent terminal delete <terminal-id>
  - Aliases: stop, kill (for operator convenience)
- Update CLI documentation with:
  - Environment variables reference (HOST, OCTOGENT_ALLOW_REMOTE_ACCESS, etc.)
  - Examples for headless server configuration
  - Terminal delete command usage

Technical details:
- Leverage existing DELETE /api/terminals/:id endpoint
- Proper error handling for 404 (not found) and 409 (conflict) responses
- HOST environment variable takes precedence over OCTOGENT_ALLOW_REMOTE_ACCESS
- All 144 tests pass
- Zero linting errors

Addresses hesamsheikh#6 items hesamsheikh#4 and hesamsheikh#5
Chang-Tao pushed a commit to Chang-Tao/octogent that referenced this pull request Aug 30, 2026
…te flush

Ports two reliability features from upstream PR hesamsheikh#5, re-implemented
against current main (the PR itself conflicts with the zh-CN commit
in App.tsx; its theme/styling redesign is intentionally not taken):

- ErrorBoundary class component wrapping PrimaryViewRouter so a
  render error in one view cannot white-screen the whole shell.
  Fallback copy goes through the i18n catalog (en + zh-CN entries
  added) instead of the upstream hard-coded English strings.
- usePersistedUiState now tracks the pending debounced snapshot and
  flushes it on beforeunload. Deviation from upstream: the flush
  uses fetch with keepalive:true and PATCH instead of
  navigator.sendBeacon — sendBeacon can only POST, and the
  /api/ui-state route rejects POST with 405, so the upstream beacon
  never actually persisted anything.

Based on upstream PR hesamsheikh#5 by @carson24wilson-cmyk
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