Commit Graph
349 Commits
Author SHA1 Message Date
pastilhasandClaude Opus 4.8 33a0bb4578 email: store emails.db per account under email_accounts/<account>/
Reorganizes email storage: the DB moves from DATA_PATH/<user>/emails.db to
DATA_PATH/<user>/email_accounts/<accountEmail>/emails.db, with a shared
email_accounts/attachment_cache/ (was Gmail/emails/attachments). openEmailDb now
takes (owner, account); a new openUserEmailDb(owner, userId) resolves the user's
configured account (first enabled) for read paths. Threads the account through
email.ts, accounts, resync, queue sync, channel handlers, and the email_db MCP
tool path. Drops the dead getUserEmailDir helper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 13:34:29 +00:00
pastilhasandClaude Opus 4.8 9271e63eef chat: Browse… modal directory picker for the pwd selector
A "Browse…" entry in the pwd popover opens a simplified file-browser modal
(breadcrumb nav, subfolder list, New folder) that returns an absolute path to use
as the /chat working directory. Built on useFilesAPI within the home root;
dirs outside home stay reachable via the auto-discovered list and free-text field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 12:44:50 +00:00
pastilhasandClaude Opus 4.8 04bde70ed3 chat: pwd selector — switch the /chat working directory
The Sessions panel header gets a pwd selector: the default claude_sessions dir,
plus every directory that already has Claude sessions (auto-discovered by reading
the real cwd back from ~/.claude/projects), plus free-text entry. Switching pwd
refetches the list for that cwd's Claude project group and runs New Chat / resume
in it. Backend: GET /chat/pwds + a ?cwd= param on the session ops; the WS handler
honors a chosen cwd for /chat (default claude_sessions). Browse-modal picker next.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 12:41:49 +00:00
pastilhasandClaude Opus 4.8 420aa08783 chat: run Claude un-isolated for the Super Admin (real HOME, ~/.claude parity)
Single-user platform: the Super Admin's Claude process now uses the real home
(HOME_DIR) instead of DATA_PATH/<email>/home, so its transcript store IS the same
~/.claude the terminal `claude` uses — platform and terminal sessions are
interchangeable (native `/resume` sees them). The session reader resolves the
same home. The generated container CLAUDE.md is no longer written for the Super
Admin (it would pollute the personal global ~/.claude/CLAUDE.md and is stale);
MCP tools still load via --mcp-config, and email/project panels inject their own
prompts. Sandboxed users keep their isolated home.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 12:19:31 +00:00
pastilhasandClaude Opus 4.8 b3b8a59863 chat: rename sessions in Claude's store + delete confirm
Rename appends a {"type":"summary",...} entry to the session's JSONL transcript
(Claude's own format, so the title lives in .claude); the reader takes the last
summary as the title, without a timestamp so it doesn't reorder the list.
PATCH /chat/sessions/:id/title backs it. The list gets inline rename (pencil ->
edit in place) and a two-step delete confirm so a stray click can't nuke a
transcript. Rename verified against a synthetic store.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 12:01:16 +00:00
pastilhasandClaude Opus 4.8 4215c8df0a chat: delete sessions + auto-refresh the /chat list after each turn
DELETE /chat/sessions/:id removes Claude's transcript file; the list gets a
per-row delete button. The list also invalidates on turn-complete so new and
continued sessions surface without a manual refresh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:14:27 +00:00
pastilhasandClaude Opus 4.8 9565cd9462 chat: click-to-resume /chat sessions via Claude --resume
Clicking a session in the list loads its transcript (GET /chat/sessions/:id,
parsed from Claude's JSONL into display messages) and continues the actual Claude
session: a resumeSessionId is threaded chat handler -> send-claude-code -> sidecar
-> claude-manager, which passes --resume <uuid> (in-memory session mapping still
takes precedence for live turns). Parser verified against real transcripts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:11:58 +00:00
pastilhasandClaude Opus 4.8 bea3d0a487 chat: honor the per-session cwd for Super Admin (was hardcoded to home)
claude-manager pinned the spawn cwd to HOST_HOME for Super Admin, ignoring the
cwd passed from the chat handler — so /chat sessions ran in /home/pastilhas
regardless. Now it uses params.cwd when provided (falling back to HOST_HOME),
so /chat actually runs from the dedicated claude_sessions directory.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:04:17 +00:00
pastilhasandClaude Opus 4.8 add5351dc7 chat: list /chat sessions from Claude's store; fix the dedicated-cwd routing
The /chat detail (ChatDetailPanel) now passes context 'chat' to usePiChat, so the
backend actually runs the session from claude_sessions (the earlier tag was on the
wrong component). The left panel (SessionList) now reads GET /chat/sessions —
Claude's own transcripts — instead of the old saved-sessions model. List-only:
rows display title/time/count; click-to-resume comes next.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:50:38 +00:00
pastilhasandClaude Opus 4.8 eb4ce4301b chat: run /chat sessions from the dedicated claude_sessions cwd
The standalone /chat route now tags its context as 'chat'; the backend runs those
sessions with cwd = DATA_PATH/<email>/claude_sessions (created on demand), so their
transcripts form an isolated Claude project group instead of polluting the home-dir
history. Other chat contexts (email/project panels) keep their own cwd.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:43:01 +00:00
pastilhasandClaude Opus 4.8 319cf39e84 chat: read the /chat session list from Claude's own transcript store
First slice of making Claude's session store the source of truth. Adds a reader
(api/chat/claude-sessions.ts) that lists sessions straight from Claude's JSONL
transcripts under $HOME/.claude/projects/<cwd-slug>/, plus GET /chat/sessions
over a dedicated per-user claude_sessions working directory. No bookkeeping
layer — Claude's files are authoritative. Verified against real transcripts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:40:58 +00:00
pastilhasandClaude Opus 4.8 63819fc25e chat: remove Pi runner — route all chat/pipeline/channels through Claude
Stage 1 of removing Pi (Claude-only). Cuts the non-Claude branches in the chat
WS handler, pipeline executor, and channel send-and-await; deletes the Pi
sidecar, its ecosystem entry, pi-bridge, and the Pi model-listing spawn (now a
static Claude tier list). Adds a guard coercing any legacy non-claude-code model
preference to the Claude default so old settings don't break chat or jobs.
Removes the dead no-op session-save REST route and stale Pi docs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:03:44 +00:00
pastilhasandClaude Opus 4.8 fcdf5f0117 todo: email screen multi-view vision (sender/domain management + chat tabs)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 08:48:14 +00:00
pastilhasandClaude Opus 4.8 23862d3ae0 todo: record shipped email work and deferred follow-ups
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 08:39:05 +00:00
pastilhasandClaude Opus 4.8 54965d7095 email: set busy_timeout on the email db to ride out concurrent writers
The API and email sidecar both open emails.db; without a busy timeout a write
overlap (resync, or the thread_id backfill) throws "database is locked" and
500s a request. Wait up to 5s for the other writer instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 08:32:11 +00:00
pastilhasandClaude Opus 4.8 58373c9d59 email: group messages into conversations (Gmail-style threading)
Hybrid grouping via a new thread_id column: new mail threads exactly on
References/In-Reply-To (id is sha1(Message-Id), so a referenced id hashes to
the ancestor's own id); already-synced mail is backfilled with a
normalized-subject + counterpart key. Folder views collapse to one row per
thread with a count badge; the reader shows the thread as a collapsible stack.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 08:21:40 +00:00
pastilhasandClaude Opus 4.8 18d69616d2 compose: rich contenteditable body — inline images land at the caret/drop point
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 08:05:40 +00:00
pastilhasandClaude Opus 4.8 c590d6253c compose: bcc field, inline pasted/dropped images, attach button stays regular
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 07:52:11 +00:00
pastilhasandClaude Opus 4.8 ced1796a56 compose: single close button + attachment support (paste, drag-drop, file picker)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 07:39:27 +00:00
pastilhasandClaude Opus 4.8 ead8f53951 email: compose + reply via Gmail SMTP (app password), with recipient autocomplete
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 07:12:34 +00:00
pastilhasandClaude Opus 4.8 3b13b98532 task modal: scroll the config area so the Run/Queue buttons stay reachable with long track lists
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 06:54:48 +00:00
pastilhasandClaude Opus 4.8 8faa4abcaf todo: mark OR support done; note grouping/in:/relative-dates remaining
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 23:19:38 +00:00
pastilhasandClaude Opus 4.8 03f7bb81cf email: OR support in search (OR-separated branches; mixed FTS/SQL via id-IN subquery)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 23:19:25 +00:00
pastilhasandClaude Opus 4.8 08f5e4561d todo: mark Gmail-style operators done; note OR/grouping as remaining
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 18:24:13 +00:00
pastilhasandClaude Opus 4.8 1791e2e6a1 email: Gmail-style search operators (from:/to:/subject:/body:/has:/is:/label:/before:/after:)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 18:23:53 +00:00
pastilhasandClaude Opus 4.8 066531555b todo: extend email search with Gmail-style operators (from:, subject:, has:attachment, …)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 17:43:37 +00:00
pastilhasandClaude Opus 4.8 1ac2bb59f6 email: keepPreviousData so searching doesn't remount the panel and drop input focus
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 17:40:26 +00:00
pastilhasandClaude Opus 4.8 3f00999a2a email: full-text search (FTS5) — backend index + /email/search + search box in the list
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 17:38:03 +00:00
pastilhasandClaude Opus 4.8 4b08d0b99c email: push new-mail to /email via SSE (IMAP IDLE -> sidecar -> server -> EventSource)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 17:29:20 +00:00
pastilhasandClaude Opus 4.8 5a0b9ce70f email: real-time IMAP IDLE watchers (push on new mail); cron kept as backstop
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 17:22:46 +00:00
pastilhasandClaude Opus 4.8 2bef99866f email: hide the Google OAuth connect card (email uses IMAP app password now)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 17:15:19 +00:00
pastilhasandClaude Opus 4.8 edb68d396d email: route gmail app-password accounts over IMAP (Gmail API only for oauth)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:57:32 +00:00
pastilhasandClaude Opus 4.8 32caa67cab jobs: show target path in list rows; delete queued/finished jobs + clear-all history
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:31:52 +00:00
pastilhasandClaude Opus 4.8 5da29e4004 jobs: split left column into Active + History resizable panels (email-style)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:25:45 +00:00
pastilhasandClaude Opus 4.8 c5d79085cb jobs: Stop now cancels queued jobs; add remove/stop button on list rows
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:14:49 +00:00
pastilhasandClaude Opus 4.8 a4b56a3b6e jobs: make header indicators readable when idle (solid pills, full-opacity text)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:01:46 +00:00
pastilhasandClaude Opus 4.8 99293b0b49 jobs: after creating a job, show a View/Close confirmation instead of navigating away
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:57:42 +00:00
pastilhasandClaude Opus 4.8 39a235197c jobs: default config to {} — config-less script tasks failed the NOT NULL insert
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:54:23 +00:00
pastilhasandClaude Opus 4.8 f77ce3fb96 jobs: header running/queued badges + GET /jobs/counts (phase 3d)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:48:52 +00:00
pastilhasandClaude Opus 4.8 c277ceead7 jobs: split list into Running & Queued (top) and History (bottom, 70/30)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:42:15 +00:00
pastilhasandClaude Opus 4.8 ba2c2e57ca jobs: modal creates jobs for non-inline tasks (Run/Queue -> POST /jobs -> /jobs/:id)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:35:24 +00:00
pastilhasandClaude Opus 4.8 1f57d8c8d2 jobs: master-detail JobsPage (list + detail, resizable) for /jobs and /jobs/:id
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:24:54 +00:00
pastilhasandClaude Opus 4.8 56531aedb7 doc: header running + queued job indicators (3d)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 14:42:30 +00:00
pastilhasandClaude Opus 4.8 ae361d2a2f tasks: inline flag (quick tasks stay in the modal) plumbed through parser + endpoints
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 14:33:08 +00:00
pastilhasandClaude Opus 4.8 46dc6ce507 jobs: script-job terminal view at /jobs/:id (phase 3a)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 14:04:08 +00:00
pastilhasandClaude Opus 4.8 6d7d928806 jobs: queue scheduler + REST job API (phase 1c + 2)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:58:42 +00:00
pastilhasandClaude Opus 4.8 234a24ddaf jobs: run script tasks as background jobs via executeScript (phase 1b)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:42:57 +00:00
pastilhasandClaude Opus 4.8 843580afff jobs: add mode and exit_code columns (phase 1a)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:38:05 +00:00
pastilhasandClaude Opus 4.8 4a5fa89185 add jobs-unification design doc
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:35:45 +00:00
pastilhasandClaude Opus 4.8 71dfd394c3 subtitles default to all-unchecked; connect the keep-checkbox label
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:35:45 +00:00