Feat/ctx desktop#110
Draft
hamzaerbay wants to merge 15 commits into
Draft
Conversation
Tauri 2 + React + TS + Tailwind v4 in ctx-desktop/. Rust adapter shells out to ctx via std::process::Command (no shell plugin); TS adapter mirrors the CLI JSON schemas. Overview screen detects the ctx binary and shows live task/decision/learning counts plus status totals, degrading gracefully when a command is missing. Run: cd ctx-desktop && npm install && npm run tauri dev Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
Left-nav routing with a shared project path/version top bar. Tasks screen lists entries with status filter, inline add (ctx task add, provenance synthesized from git in the Rust adapter), and one-click complete. Overview now takes the dir as a prop from the shell. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
Searchable list of decisions with expandable context/rationale/ consequence, plus a three-field authoring form wired to ctx decision add (provenance synthesized from git). Registered the decisions view in the nav shell. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
Searchable list of learnings with expandable context/lesson/ application, plus a quick-add form wired to ctx learning add (provenance synthesized from git). Registered in the nav shell. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
The differentiator: a debounced budget slider re-runs ctx agent --format json, with a used/budget bar and per-section included/dropped affordance. Copy packet (markdown via ctx agent --budget N) and copy command actions. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
Journal screen renders ctx journal source verbatim (no journal JSON mode upstream yet) with a limit selector. Top bar gains a doctor health pill (ok/warn/error from ctx doctor --json) that tracks the active project. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
Top bar gains a native folder picker (tauri-plugin-dialog) and a recent-projects dropdown persisted in localStorage. Selecting or picking a project repoints every screen and the health pill. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
Rust watcher (notify) on the active <dir>/.context emits a ctx-changed event; a debounced frontend hook bumps a reload key that every screen depends on. The GUI is one writer among several (human CLI + AI agents) and no longer shows stale state. Completes the P0 GUI surface. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
Two decisions (std::process::Command over tauri-plugin-shell; journal rendered verbatim pending journal --json) and two learnings (Tauri 2 needs rustc >= 1.88; macOS GUI PATH must be augmented to find a user-installed ctx). Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
Choose a workspace folder; a depth-bounded Rust walk (discover_projects, skips node_modules/target/.git, caps at 200) finds every dir with a .context/ and populates a project dropdown. Switching repoints all screens, the health pill, and the watcher. Workspace + active project persist in localStorage; the manual path field stays as a fallback. Unit-tested. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
The workspace switcher supersedes the manual path input + Open button, so they are removed. Project dropdown and Workspace button share a uniform h-8 height, with a spacer pushing the health and version pills to the right. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
Projects with Phase sections require ctx task add --section. The Tasks form now has a section field (datalist of existing sections, defaults to Misc) and passes it through, fixing the "task requires --section flag" error. Section persists across adds for batch entry into one phase. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
Complete now passes the task's 1-based pending-order number (computed locally to match ctx) instead of its text, fixing the "multiple tasks match" error on duplicate-text tasks. The doctor pill gains a hover tooltip listing the actual warning/error messages (filtered to warning/error, matching the count). Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
New Health screen lists every ctx doctor check, highlights warnings/errors, and offers guided fixes: inspect drift, auto-fix drift (ctx drift --fix), and compact/archive (ctx compact --archive) behind an inline confirm, with command output shown. The top-bar doctor pill is now clickable through to it. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
Replace the Tauri stub README with prerequisites, setup, dev and production build commands, the ctx list --json CLI dependency, architecture overview, and troubleshooting notes. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com>
hamzaerbay
added a commit
to hamzaerbay/ctx
that referenced
this pull request
May 31, 2026
…ktop tasks Capture the 7 confirmed findings from the security/performance/ scalability review of ctx Desktop as actionable tasks so the follow-up work survives across sessions. Two merge-blockers (argument injection via missing -- separator, hardcoded personal DEFAULT_DIR) plus CSP hardening and four caching/watcher efficiency items. Spec: specs/ctx-desktop.md Signed-off-by: hamzaerbay <hamzaerbay@gmail.com> Co-Authored-By: Claude Opus 4.8 <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
Adds ctx Desktop (
ctx-desktop/), a cross-platform desktop GUI client forctx— a calm, local-first window into a project's persistent AI context. It is a thin client over thectxCLI: every read/write shells out toctx, so.context/stays the source of truth. Stack: Tauri 2 + React + TypeScript + Tailwind v4.Screens (P0)
ctx agent --format json, live preview with per-section included/dropped, copy packet / copy commandctx journal source)ctx doctorcheck with guided fixes (inspect drift,ctx drift --fix,ctx compact --archive) behind a confirmPlatform
.context/project and fills a dropdownArchitecture
ctxaccess funnels throughsrc-tauri/src/ctx_adapter.rs(Rust) +src/adapter/ctx.ts(TS).ctxviastd::process::Command(no shell plugin); writes synthesize provenance (--session-id,--branch/--commitfrom git).discover.rs(workspace scan, unit-tested) andwatcher.rs(fs-watch vianotify).Dependency note
List/count views call
ctx <artifact> list --json(added onfeat/ctx-artifact-list-json, not yet released). Authoring, Context Packet, Journal, and Health work on stockctx0.8.1.Docs & spec
ctx-desktop/README.md· Design spec:specs/ctx-desktop.mdTest plan
cd ctx-desktop && npm install && npm run tauri devlauncheslist --jsonctx installed, list/count views populate