Skip to content

feat: add configurable runtime, remote client, and release packaging#3

Merged
Blankeos merged 226 commits into
mainfrom
configuration
Jun 7, 2026
Merged

feat: add configurable runtime, remote client, and release packaging#3
Blankeos merged 226 commits into
mainfrom
configuration

Conversation

@Blankeos

@Blankeos Blankeos commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

This PR is the main CrabCode upgrade branch. It adds the new configuration system, remote client support, richer
agent/tool workflows, model/provider improvements, and release packaging needed to ship installable builds.

Highlights

  • Adds crabcode.jsonc configuration support, schema generation, defaults, and docs
  • Adds remote mode with bundled Solid/Vike remote client UI
  • Adds OpenAI OAuth, Ollama support, model discovery/cache improvements, and reasoning-effort controls
  • Expands tool support, permissions, questions, plans, skills, image handling, and web fetch behavior
  • Improves session management, compaction, persistence, storage, notifications, sounds, and terminal title state
  • Upgrades TUI polish across dialogs, command palette, markdown, diffs, scrolling, selection, and chat rendering
  • Adds npm/install/release plumbing and cargo-dist release workflow

Validation

  • Manual smoke testing
  • cargo fmt --all -- --check
  • cargo test --workspace
  • bun install --frozen-lockfile
  • bun run typecheck
  • bun run build
  • cargo package --allow-dirty --workspace
  • dist plan
  • dist build --print=linkage --output-format=json

Notes

Known follow-ups after merge:

  • Add a dedicated PR CI workflow for fmt/test/typecheck/build
  • Update the yanked keccak v0.1.5 transitive dependency when practical

- Basically when I search and my cursor was previously focused on
  something else. I press down and I kinda expect the cursor to be just
  focus on the first element in the results.

- Secondly, if I search and my cursor was previously focused on
  essentially what I searched i.e. 'gu', and I was focused on "github"
  before, my cursor shouldnt lose focus on "github" and in fact, I could
  move my cursor up or down relative to "github" (right now it
  disappears).. searching 'gu' also shows 'github' or 'gruvbox'.
This replaces the previous character-based estimation with proper
tokenization
using the model-specific tokenizer. The token counter is now initialized
when streaming starts to ensure accurate measurements.

Also adds elapsed time display alongside the existing tokens/second
metric
for better streaming performance feedback.
Implement automatic fallback to bundled MP3 files when no custom sound
is configured. Sounds are materialized to the data directory on first
use and cached for subsequent plays. Only error and complete events have
built-in sounds; permission and question remain opt-in with
user-provided
files.
- Add default sounds for complete/error events with fallback behavior
- Create crabcode.schema.json for editor validation
- Add defaults/ folder with template config and skills README
- Update docs to reflect new sounds behavior and cache locations
- Add .agent folder support plan for cross-tool compatibility
Blankeos added 9 commits June 3, 2026 18:30
Adjust dialog height calculations to include the bottom control gap so the focused entry is not hidden, and update scroll handling to only recompute on height changes. Add a regression test ensuring the last selected reasoning model remains highlighted above controls, and mark the related TODOs as completed in `_plans/__TODOS.md`.
Move duplicated dialog-description formatting into `Model::dialog_description()` and update dialog callsites to use it consistently. Add a regression test ensuring dialog labels no longer include capability text.
…age parts

- add `MessagePart` support and migrate assistant messages to carry ordered `text`/`reasoning`/`tool_call`/`tool_result` segments - persist entire assistant turns with embedded tool parts, including running/interrupted tool state and failure marking - update persistence, remote API serialization, prompt conversion, compaction, and UI rendering to consume part-aware messages correctly - adjust streaming/model conversion and add tests for single-message assistant tool-call/result persistence and provider replay ordering
Use textarea visual-line measurement to detect first/last wrapped row for ArrowUp/ArrowDown history traversal, preventing false triggers when prompts wrap, and make toolPartId explicitly return null when no id/call_id exists.
…implementation

Add the extracted remote client modules (`page-types`, `page-layout`, `thread-view`, `thread-model`, prompt/server/shared utilities, etc.) and reduce `remote-client/src/pages/index/+Page.tsx` to a small entry point. Add favicon assets for docs and client (`favicon.png` copies) and wire icon metadata via `+Layout.tsx` plus `_docs/gittydocs.jsonc`.
The quickstart now stops advertising the `?` shortcut in the getting-started workflow, since command discovery is already covered by the dedicated command documentation link.
…ock layout

- Update remote usage docs to use a default all-interfaces bind, describe the explicit Tailnet-IP bind path, and add VPS-tailnet guidance with security notes. - Add `grid-cols-[minmax(0,1fr)]` to `ComposerDock` to keep the panel group in a single-column grid.
…ests

- drop unused imports and public re-exports across config, persistence, tools, and views - isolate model discovery cache tests with unique temp cache paths to avoid cross-test collisions - sync dialog visible row count with layout changes so scrollbar updates correctly - update model/theme dialog mouse tests to use explicit center-list row offsets - clean session rename dialog imports and simplify prompt history navigation signatures

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a774b3eed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Ok(Self { conn })
// Ensure session_identifier column exists on pre-existing databases
let _ = conn.execute(
"ALTER TABLE sessions ADD COLUMN session_identifier TEXT NOT NULL DEFAULT ''",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Populate identifiers for existing sessions

When upgrading a database that already has migrations version 1, this ALTER TABLE gives every existing session the default empty session_identifier, and nothing later backfills it. SessionManager::load_sessions_from_db uses that value as the in-memory session id and HashMap key, so all legacy sessions collide under "" and only one remains visible/resumable after startup. Backfill existing rows (for example from the numeric id or a generated id) before loading sessions.

Useful? React with 👍 / 👎.

Comment thread build.rs
Comment on lines +23 to +24
if files.is_empty() {
output.push_str(" _ => None,\n");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fail or build assets when remote client dist is missing

In a clean checkout/build where remote-client/dist/client has not already been generated (it is not tracked in git), this branch silently emits an empty asset table. crabcode serve then advertises a browser URL, but GET / resolves to None and returns 404, so the browser remote client is unavailable outside the release workflow. Please either build the client here or fail with an actionable error instead of compiling an empty table.

Useful? React with 👍 / 👎.

Blankeos added 5 commits June 5, 2026 11:45
- Add `/remote` command + command-palette entry that opens a new remote dialog for bind/pin entry. - Add `RemoteDialog` overlay with keyboard/mouse handling, input normalization, validation, and streaming-state guard before launching. - Persist remote launch request on submit and relaunch current binary with `serve --bind/--paircode` after app shutdown. - Group consecutive exploration/task tool messages in chat rendering (including context tool-call/result handling) and add regression tests.
When opening the sessions dialog, select the first item in the current workspace group before fallback focus behavior. Add `select_first_item_in_group` and `select_first_item_in_workspace` helpers to centralize group/item lookup and selection, and update tests to assert selection now targets the current workspace group directly instead of relying on focused group header.
Add generated `textWeak` theme support and use it for input placeholder styling. Update theme resolution to prefer `textWeak` (falling back to `textMuted`), regenerate bundled themes with the new token/diff line tweaks, and keep placeholder text visually distinct from normal text.
…oard navigation

Add Up/Down (and hjkl-style) selection support in the permission dialog, expand the action area into a vertically listed set of labeled radio-style options with per-action descriptions, and adjust layout/help rendering to accommodate the new format.   Add tests covering action rendering and Up/Down movement behavior.
Blankeos added 9 commits June 6, 2026 03:52
…scroll focus

- Drain pending terminal events around terminal mode teardown to prevent stale input from leaking after closing overlays or raw-mode restoration. - Extracted a shared terminal restore path in main and remote guard to reliably disable raw mode and flush terminal commands. - Keep dialog focus aligned with visible content after mouse/keyboard scroll, and preserve visible row count across session dialog refreshes. - Added regression coverage for grouped session wheel scrolling surviving item refresh.
…e labels

Add an explicit `active` field to `DialogItem`, populate it from model/theme/session/connect sources, and render active entries with a left `●` indicator (with active color) while keeping the existing heart tip for favorites.   Also include `active` in dialog search indexing so `active` queries still match without replacing tip text, and update tests for the new behavior.
Add chat rendering for `apply_patch` tool rows by parsing patch text and showing a compact unified diff preview with file description, added/removed counts, and colored line-numbered changes; truncate long previews safely and fall back to output preview when needed.   Add parsing helpers for patch metadata and hunks, and include a unit test for the new render behavior.
- filter terminal key releases to prevent stale Enter releases from submitting newly opened dialogs - enable Kitty-compatible key event reporting flags in local and remote terminal setup - centralize textarea command/shortcut handling in a shared helper module - add line-start/line-end/editing shortcuts (Ctrl+A/Ctrl+E/Ctrl+U, Cmd/Meta+←/→, Cmd/Meta+⌫) across input and dialog textareas
- Parse apply_patch output into file sections with detected language and line numbers for richer preview metadata. - Show per-file diff blocks with optional syntax-colored tokens in the remote chat UI. - Render TUI unified diffs using path-aware syntax highlighting and fallback behavior when line numbers are absent.
Add `notifications.macosBackend` (`macosBackend`/`macos_backend`) to choose between a local `Crabcode Notifier.app` backend (default, using bundled icon) and the legacy `osascript` backend, with fallback to `osascript` on failure.   Propagate backend selection through notification dispatch, add a hidden `--test-notification` CLI path, and include `favicon.png` in packaging for notifier icon generation.   Update docs/schema/tests to match notification behavior and stop processing deprecated top-level `sounds` config.

BREAKING CHANGE: top-level `sounds` config is no longer migrated or applied (it is now ignored).
Blankeos added 3 commits June 8, 2026 00:08
…pters

Add a new `websearch` configuration block (schema, parser, docs, and TODO notes), thread websearch settings through app/main/llm tool initialization, and conditionally register a new `websearch` tool from runtime config.   Implement a provider-driven `websearch` tool with adapters for exa-hosted-mcp, exa, tavily, perplexity, brave, ollama-cloud, serpapi, and keiro, including validation, request handling, result formatting, and tests.
…rkspace in notifications

- Cache model reasoning effort overrides in process-local state loaded once from persisted prefs. - Use the local cache for get/cycle operations and update both cache and prefs when changed. - Extend notification options with an optional workspace name and include it in completion titles. - Add tests for instance-local override behavior and workspace-aware completion notification titles.
- add a new `commandcode` module to fetch provider/models from api.commandcode.ai and normalize model metadata - integrate CommandCode provider injection into model discovery with cached fallback behavior and test-mode short-circuiting - ensure refresh/fetch paths now include internal remote provider unless already present from API - register the new module in `model/mod.rs` and update TODO notes to reflect CommandCode integration completion
@Blankeos Blankeos merged commit 793488b into main Jun 7, 2026
5 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.

1 participant