fix: consolidate coding agent prompt actions - #2179
Conversation
yuezengwu
left a comment
There was a problem hiding this comment.
Reviewed the full diff. The change consolidates the coding-agent prompt actions into one dialog-first flow, preserves complete prompt visibility and copy/error/reset behavior, aligns the Settings terminology, and adds deterministic Web coverage plus a reusable Momentic journey. I found no blocking correctness or security issues. There are no production schema or core data-structure changes; the only direct database write is the local E2E fixture that seeds organization_settings. Approved without rerunning tests, per review scope.
baixiaohang
left a comment
There was a problem hiding this comment.
Recommendation: approve
- Rationale: The dialog-first flow preserves the existing prompt provenance, temporary-code masking, copy recovery, and stale-operation guards while removing the duplicate action path.
Risk level: C
- Path baseline:
packages/web/**plus locale2e/**journey assets -> C - Semantic lift: none; the change does not touch Web subscriptions, WebSocket parsing, or the shared data layer
PR summary
- Author / repo: Gandy2025 / agent-team-foundation/first-tree
- Problem: Members had two competing setup-prompt actions, so they could copy a temporary-code prompt without first seeing the complete handoff and had to distinguish “copy” from “preview.”
- Approach: Replace both actions with one
View setup promptentry, keep copying inside the masked dialog, align the Settings terminology, retain async invalidation and error recovery, and map deterministic Web coverage plus a real-app Momentic journey to the existing cross-surface QA case. - Impacted modules: BYO prompt actions, Context Tree Settings and onboarding consumers, Web interaction tests, and local Momentic onboarding/setup fixtures
Review findings
✅ 1. The exact prompt remains inside the explicit data-clarity-mask boundary, and successful copy clears the temporary prompt while clipboard failure keeps the dialog available for retry.
✅ 2. Team/readiness changes, dialog close, unmount, and late clipboard completions still invalidate stale work; the consolidated flow does not create a second prompt or readiness source of truth.
✅ 3. The local E2E fixture seeds only the bound-tree prerequisite, while the committed QA case remains authoritative for provider execution and same-session handoff evidence.
Action taken
- Approved exact head
16ed58d53b8b10b8d339dcad63481e924881bb35; tests were not rerun per review scope.
yuezengwu
left a comment
There was a problem hiding this comment.
Re-reviewed the incremental change from 16ed58d to c6e6451. The new commit intentionally keeps the dialog and complete prompt visible after a successful copy, moves transient Copied feedback into the dialog, supports copying again, and requires explicit close. The close, Team-switch, unmount, and late clipboard-completion invalidation guards remain intact, and the deterministic Web/Momentic coverage matches the new behavior. I found no blockers. There are still no production schema or core data-structure changes; the local E2E organization_settings fixture is unchanged. Approved the current head without rerunning tests or QA, per review scope.
baixiaohang
left a comment
There was a problem hiding this comment.
Recommendation: approve
- Rationale: The follow-up intentionally keeps the masked prompt dialog open after copying while preserving explicit cleanup, retry behavior, accessible feedback, and all stale-operation guards.
Risk level: C
- Path baseline: the increment changes three
packages/web/**files and one locale2e/**journey -> C - Semantic lift: none; it changes dialog-local interaction state without touching subscriptions, WebSocket parsing, or the shared data layer
PR summary
- Author / repo: Gandy2025 / agent-team-foundation/first-tree
- Problem: The first head closed the setup dialog immediately after copy, preventing members from continuing to inspect or recopy the complete handoff.
- Approach: Retain the masked prompt after a successful clipboard write, show transient
Copiedfeedback in the dialog, allow repeat copy, rename the dismissal action toClose, and clear the prompt only when the member explicitly closes or the existing reset/unmount boundary fires. - Impacted modules: BYO setup-prompt dialog state, Context enablement DOM coverage, Settings interaction coverage, and the local Momentic prompt-dialog journey
Review findings
✅ 1. The prompt remains under the existing explicit Clarity mask; Close, Team/reset-key changes, and unmount still clear or invalidate the temporary prompt and late clipboard completion.
✅ 2. Copy failure remains retryable, repeated copy is disabled while in flight, and the shared feedback timer resets the visible Copied state plus its aria-live announcement without creating a second status source.
✅ 3. The deterministic tests and Momentic journey now assert retention followed by explicit close; provider execution and same-session adoption remain outside this focused increment and under the existing committed QA case.
Action taken
- Approved exact head
c6e6451598108790755886e172be643cfd68f3e1; tests were not rerun per review scope.
Summary
View setup promptentryCopy promptinside that dialogCopiedfeedback, and let the user close explicitlyCoding agent setupand align the supporting copyValidation
pnpm checkpnpm typechecknpx momentic@3.42.0 lintValidation gaps
pnpm testrun hit unrelated existing failures: a Pi version-gate timeout remained reproducible in 1 of 47 isolated client tests, while the isolated CLI timeout test passed. All changed Web tests are green.