You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: We want a structured, step-by-step PR walkthrough in Rudu — similar to Codiff's "Walkthrough" feature — displayed as a vertical Chain-of-Thought timeline with collapsible steps, clickable file chips, and progress tracking.
This issue catalogs what already exists in open PRs, what comparable tools do, and what infrastructure we still need.
data-acp-plan → AcpPlanView (ordered plan entries with status badges)
tool → <Tool>
src/features/review-chat/line-selection.ts — file attachments with diff line ranges, already wired into PatchViewerMain
Chat panel added as a right sidebar tab ("Rudu") in patch-viewer-main.tsx
Key insight: The UI primitives for a Chain-of-Thought timeline are already 70% built. They are currently arranged for a chat transcript, not a walkthrough.
src/components/ui/chapter-overview.tsx — ~1000-line component rendering chapter list with severity badges, expandable chapters, review steps, related files, risks panel, completion tracking
TanStack Query hooks in src/queries/llm.ts
Key insight: PR #29 has a structured backend for generating grouped review content, but the UI is a dashboard, not a walkthrough timeline. The data shape is close to what a walkthrough needs.
2. What Codiff does (reference implementation)
Codiff's walkthrough (electron/walkthrough.cjs):
Prompt strategy: Returns a review walkthrough order, not review findings. Files are ranked by "review leverage" (architecture boundaries → contained changes → mechanical churn).
Add a special /walkthrough prompt that instructs Codex to output a structured walkthrough using the existing ACP plan format, enriched with file groups. Render it by restyling the existing <Reasoning> + <Tool> + <Checkpoint> stack into a vertical timeline.
Pros:
No new backend command needed
Leverages existing Codex ACP session
Interactive: user can ask follow-up questions about each step
Cons:
Relies on Codex reliably producing structured JSON inside a chat turn
Harder to cache/regenerate
Tied to Codex (can't easily swap providers)
Option B: Add separate walkthrough backend (pre-generated)
New Tauri command + prompt (inspired by PR #29's chapters.rs but simpler), returning the Codiff JSON shape. New React component renders it as a Chain-of-Thought timeline. Reuse file chip click handler from PR #56's attachment system.
Pros:
Deterministic structured output with JSON schema enforcement
Build a dedicated walkthrough backend (Option B) for the initial structured generation, but render it inside the Review Chat panel (Option A) so the user can ask follow-up questions about any step. The walkthrough appears as the first assistant message in the chat, using the Chain-of-Thought layout.
Why this is best:
Gets the reliability of structured JSON generation
Keeps the user inside the conversational review flow
Add impact and action fields to the chapter/walkthrough prompt and TypeScript types.
Create WalkthroughTimeline component in src/features/review-chat/ using existing <Reasoning> / <Tool> / <Checkpoint> primitives, styled as a vertical timeline.
Wire file chips to useDiffNavigator scroll-to-file (already exists in patch-viewer-main.tsx).
Add per-step status tracking based on which files the user has viewed (could use existing diff navigator state).
Cache walkthroughs per PR + head SHA using the existing SQLite cache or session metadata.
8. Open questions
Should the walkthrough be auto-generated on PR open or on-demand via a button?
Should we support re-running the walkthrough with a different provider/model?
Research: LLM-powered PR Walkthrough / Chain-of-Thought Review UI
1. What already exists in Rudu
PR #56 —
[codex] Add remote Pi review workflow(branch:pr-worker-codex-review, 63 files)Backend (Rust + Tauri):
ReviewSession/ReviewWorkspace/ReviewChatdomain model with persistence (session.json)~/rudu/workspaces/<repo>/pr-<n>/repo)review_session/acp.rs) for Codex chatReviewChatEventunion withMessage,Thought,Tool,Plan,Finished,ErrorReviewWorkspaceEventlog stream for workspace preparation steps0003-use-codex-as-the-review-chat-agent.md)Frontend (React + Tailwind):
src/components/ai-elements/chat.tsx— reusable UI primitives already built:<Reasoning>— collapsible reasoning block with streaming state<Tool>— tool call status block (input-available/output-available)<Checkpoint>/<CheckpointIcon>/<CheckpointTrigger>— timeline markers<Conversation>/<ConversationContent>— scrollable chat containersrc/features/review-chat/assistant-part.tsx— renders assistant message parts:text→ markdownreasoning→<Reasoning>data-acp-plan→AcpPlanView(ordered plan entries with status badges)tool→<Tool>src/features/review-chat/line-selection.ts— file attachments with diff line ranges, already wired intoPatchViewerMainpatch-viewer-main.tsxKey insight: The UI primitives for a Chain-of-Thought timeline are already 70% built. They are currently arranged for a chat transcript, not a walkthrough.
PR #29 —
Add AI summarization review panels(branch:d4rm5:main, 24 files)Backend:
src-tauri/src/services/chapters.rs— LLM chapter generator with structured JSON prompt (chapters-v1){ prologue: { summary, keyChanges[], reviewFocus[] }, chapters: [{ title, summary, files[], reviewSteps[], risks[] }] }services/llm.rs(OpenAI, Anthropic, Google, OpenRouter, Z.ai, Minimax, Opencode, OpenAI-compatible)rudu.llm)Frontend:
src/components/ui/chapter-overview.tsx— ~1000-line component rendering chapter list with severity badges, expandable chapters, review steps, related files, risks panel, completion trackingsrc/queries/llm.tsKey insight: PR #29 has a structured backend for generating grouped review content, but the UI is a dashboard, not a walkthrough timeline. The data shape is close to what a walkthrough needs.
2. What Codiff does (reference implementation)
Codiff's walkthrough (
electron/walkthrough.cjs):{ "groups": [ { "title": "Review carefully", "reason": "...", "files": [ { "path": "...", "action": "review" | "scan" | "skim", "impact": "wide" | "contained" | "mechanical", "reason": "...", "context": "..." } ] } ], "summary": { "focus": "...", "skim": "..." } }gpt-5.3-codex-sparkwith reasoning efforthigh, 45s timeout, read-only sandbox.3. What ai-sdk
ChainOfThoughtoffers (Vercel AI Elements)Composable component API (
packages/elements/src/chain-of-thought.tsx):statusprop:complete|active|pendingMapping to PR walkthrough:
ChainOfThoughtconcept<ChainOfThoughtStep>labelstatus<ChainOfThoughtSearchResult>action/impactbadgesdescriptionreason+context4. Comparable tools in the wild
/describe,/review)None of the open-source tools provide a native desktop Chain-of-Thought timeline UI. Rudu would be novel here.
5. Gap analysis
impact/actionper filefocus+skim)6. Recommended implementation paths
Option A: Extend PR #56 chat (chat-driven walkthrough)
Add a special
/walkthroughprompt that instructs Codex to output a structured walkthrough using the existing ACP plan format, enriched with file groups. Render it by restyling the existing<Reasoning>+<Tool>+<Checkpoint>stack into a vertical timeline.Pros:
Cons:
Option B: Add separate walkthrough backend (pre-generated)
New Tauri command + prompt (inspired by PR #29's
chapters.rsbut simpler), returning the Codiff JSON shape. New React component renders it as a Chain-of-Thought timeline. Reuse file chip click handler from PR #56's attachment system.Pros:
Cons:
Option C: Hybrid (recommended)
Build a dedicated walkthrough backend (Option B) for the initial structured generation, but render it inside the Review Chat panel (Option A) so the user can ask follow-up questions about any step. The walkthrough appears as the first assistant message in the chat, using the Chain-of-Thought layout.
Why this is best:
7. Concrete next steps (if we proceed)
services/llm.rs,commands/chapters.rs,types/github.ts) into the same branch.impactandactionfields to the chapter/walkthrough prompt and TypeScript types.WalkthroughTimelinecomponent insrc/features/review-chat/using existing<Reasoning>/<Tool>/<Checkpoint>primitives, styled as a vertical timeline.useDiffNavigatorscroll-to-file (already exists inpatch-viewer-main.tsx).8. Open questions
review/scan/skim) or also impact (wide/contained/mechanical)?Research compiled from:
pr-worker-codex-review) — Codex review session with ACPd4rm5:main) — AI summarization / chapterselectron/walkthrough.cjspackages/elements/src/chain-of-thought.tsx