Repository navigation
STU-376: Wire the redesigned prompt composer, attachments and local suggestions - #81
Conversation
…estions The redesigned hero shell shipped the composer markup but never wired it: #hero-send invoked runThinkingPipeline through an inline handler while the pipeline still dereferenced the retired #btn-run-pipeline button outside its try block, so every submission crashed silently and left pipelineState.isRunning stuck true. Chips only copied their prompt, and the ghost layer, tab hint and live announcement were inert markup. Add src/composerAdapter.js and bind it from app.js (initComposer replaces bindHeroChips): the ghost layer mirrors the textarea and surfaces the 13 local prototype suggestion patterns after the prototype's 220ms debounce and six-character gate — no completion provider, credential or network request is involved. Tab accepts only an active suggestion and otherwise moves focus; Escape dismisses; Enter submits unless Shift is held or an IME is composing, so Shift+Enter keeps its newline. Acceptance records the accepted text and cannot re-trigger on it in a loop. Submission goes through the existing pipeline exactly once per action: send follows canSubmit (non-whitespace prompt, idle pipeline), hands its arrow to the spinner while in flight, blocks duplicate submission, and never touches the prompt or attached images, so an error preserves the user's work. Attach and settings keep their existing wiring — the size/count validation in handlePromptImageSelect is untouched and the settings icon still opens the real generation settings. Chips fill their full source prompt behind the demo caret with a settled aria-pressed state, exactly as the prototype specifies. Also define .sr-only inline (the composer label and live region leaned on the Tailwind CDN for it), port the demo caret and busy-field styles with their reduced-motion handling, and guard the legacy run button so surfaces without it stay functional. Cover the wiring with unit tests for the patterns, gates and the tab-accept/escape-dismiss state machine, and a browser suite exercising typing, Tab/Escape, chips, whitespace and duplicate-submission guards, settings, attachment validation and touch controls at 360px and desktop. STU-376
|
@greptileai — please review this PR. |
|
…cy graph cannot be reproduced exactly Co-Authored-By: bot_apk <apk@cognition.ai>
|
@greptileai review |
|
@greptileai please do full PR and confirm Confidence Score |
…designed composer and cancel pending suggestion on Escape Co-Authored-By: bot_apk <apk@cognition.ai>
Co-Authored-By: bot_apk <apk@cognition.ai>
|
@greptileai review Addressed both prior findings: the redesigned composer now wraps the attach control in |
Resolve conflicts in app.js (keep provisionSucceeded + runId epoch refactor, drop removed approximate plumbing), regenerate-side dist conflicts resolved via rebuild to follow. Co-Authored-By: Stuart Gardoll <sgardoll@gmail.com>
…te submit during chip typing, restore disclosed-approximation verification - initComposer now runs before the first awaited startup call (initializeAuth), so the send button's listener exists while auth/subscription requests are in flight; early clicks are no longer dropped.\n- Chip demo-typing now counts as busy: send stays disabled, Enter is rejected while a chip types its prompt, and doSubmit re-checks the state, so a half-typed chip prompt can never submit.\n- Restore the disclosed-approximation verification policy (planCustomCodeVerification returns approximate notices plumbed to the deploy result and success modal) instead of skipping every package-importing class — matching the approach defended in this PR's review thread.\n\nCo-Authored-By: Stuart Gardoll <sgardoll@gmail.com> Co-Authored-By: Stuart Gardoll <sgardoll@gmail.com>
|
Addressed all four Devin Review findings in
Verification: |
|
Fixed in |
|
Fixed in |
|
Already addressed by |
|
Reverted the skip-all policy in |
…checks, cancel stale suggestion timer on chip fill Co-Authored-By: Stuart Gardoll <sgardoll@gmail.com>
|
Resolving — fix pushed and verified (npm test 346/346, stu376 e2e 19/19). |
1 similar comment
|
Resolving — fix pushed and verified (npm test 346/346, stu376 e2e 19/19). |
…pending uploads, resync composer on prompt restore Co-Authored-By: Stuart Gardoll <sgardoll@gmail.com>
|
Resolving — fix pushed and verified (npm test 346/346, stu376 e2e 19/19). |
2 similar comments
|
Resolving — fix pushed and verified (npm test 346/346, stu376 e2e 19/19). |
|
Resolving — fix pushed and verified (npm test 346/346, stu376 e2e 19/19). |
…controls during a run Co-Authored-By: Stuart Gardoll <sgardoll@gmail.com>
|
Resolving — fix pushed and verified (npm test 346/346, stu376 e2e 19/19). |
1 similar comment
|
Resolving — fix pushed and verified (npm test 346/346, stu376 e2e 19/19). |
|
Resolving — acknowledged as intended behavior; re-entry is guarded by |
…e busy composer inert Co-Authored-By: Stuart Gardoll <sgardoll@gmail.com>
|
Resolving — fix pushed and verified (npm test 346/346, stu376 e2e 19/19). |
1 similar comment
|
Resolving — fix pushed and verified (npm test 346/346, stu376 e2e 19/19). |
…ight awaits Co-Authored-By: Stuart Gardoll <sgardoll@gmail.com>
|
Resolving — fix pushed and verified (npm test 346/346, stu376 e2e 19/19). |
Co-Authored-By: Stuart Gardoll <sgardoll@gmail.com>
|
Resolving — fix pushed (pure CSS, verified with the pending-thumbnail state the spinner paints over). |
5a7b7ba
into
milestone/stu-implement-updated-ui-ux
Fixes STU-376 (Linear: https://linear.app/stuart-gardoll/issue/STU-376/wire-the-redesigned-prompt-composer-attachments-and-local)
Summary
#suggest-status, tab-hint shown only while a suggestion is activerunThinkingPipelinecontract exactly once per action: whitespace-only cannot submit, duplicate submission disabled in flight, prompt/images preserved on errorhandlePromptImageSelect/removePromptImagevalidation; settings icon still opens the real generation settings#btn-run-pipelinereference that crashed every submission since the hero shell replaced itTest evidence
npm test: 303 pass / 0 failnpm run test:ui: 32 passed (13 existing + 19 new)npm run build: clean; deploy guard 9/9; leak scan clean; proxies 30/30