feat(web): add interactive review mode for web diffs#33
feat(web): add interactive review mode for web diffs#33ajoslin wants to merge 2 commits intoremorses:mainfrom
Conversation
|
Cool! Can you share a url I can try? You can change the domain in the worker and deploy in your Cloudflare account with |
Implement GitHub-style inline review comments with queued or single-submit callback posting, and include light/dark evidence artifacts documenting screenshot states and callback outputs.
b960883 to
b4d0462
Compare
|
Sure, generating, also cleaned up PR body a bit |
|
Added review test URLs (plain text): Base diff: Review mode (simple callback): Review mode + mobile: Review mode + desktop: Review mode + JSON template callback: Review mode + tokenized callback URL test: |
|
Then of course we could integrate this into Kimaki for world domination with a POST to local kimaki server on review submit 👌👌 |
|
I was thinking we could setup a way to read back the comments for the agent. So model can use webfetch with I am also thinking, what if we make this comments system more general and also add it in traforo tunnel urls? Similar to Vercel preview comments. So you can add comments to any dev server preview html page url, then the model can fetch those comments and see your instructions close to the element they refer. For example: imagine working on a Next.js app from the phone on Discord, the agent will show you the kimaki tunnel url to preview the app, you can open it, enable comments and comment "make this button bigger". Then the model can fetch the same url with I think I like this more general approach of comments on pages better, the critique case would also become much simpler, and you can comment to a precise keyword instead of a full line. I will work on this this week |
|
Here is how it would look like: https://liveblocks.io/examples/overlay-comments/nextjs-comments-overlay?exampleId=z-WQsI1qaxe_5Rk This would even work for real time collaboration! for example to work on a project with your teams and send messages to the same thread in Discord, comments on the tunnel url |
|
hmm cool idea yeah I like it does that work with dynamic SPAs that change all the time? |
|
Nice point. I need to think about it. I need a good way to associate comment to a point in the screen, that is responsive too. Will research what Vercel Preview comments do |
hmm i think the right approach is a JS script tag / library that works inside of a dev site instead of trying to put the dev site inside a review app so i can inject a script in dev, then have the review up on featurebranch.myapp.com?critique_review_id=xyz and it will add all of the shit on top my main client app for example is very hard to deploy, tons of services etc , getting a vercel style preview url is near impossible but getting a feature branch (or local tunnel url) link with a review system script embedded inside is possible great idea really |
|
Just copy agentation.dev |
|
so can we merge this as-is? i know you have a cool feature planned but this would be huge right now! Would be a super minimal kimaki or opencode addon to get it to feed review comments back in 1 by 1 |
|
Latest critique has support for agentation to add comments |
Summary
mode=reviewweb runtime for diff pages with GitHub-style line commenting: hover+, inline composer, queue/delete/edit/reply flows, and groupedSubmit Reviewbehavior.text/markdown) and optionalcallback_json_template(application/json) with{{text}}validation.tmp-pr-screenshots/.Screenshot Links (branch files)
Light mode
Dark mode
Split modified row behavior
Output Breakdown (summary in PR body)
callback_json_templateomitted):POSTtext/markdown; charset=utf-8callback_json_templateprovided):{{text}}placeholder in templatePOSTapplication/json{{text}}substituted by the markdown review textExample template:
{"text":"{{text}}","target":"ext-system","meta":{"kind":"review"}}Example posted payload:
{ "text": "## Review of b/README.md\n\n- `b/README.md:6` Template + token test", "target": "ext-system", "meta": { "kind": "review" } }{{text}}is missing or template does not produce a JSON object, review mode is disabled and an error banner is shown.?token=...&authToken=...) in both default and template modes.Verification
bun test src/web-utils.test.tsbun run prepublishonlylsp_diagnosticsclean for:src/review/web-review-mode.tssrc/web-utils.tsxsrc/ansi-html.tssrc/web-utils.test.ts