Skip to content

Auto-refresh local review session after agent acts on web feedback #342

@tomasz-tomczyk

Description

@tomasz-tomczyk

Problem

When collaborating via crit-web, the local review session doesn't reflect changes after the AI agent acts on web feedback. The current flow requires manual intervention:

  1. crit <args> → local review
  2. crit share → publish to web
  3. Reviewer comments on crit-web, clicks "Send to author"
  4. Human pastes prompt into local AI
  5. AI makes code changes + crit share
  6. Human's local crit session is stale — doesn't show new code state

Solution

Three changes to close the loop automatically:

1. Add cli_args field to CritJSON

Store the original CLI args in the review session so they can round-trip through crit-web.

2. Include cli_args in crit share payload

When sharing, send the original args alongside the review data.

3. Update crit-web prompt generation

When generating the "Send to author" prompt, append crit <cli_args> after crit share. The prompt changes from:

make changes and respond, then crit share

to:

make changes, then crit share, then crit <original args>

Result

The human pastes one prompt, the AI makes changes, shares to web, and re-runs crit <original args> which refreshes the local browser session with the new code state. No manual steps needed.

Touches

  • crit/ — CritJSON struct + share payload
  • crit-web/ — prompt generation template

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions