Skip to content

Conversation

@stefandevo
Copy link
Collaborator

@stefandevo stefandevo commented Jan 22, 2026

Summary

Fixes the review dialog rendering issues where tool calls showed as raw text and markdown tables didn't render properly.

Fixes #632

Changes

New PlanContentViewer Component

  • Separates tool calls (exploration) from the actual plan/specification markdown
  • Shows the plan content prominently using the Markdown component
  • Collapses tool calls by default in an "Exploration (X tool calls)" section
  • Users can expand tool calls if needed, but they don't clutter the view

Enhanced Markdown Component

  • Added remark-gfm plugin for GitHub Flavored Markdown support (tables, task lists, strikethrough)
  • Added proper table styling (borders, header backgrounds, padding)
  • Added custom renderer for tasks code blocks - renders as proper checkbox lists:
    • Phase headers (## Phase 1: ...) → styled section headings
    • Unchecked tasks (- [ ]) → ☐ empty square icon
    • Checked tasks (- [x]) → ✓ green checkmark + strikethrough

Dialog Header Improvements

  • Feature title now shown in dialog header (e.g., "Review Plan - Feature Title") if ≤50 chars
  • Feature description limit increased from 150 → 250 characters
  • Added "show more/less" toggle for long descriptions

Files Changed

File Change
apps/ui/package.json Added rehype-sanitize@^6.0.0, remark-gfm@^4.0.1
apps/ui/src/components/ui/markdown.tsx Added remarkGfm, table styling, custom tasks block renderer
apps/ui/src/components/views/board-view/dialogs/plan-content-viewer.tsx New - Separates tool calls from plan markdown
apps/ui/src/components/views/board-view/dialogs/plan-approval-dialog.tsx Use PlanContentViewer, add title/description improvements
package-lock.json Updated dependency tree, fixed git+ssh URL

Test plan

  • Open a feature with "require approval" enabled and push to "in progress"
  • Verify the plan/specification renders prominently (not hidden behind tool calls)
  • Verify tool calls are collapsed by default in "Exploration" section
  • Verify markdown tables render as actual tables (not pipe-separated text)
  • Verify tasks code blocks render as checkbox lists (not code blocks)
  • Verify feature title appears in dialog header
  • Verify "show more" works for long feature descriptions
  • Verify edit mode still shows raw content for editing

Screenshot

CleanShot 2026-01-22 at 17 26 13@2x

Summary by CodeRabbit

  • New Features
    • Added GitHub-Flavored Markdown support for enhanced formatting capabilities
    • Introduced custom task list rendering with visual checkbox indicators
    • Enhanced plan content display with collapsible exploration sections showing tool interactions
    • Implemented smart description truncation with expand/collapse toggles in plan approval dialogs

✏️ Tip: You can customize this high-level summary in your review settings.

claude and others added 2 commits January 21, 2026 00:47
- Replace Markdown component with LogViewer in plan-approval-dialog to
  properly format tool calls with collapsible sections and JSON highlighting
- Add remark-gfm plugin to Markdown component for GitHub Flavored Markdown
  support including tables, task lists, and strikethrough
- Add table styling classes to Markdown component for proper table rendering
- Install remark-gfm and rehype-sanitize dependencies

Fixes mixed/broken rendering in review dialog where tool calls showed as
raw text and markdown tables showed as pipe-separated text.
- Convert git+ssh:// to git+https:// in package-lock.json for @electron/node-gyp
- Apply prettier formatting to plan-approval-dialog.tsx
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @stefandevo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly upgrades the user interface's ability to display complex content within the review dialog. By integrating a specialized log viewer for tool calls and extending markdown support to include GitHub Flavored Markdown features, the changes aim to provide a more accurate, readable, and functional presentation of review-related information, ultimately improving the user experience for plan approvals.

Highlights

  • Improved Tool Call Rendering: The plan-approval-dialog now uses LogViewer instead of Markdown to display tool calls, providing collapsible sections and JSON highlighting for better readability.
  • GitHub Flavored Markdown (GFM) Support: The Markdown component has been enhanced with the remark-gfm plugin, enabling support for GFM features such as tables, task lists, and strikethrough.
  • Enhanced Table Styling: New CSS styling has been added to the Markdown component to ensure tables render correctly and are visually appealing.
  • Dependency URL Fix: A git+ssh:// URL in package-lock.json was corrected to git+https:// to resolve a dependency resolution issue.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Replaces Markdown rendering in the plan approval dialog with a PlanContentViewer that parses tool calls and plan markdown; adds GitHub-Flavored Markdown support and table styling via remark-gfm and rehype-sanitize in the UI package.

Changes

Cohort / File(s) Summary
Dependencies
apps/ui/package.json
Added remark-gfm and rehype-sanitize to support GitHub-Flavored Markdown and HTML sanitization.
Markdown renderer
apps/ui/src/components/ui/markdown.tsx
Added remarkGfm to remarkPlugins, retained rehypeRaw/rehypeSanitize, and added table/th/td styling classes.
Plan approval dialog
apps/ui/src/components/views/board-view/dialogs/plan-approval-dialog.tsx
Replaced inline Markdown rendering with PlanContentViewer in view mode and removed the previous Markdown import; added description truncation/show-more logic.
New plan content viewer
apps/ui/src/components/views/board-view/dialogs/plan-content-viewer.tsx
New exported PlanContentViewer that parses plan content into tool calls and plan Markdown, renders collapsible tool-call sections and a Markdown area for the plan/spec.

Sequence Diagram(s)

(Skipped — changes are UI-focused and the flow is straightforward; diagram omitted.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Enhancement

Poem

🐰 I hop through pipes and tidy tables bright,

I fold the tool-calls, tuck JSON tight,
GFM sprinkles tables into view,
A tiny twitch — the dialog’s new,
Hooray! — this rabbit gives a cheerful bite.

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(ui): improve review dialog rendering for tool calls and tables' clearly and accurately summarizes the main changes: fixing tool call and table rendering in the review dialog.
Linked Issues check ✅ Passed The PR successfully addresses all primary objectives from issue #632: tool calls now render in a collapsible PlanContentViewer with proper formatting, remark-gfm and table styling added to Markdown component, and plan content parsing improved.
Out of Scope Changes check ✅ Passed All changes are directly scoped to resolving issue #632: dependencies added (rehype-sanitize, remark-gfm), Markdown component enhanced with GFM support and table styling, new PlanContentViewer component created, and plan-approval-dialog updated to use the new viewer.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request successfully addresses the UI rendering issues for tool calls and tables. Replacing the Markdown component with LogViewer in the plan-approval-dialog provides a more structured and interactive display for tool calls, including collapsible sections and JSON highlighting. The enhancements to the Markdown component with remark-gfm and dedicated table styling significantly improve the rendering of GitHub Flavored Markdown tables. The dependency updates are consistent with these functional changes.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@apps/ui/src/components/views/board-view/dialogs/plan-approval-dialog.tsx`:
- Line 14: The component currently imports and uses LogViewer to display plan
content (imported symbol: LogViewer) which treats everything as raw log lines;
replace that usage with a Markdown renderer (e.g., your project's Markdown
component or react-markdown) so headings, lists and tables render correctly, or
add a strict type check (e.g., isLogEntries(planContent)) before choosing
LogViewer; update the imports to bring in the markdown renderer and adjust the
render path inside the PlanApprovalDialog (where plan content is emitted) to
render planContent via the markdown component when not actual log entries,
keeping LogViewer only for verified log entry data.

@stefandevo stefandevo added Do Not Merge Use this label if something should not be merged. Work-In-Progress Currently being addressed. labels Jan 22, 2026
The previous LogViewer approach showed tool calls prominently but hid
the actual plan/specification markdown content. The new PlanContentViewer:

- Separates tool calls (exploration) from plan markdown
- Shows the plan/specification markdown prominently using Markdown component
- Collapses tool calls by default in an "Exploration" section
- Properly renders GFM tables in the plan content

This provides a better UX where users see the important plan content
first, with tool calls available but not distracting.
The feature description in the plan approval dialog header was
truncated at 150 characters with no way to see the full text.
Now users can click "show more" to expand and "show less" to collapse.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@apps/ui/src/components/views/board-view/dialogs/plan-content-viewer.tsx`:
- Around line 36-47: The heading detection is too strict and skips plans when a
heading follows a tool call: relax the heading regex to accept any heading text
(e.g. change trimmed.match(/^#{1,3}\s+\w/) to trimmed.match(/^#{1,3}\s+/) or
equivalent that allows emoji/non-word chars) and, before breaking and setting
planStartIndex, ensure any active tool is flushed/closed (handle currentTool:
finalize or push the active tool result so it doesn't block plan detection).
Apply the same relaxed-heading + flush-currentTool change to the analogous logic
in the block covering lines 79-118.
- Around line 50-60: The regex that extracts the tool name (trimmed.match(...))
uses \w+ which truncates names with dots/hyphens; change the capture group to
match one or more non-whitespace characters (e.g., \S+ or [^\s]+) so toolMatch
captures names like "web.run" or "file-read", then set currentTool =
toolMatch[1] as before and leave the rest of the toolCalls push logic
(currentTool, currentInput) unchanged.

- Increase description character limit from 150 to 250 characters
- Add feature title to dialog header (e.g., "Review Plan - Feature Title")
  only if title exists and is <= 50 characters
When markdown contains a ```tasks code block, it now renders as:
- Phase headers (## Phase 1: ...) as styled section headings
- Task items (- [ ] or - [x]) with proper checkbox icons
- Checked items show green checkmark and strikethrough text
- Unchecked items show empty square icon

This makes implementation task lists in plans much more readable
compared to rendering them as raw code blocks.
Address CodeRabbit review feedback:

1. Relax heading detection regex to match emoji and non-word chars
   - Change \w to \S so headings like "## ✅ Plan" are detected
   - Change \*\*[A-Z] to \*\*\S for bold section detection

2. Flush active tool call when heading is detected
   - Prevents plan content being dropped when heading follows tool call
     without a blank line separator

3. Support tool names with dots/hyphens
   - Change \w+ to [^\s]+ so names like "web.run" or "file-read" work
@stefandevo stefandevo added Testers-Requested Request for others to test an enhancement or bug fix/etc. and removed Work-In-Progress Currently being addressed. Do Not Merge Use this label if something should not be merged. labels Jan 22, 2026
@stefandevo stefandevo merged commit 7773db5 into AutoMaker-Org:v0.14.0rc Jan 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Testers-Requested Request for others to test an enhancement or bug fix/etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants