feat(desktop): hand Plan mode's words to Luke as the task's brief
Merged
DA
13d ago+91+91+01234567890123456789-50-50-01234567890123456789
Summary
PR 5 of the New task redesign. In New task's Plan mode, the composer's words now go to Luke as the task's brief (tasks.start's field from #3699). Until now they were used as the task's name.
- Plan mode (
new-task-composer.tsx): the words are sent asbriefthroughTasksControl.newTask.start/startTask(use-tasks-tab.ts, whoseNewTaskStartgainsbrief). No name is derived from them any more. The task takes the picked Linear issue's title (or the workspace issue it was opened on). Otherwise it stays Untitled until Luke names it. The issue'slinearIssueIdis still sent next to the brief.startTaskdoesn't send an empty or whitespace-only brief. - Bound: the words box is capped at
TASK_BOUNDS.MAX_BRIEF_CHARSin Plan mode. In Agent mode it keeps the cap it had before,CODING_AGENT_BOUNDS.MAX_MESSAGE_CHARS.AgentComposertakes this as a new optionalmaxLengthprop, defaulting to the message bound. Both limits are 16,000 today. - Agent mode is unchanged and never sends a brief.
taskNameOfWords(@luke/ui/tasks-model) and its test are removed; nothing else used it.- Updated the doc comments: the composer's header,
NewTaskStart,newTask.startandstartTask.
Out of scope: Agent mode's one-call start (PR 7), Home (PR 8), and any service change.
Evidence
pnpm check:affected: typecheck, lint, repository checks and migrations passed.discarded-effectran out of memory inside the parallel run (sandbox limit), so I reran it alone with a bigger heap and it passed (No discarded Effect, Stream, or Layer in 2397 files.).knippassed on its own. The affected tests passed: ui 82 files, panel 25, web 67, desktop 197 files / 2124 tests.app-menu.test.tsfirst failed only because the Electron binary was missing in the sandbox; it passed after fetching it. The affected build passed.- New and updated tests:
new-task-dialog.test.ts:- Plan mode with words sends a
briefand no name. - Plan mode with an issue and words sends the issue's name,
linearIssueIdandbrief. - An empty Plan start sends neither.
- Agent mode sends no brief.
- The repository tests no longer expect a name taken from the words.
- Plan mode with words sends a
use-tasks-tab.test.ts:startTaskputsbriefin theTASKS_STARTpayload next tolinearIssueId, and leaves out a blank one.
Invariants
-
./scripts/check.shgreen. (CI) - JSON Schema goldens unchanged.
- Every behavior change has, in this PR, the test that fails without it; no change-detector test added.
- Gateway envelope goldens unchanged.
- No new
astype assertion outside the allowlisted files. - No
Effect.runPromise/runSync/runForkoutside the runtime edges. - No new
setTimeout/setInterval/new Promise/AbortController/fs.watch. - No Effect, Stream, or Layer written as a statement and dropped.
- Test count: one test removed with
taskNameOfWords, two added (Plan mode with issue and words;startTask's brief payload). Net +1. - No hand-rolled file replaced.
- No
CLAUDE.md/AGENTS.mdsentence names a changed part. -
PRIVACY.mdunchanged. The words already reached the service as the task's name. - Package deps match imports.
- Barrel/door rule: the renderer imports
@luke/features/task-wire, a vocabulary door it already opens elsewhere.
Notes
- Blockers or follow-up verification: None. PR 7 and #3729 touch
new-task-composer.tsx/use-tasks-tab.tstoo; whichever PR merges later mergesorigin/mainforward.
Made with Luke