Repository navigation
Conversation
- Use markdown.ts for all markdown, don't hand roll latex detection
- removes editorTheme file
- relax external content rules
- JetBrains Mono for code - Inter for UI and markdown?
📝 WalkthroughWalkthroughReplaces custom CodeMirror theme with GitHub themes, removes local font copying and switches to Google Fonts, migrates Markdown rendering from renderMime/KaTeX to renderMarkdown, restructures merge UI into a three-column diff with action bar, and narrows MergeRow typing to a discriminated union. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
src/web/client/styles.ts (1)
85-93: Consider font loading strategy to prevent FOUC.Using
@importfor Google Fonts in a dynamically injected stylesheet may cause a Flash of Unstyled Content (FOUC). The fonts load asynchronously after the stylesheet is parsed. Consider:
- Adding
font-display: swapin the Google Fonts URL (&display=swapis already present - good)- Preloading critical fonts via
<link rel="preload">in the HTML shellThe current implementation is functional, and
display=swapmitigates the worst FOUC effects.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/web/client/styles.ts` around lines 85 - 93, The injected `@import` URL in the stylesheet (the Google Fonts line) can cause FOUC when loaded dynamically; instead, add explicit <link rel="preload"> entries for the critical fonts in the HTML shell (preload the Inter and JetBrains Mono font files with as="font", the correct type, and crossorigin) and keep the current &display=swap fallback on the `@import`; leave the :root variables (--font-ui and --font-code) as-is so they use the preloaded fonts when ready and keep the `@import` only as a non-blocking fallback if needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/web/client/MergeRow.tsx`:
- Around line 271-283: The code uses row.isUserUnmatched && row.unmatchGroupId
but the types allow them independently, hence the non-null assertion
row.unmatchGroupId! in MergeRow.tsx; fix by changing the row type to a
discriminated union so that when isUserUnmatched: true the shape includes
unmatchGroupId: string (and when false it omits or makes it undefined), update
the Row type definition (the same type used by resolverStore and MergeRow) to
reflect this invariant, then remove the non-null assertion in MergeRow and let
TypeScript narrow row to the variant where unmatchGroupId is guaranteed when
used with row.isUserUnmatched and onRematchRows.
In `@src/web/client/styles.ts`:
- Line 1322: In src/web/client/styles.ts there is a CSS declaration "border: 1px
solid var(--border-color);;" with a duplicate semicolon; edit the relevant style
rule to remove the extra semicolon so it becomes a single semicolon after the
declaration (look for the border property usage in the same CSS rule in
styles.ts to locate it).
- Line 1278: Remove the duplicate semicolon at the end of the CSS rule "border:
1px solid var(--border-color);;" — locate the stylesheet/template containing
that rule in src/web/client/styles.ts and change it to a single semicolon
("border: 1px solid var(--border-color);") so the CSS is valid.
---
Nitpick comments:
In `@src/web/client/styles.ts`:
- Around line 85-93: The injected `@import` URL in the stylesheet (the Google
Fonts line) can cause FOUC when loaded dynamically; instead, add explicit <link
rel="preload"> entries for the critical fonts in the HTML shell (preload the
Inter and JetBrains Mono font files with as="font", the correct type, and
crossorigin) and keep the current &display=swap fallback on the `@import`; leave
the :root variables (--font-ui and --font-code) as-is so they use the preloaded
fonts when ready and keep the `@import` only as a non-blocking fallback if needed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 53f600b6-8846-4276-a1cb-149564dbc181
⛔ Files ignored due to path filters (3)
package-lock.jsonis excluded by!**/package-lock.jsonsrc/web/client/fonts/dm-sans-700-latin.woff2is excluded by!**/*.woff2src/web/client/fonts/playfair-display-italic-500-latin.woff2is excluded by!**/*.woff2
📒 Files selected for processing (7)
esbuild.jspackage.jsonsrc/web/client/CellContent.tsxsrc/web/client/MergeRow.tsxsrc/web/client/editorTheme.tssrc/web/client/styles.tssrc/web/webServer.ts
💤 Files with no reviewable changes (2)
- src/web/client/editorTheme.ts
- esbuild.js
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/web/client/MergeRow.tsx`:
- Around line 83-87: The current cellType is chosen from a fixed fallback order
(cellType = row.currentCell?.cell_type || row.incomingCell?.cell_type ||
row.baseCell?.cell_type || 'code') which causes the editorExtensions and
resolved editor to be wrong when the user switches branch selection; change the
logic to compute a resolvedCellType derived from the user's selected branch
choice (e.g., inspect the same selector/state used for the resolved editor — any
variable like selectedBranch/selectedSide) and use that resolvedCellType in the
useMemo that builds editorExtensions (replace cellType with resolvedCellType and
add that selector/state to the dependency array) so extensions/styling update
correctly when branch choice changes (update references to cellType,
editorExtensions, and the resolved editor code that relies on them).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1464cbed-0321-45e2-b2c6-295862eb131d
📒 Files selected for processing (4)
src/web/client/MergeRow.tsxsrc/web/client/styles.tssrc/web/client/types.tssrc/web/webServer.ts
…y whichever branch had content first, not by the user's actual selection. - When a user clicks "Use Base/Current/Incoming", the editor immediately updates with correct syntax highlighting for that branch's cell type.
- Content area/3 way diff view - Resolution bar button area
Summary by CodeRabbit
New Features
Style
Chore