Repository navigation
Tick Send to Chopin by default on a new comment - #544
Conversation
|
Review: Changes needed. One small fix: gate the default on an attached Planner. Everything else is good. Checked on a local fake-harness server (desktop 1440×900, phone 390×844) and on a second server with What works
Needs a change:
That means an error on every comment, so the default is a bad experience here. Suggested fix: tick by default only when a turn can actually run.
Follow-up (existing gap, not this PR) Minor
|
A new top-level comment starts addressed to Chopin, with its @chopin chip, wherever a Planner runs; unticking it, or Backspace at the start, sends an ordinary comment as before. Each new comment starts ticked again: nothing remembers an untick. Replies keep their unticked default, so the reply field stays one quiet line until it is used. Where AGENT=off the box starts unticked, since nothing would act on the note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reviewed dynamic owners in comment-layer.tsx keep the same data flow: the change only passes the widget options' planner flag to DraftCard; the measured overlay geometry and motion-contract classes are untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Touch raises the field's text to the 16px floor and the sheet pads the field's top, while the chip kept its small size at the very top, so on a phone it sat above the text. The chip now centres on the first line from the field's own text size and top padding; desktop is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under HARNESS=remote a document with no attached Planner now starts a new comment unticked, from the same attachment state Build uses, passed as a comment-only widget option so decisions keep reading planner as before. A comment sent to Chopin there is refused before anything is saved with the planner-not-attached code and the message that says how to attach one, as chat:send and task drafts are, instead of saving a note whose turn could never run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reviewed dynamic owners in comment-layer.tsx and plan-editor.tsx keep the same data flow: plan-editor passes one more boolean into the widget options and comment-layer reads it for DraftCard; overlay geometry and motion-contract classes are untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9799b28 to
4516d03
Compare
A new comment in a document now starts with Send to Chopin ticked and the
@Chopinchip in place, wherever a Planner runs.Decisions
DraftCard, so they share the default.@chopinor the box still address Chopin.plannerwidget option (session.agent) drives it. Ticking it still works as before: the server saves the note and the thread says "Chopin isn't running". Sending never fails here, so the box stays enabled and gets no new copy.comment-layerclears the draft whencanEditis false).plannerDetached(agent && !plannerDetached), passed as a new comment-only widget option,commentPlanner.planner={agent}is unchanged, so decisions read it as before.Server
Under HARNESS=remote with no Planner attached,
admit()now refuses a Planner-addressed comment or reply before anything is saved. It returnscode: "planner-not-attached"and the message that says how to attach one, the same aschat:sendand task drafts do. Before, it saved a note whose turn could never run.comment.d.tsadds the optionalcodeto the start and reply refusals. The composer shows the message and keeps the words. Persistence-before-publication is unchanged.Otherwise: A ticked comment sends
comment:startwithto: "planner".admit()asksChat.admission, persists the note withto: "planner", and only after the commit runssend(), which is the existing explicit Planner turn. Authorization is unchanged: the same writer checks gatecomment:start.Tests
Server:
comments-planner.test.tschecks that an unattached remote Planner refuses a new comment and a reply withplanner-not-attached, saves nothing and queues no turn, and that ordinary replies still go through.E2E: in
planner-attachment.e2e.ts(HARNESS=remote) the box starts unticked with no Planner attached, a ticked send is refused with the attach message and the words are kept, and once a client attaches a new comment starts ticked.Unit: the draft is ticked with its chip, unticked with
planner={false}, and a reply is unticked.E2E:
harness-comments(AGENT=on) checks the box starts ticked, then unticks before the@chopintyping path.comment-send-off(AGENT=off) checks it starts unticked.Design-contract:
comment-layer.tsxsource hash renewed in its own commit. The only change is aplannerprop passed toDraftCard; the dynamic geometry and motion owners are unchanged.Screenshots
The
@Chopinchip now centres on the field's first line on phone too. Touch raises the field's text to 16px and the sheet pads its top, which left the chip sitting above the text.🤖 Generated with Claude Code
Landing validation
Rebased onto the merged comment-card change with unchanged prepared patches and valid combined design hashes. Local CI, types, production build, 86 focused units, 40 comment browser cases, three fake-Planner cases, and the attached-Planner case passed. Prior GitHub CI was green; administrator bypass avoids repeating a full cycle for the source-preserving rebase.