Skip to content

feat: fix status display + switch to native client.tui.showToast - #106

Merged
four-bytes-robby merged 1 commit into
mainfrom
feat/105-status-display-native-toast
Jun 8, 2026
Merged

four-bytes-robby merged 1 commit into
mainfrom
feat/105-status-display-native-toast

Conversation

@four-bytes-robby

@four-bytes-robby four-bytes-robby commented Jun 8, 2026 •

Copy link
Copy Markdown
Member

Closes #105

Changes

Status Display Fix

  • TUI handler reordered: specific flags (scanning/searching/ingesting) checked BEFORE generic "busy"
  • StatusOpts now accepts scanning/searching/ingesting boolean flags
  • All updateStatus("busy") calls properly flagged

Display sequence:

State Display
Startup Yellow spinner + initializing...
Scanning Spinner + scanning files... N
Ingest Spinner + ingesting... D/T (X.X%)
Ready Green dot + ready
Searching Spinner + searching...

Native Toast Migration

  • Replaced createToast() wrapper with direct client.tui.showToast() (same pattern as DCP plugin)
  • Server→TUI communication via opencode's internal HTTP API
  • Removed createToast imports from status.ts, four-opencode-brain.ts, auto-capture.ts

Summary by cubic

Fixes the TUI status display so scanning, ingesting, and searching show accurate messages and progress, and migrates toast notifications to native client.tui.showToast. Improves clarity during startup and indexing while removing the createToast wrapper (addresses #105).

  • Bug Fixes

    • Prioritize specific flags (scanning, searching, ingesting) over generic busy in the TUI handler.
    • Added these flags to BrainStatusEvent and StatusOpts for accurate state.
    • Consistent messages: initializing, scanning files... N, ingesting... C/T (X%), searching...
  • Refactors

    • Replaced createToast from @four-bytes/opencode-plugin-lib with client.tui.showToast.
    • Updated status.ts, four-opencode-brain.ts, and auto-capture.ts; server→TUI uses the internal HTTP API.
    • Kept toast() as a thin proxy to client.tui.showToast.

Written for commit 64f3d47. Summary will update on new commits.

Review in cubic

- Status display: scanning/searching/ingesting flags drive TUI handler order
- TUI reorder: specific flags checked before generic busy phase
- Native toasts: client.tui.showToast() replaces createToast() wrapper
- Removed createToast imports from status.ts, four-opencode-brain.ts, auto-capture.ts
- initVersion handles initializing state (removed redundant busy call)
@four-bytes-robby four-bytes-robby self-assigned this Jun 8, 2026
@four-bytes-robby
four-bytes-robby merged commit 2369e31 into main Jun 8, 2026
4 checks passed
@four-bytes-robby
four-bytes-robby deleted the feat/105-status-display-native-toast branch June 8, 2026 13:01
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.

Fix status display + switch to native client.tui.showToast

1 participant