Skip to content

Split prompt button with two export modes#8

Merged
tomasz-tomczyk merged 4 commits intomainfrom
split-prompt-button
Mar 14, 2026
Merged

Split prompt button with two export modes#8
tomasz-tomczyk merged 4 commits intomainfrom
split-prompt-button

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

@tomasz-tomczyk tomasz-tomczyk commented Mar 14, 2026

Summary

  • Replace single "Get prompt" button on review page with a GitHub-style split button dropdown
  • Default: "Act on comments" — fetches structured comments JSON, agent addresses each one and signals local crit with crit go <port>
  • Dropdown: "Full plan + comments" — fetches full files with comments interjected inline, for use without local crit

Implementation

  • LiveView manages prompt mode via @prompt_mode assign — no custom JS for switching
  • Modal conditionally renders based on mode (pure server-side)
  • Only JS addition is a small close-on-outside-click handler for the dropdown
  • CSS uses .crit-split-btn / .crit-split-dropdown classes with --crit-* variables (no Tailwind on review page)
  • Also fixes pre-existing bug where clipboard "Copied" feedback reset to wrong text

Note

Export endpoints currently don't include comments added via the web UI due to a nil file_path bug — tracked in #6.

🤖 Generated with Claude Code

tomasz-tomczyk and others added 4 commits March 14, 2026 23:24
Replace single "Get prompt" button with a GitHub-style split button
dropdown offering two prompt modes: "Execute comments" (agent implements
review comments directly) and "Import to crit" (saves .crit.json locally
for iterating with crit CLI).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 5c68ce0 into main Mar 14, 2026
5 of 6 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the split-prompt-button branch March 14, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant