Home says you are needed only when you are, and mobile opens what was said - #154
Home says you are needed only when you are, and mobile opens what was said#154vincelwt wants to merge 3 commits into
Conversation
A notification about something said to you opened the run's activity log instead of the conversation, so Home led to lifecycle events and tool calls rather than the task and its discussion. It now opens where it was said, the way the desktop already did. Settings, agents, automations, members and the workspace switcher went with the More tab; the tab is back and the Home header loses its duplicate. A scroll view that adjusts its content automatically already clears the status bar on iOS, so a screen drawing its own title row was paying the top inset twice. Two bottom-anchored screens keep an opaque bar for the same reason. Naming an agent on a closed task answered with an error and a chore. The relay reopens the task itself: only a person can, and a person just did.
A task closing cancels its open asks in SQL, and the Inbox sweep that runs beside it deliberately skips ask items, so every task ever closed over one left a permanent "Needs you" row. The migration from the old review status left one on PW-102: an item pointing at an ask that was cancelled hours ago, with a task working away underneath it. An ask row is now only read back while the ask behind it is open. That covers every way an ask can close — answered, cancelled with its run, superseded, or ended by the task closing under it — instead of asking four paths to remember, and retires the migrated rows that never had an ask at all. Opening an ask by task key stored the key. `task_by_ref` resolved it for the checks and then threw the answer away, so `patchwork task ask PW-102` hung the ask off no task: no card, no derived status, nothing to answer it from.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a556c73a89
ℹ️ 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".
| let addressed = reply_agent.is_some() | ||
| || members.iter().any(|member| { | ||
| member.kind == MemberKind::Agent && message.mentions.contains(&member.id) | ||
| }); |
There was a problem hiding this comment.
Reopen only when the addressed agent can run
When a mentioned agent has Participation::Off for this task channel, this predicate still reopens a done or canceled task, but the later should_run check rejects that agent, leaving the task silently changed to planned with no run started and potentially firing task-status automations. Apply the same participation eligibility before reopening, or reopen only once an agent is actually selected to run.
Useful? React with 👍 / 👎.
Six things Vince hit on the v0.3.0 build.
Home said "Needs you" while the task was working
PW-102 is ready for review — Needs yousat in Home over a task that was running and needed nobody. Two causes, both in the relay:An ask item outlived its ask. Closing a task cancels its open asks in SQL (
write_task_fields), and the Inbox sweep next to it explicitly skipskind = 'ask'rows — so every task ever closed over an open ask left a permanent "Needs you". The migration off the old review status left exactly one on PW-102, pointing at an ask cancelled two hours earlier and carrying nomessage_idat all, which meant nothing could ever clear it. An ask row is now only read back while its ask is open. That covers every close path — answered, cancelled with its run, superseded, task closed underneath it — rather than asking four of them to remember, and retires the migrated rows too.An ask opened by task key belonged to no task.
POST /api/asksresolved"PW-102"throughtask_by_reffor its checks and then passed the raw reference on, sopatchwork task ask PW-102wrote an ask withtask_id = "PW-102". It never attached: no card on the board, no derived status, nothing to answer it from — and the task showed under In flight while its own review ask hung in the Inbox. It now hangs off what the reference resolved to.Mobile
A notification opened a run's activity log. Home ranked
run_idabovechannel_id, so a DM or a mention landed on lifecycle events, tool calls and runtime badges instead of the conversation. It now opens the task, then the conversation, then the automation, and only falls back to the run, matching the desktop.Settings disappeared. Agents, automations, members, settings and the workspace switcher all live on the More tab, which went out with the Tasks tab. The tab is back, and the duplicate workspace button leaves the Home header.
Padding above the headers.
contentInsetAdjustmentBehavior="automatic"already insets a scroll view clear of the status bar on iOS, and Home and Chats addedinsets.topon top of it: 62pt of nothing. Android adjusts nothing and still pays. A run and a thread also had content sliding under the transparent bar, because an inverted list insets its newest end rather than its top.A closed task refused a reply. Naming an agent on a done task answered
Claude could not start: PW-102 is done; reopen it before starting more work— a chore handed back to the person who just asked for the work. The relay reopens the task itself when a person names an agent on it. An agent still cannot reopen its own.Three relay tests added (reopen, live-ask-only Inbox, ask by key).
cargo test --workspace,npm testandtsc --noEmitare green. The mobile layout fixes want a TestFlight build to confirm.