Repository navigation
Drag threads into the composer, a Watching section for PR-waiting threads, and run-once automations - #1813
Conversation
Dropping a thread row (the same application/x-solenta-thread payload ThreadCard's dragstart already sets for detach-to-window and the #1769 reorder) onto the composer now adds the same thread context chip the @-mention menu's thread row would, instead of falling through to the file-drop path. Own-thread and already-chipped drops are no-ops, and the composer's existing drop overlay shows while the drag hovers. useFileDrop gets an onThreadDrop option checked before the OS-file path, mirroring the #1794 onMentionPath pattern. dropFiles.ts exports THREAD_DRAG_MIME/isThreadDrag so ThreadCard, useFileDrop, and tests share one constant instead of a duplicated string literal. Sidebar search results render through the same ThreadCard component as the rest of the list, so they were already covered by the dragstart change with no extra wiring. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Idle, unpinned, unsnoozed, unsettled threads with an active PR watch (prWatch !== false, open PR) now carve out of the inbox into their own "Watching · N" shelf, below the active rows and above Snoozed. A wake makes the thread working, which routes it to the Working shelf instead, so it leaves Watching on its own. Collapsed state persists the same way as the other shelves. Rows show "Watching #123" in the status line via a new isWatchingPr helper reused by both sidebarGroups and status.ts. No IPC changes needed: prWatch/prWatchState/prNumber/prState already reach the renderer's ThreadInfo unstripped by services-threads.js listRow. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Grouping precedence (idle+watched -> Watching, working/pinned/snoozed override it, prWatch:false and closed/merged PRs keep threads out), collapsed-by-default state, the "Watching #123" status text, and flatVisibleThreadIds/nextThreadAfterSettle keyboard-order parity. Two pre-existing sidebar.test.tsx fixtures (card anatomy, PR hover card) used an idle thread with an open PR purely to test PR badge rendering; they now default into the new Watching shelf like any real thread would, so mark them prWatch: false to keep testing what they were meant to test. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Adds a single-fire schedule alongside hourly/daily/weekly/cron: preset "once" with a future local-time runAt. The scheduler fires it at or after runAt (within a 24h grace window if the app was closed, otherwise marks it missed) and then disables it with lastRunAt stamped, so it never fires twice. Validation rejects a past runAt on create, and on edit only when runAt itself is being set (editing an already-fired row otherwise must not re-litigate a timestamp that is now, correctly, in the past). Threaded through: solenta.json shared-automation rows and their hash, store migration healing, the automations IPC/service layer, the automation_create MCP tool schema + description, and the Automations UI (schedule picker, datetime-local input with min = now + 1 minute, and row labels: "Once · <time>", "Ran once", "Missed"). Co-Authored-By: Claude Sonnet 5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47993206ee
ℹ️ 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".
| if (isThreadDrag(e.dataTransfer)) { | ||
| if (!onThreadDropRef.current) return; | ||
| e.preventDefault(); | ||
| if (e.dataTransfer) e.dataTransfer.dropEffect = "copy"; |
There was a problem hiding this comment.
Use a drop effect allowed by the sidebar drag source
When dragging an actual sidebar thread onto the composer, ThreadCard sets dataTransfer.effectAllowed = "move", but this handler requests dropEffect = "copy". Since copying is not permitted by the source, the browser rejects the drop and never delivers the event that inserts the context chip. Use a compatible effect here or allow copying at the source while preserving reordering. The new tests dispatch synthetic drop events directly, so they bypass this browser negotiation.
Useful? React with 👍 / 👎.
| if (input.preset === "once" && !input.event) { | ||
| const raw = (input.runAt ?? "").trim(); | ||
| if (!raw) return "Run time is required"; | ||
| const t = new Date(raw).getTime(); | ||
| if (Number.isNaN(t)) return "Run time is not a valid date"; | ||
| if (t <= Date.now()) return "Run time must be in the future"; |
There was a problem hiding this comment.
Allow unchanged past run times when editing once automations
After a once automation has fired or been marked missed, editing its name, prompt, memory, or stage cannot be saved: the edit form retains the original runAt, and this unconditional future check rejects it. The new input's min constraint also blocks native submission, and the edit payload always includes runAt, causing the backend to reject it as an explicitly supplied past time as well. Distinguish creating or rescheduling from editing other fields, allow an unchanged past instant through the form, and omit it from the update payload.
Useful? React with 👍 / 👎.
Three small additions for running many threads: drag a thread into another as context, a quieter sidebar for threads that are only waiting on a PR, and automations that run once.
Drag a thread into the composer (#1810)
"Watching" sidebar section (#1811)
Run an automation once (#1812)
automation_createtool, which now acceptsrunAt.Checks (run locally on the merged branch, electron suite in a CI-matching environment)
npm run typecheckand the preload sync check: cleannpm run test:renderer: 3761 pass, 0 failnpm run test:electron: 5577 pass, 0 failnpm run test:core: 38 pass.npm run test:memory: 246 pass.npx vite build: succeedsCloses #1810, closes #1811, closes #1812.
🤖 Generated with Claude Code