Improve markdown file link UX#1956
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
ApprovabilityVerdict: Needs human review Introduces a new interactive file link UX with styled chips, tooltips, context menus, and path disambiguation logic. While self-contained to the UI layer with good test coverage, the volume of new user-facing behavior (~800 lines of new components and utilities) represents a meaningful new feature that benefits from human review. You can customize Macroscope's approvability policy. Learn more. |
Co-authored-by: codex <codex@users.noreply.github.com> # Conflicts: # apps/web/src/components/chat/MessagesTimeline.test.tsx # apps/web/src/components/chat/MessagesTimeline.tsx
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b85c801. Configure here.
| function basenameOfPath(path: string): string { | ||
| const separatorIndex = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\")); | ||
| return separatorIndex >= 0 ? path.slice(separatorIndex + 1) : path; | ||
| } |
There was a problem hiding this comment.
Duplicate basenameOfPath in two new files
Low Severity
Two identical private basenameOfPath functions are introduced in markdown-links.ts and filePathDisplay.ts. Both compute the basename by finding the last / or \\ separator. A single shared utility (or reuse/extension of the existing basenameOfPath export in vscode-icons.ts) would avoid the duplication.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit b85c801. Configure here.
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Integrates upstream/main (d22c6f5) into the fork while preserving all multi-provider support (codex, claudeAgent, copilot, cursor, opencode, geminiCli, amp, kilo) and fork UI/UX additions. Highlights adopted from upstream: - Nightly release channel + update channel selector (pingdotgg#2012, pingdotgg#2049, pingdotgg#1969) - Filesystem browse API + command palette project picker (pingdotgg#2024) - Launch Args setting for Claude provider (pingdotgg#1971) - Kiro editor support in open picker (pingdotgg#1974) - Claude plan events for TodoWrite during input streaming (pingdotgg#1541) - Lost provider session recovery (pingdotgg#1938) - Cache provider status and gate desktop startup (pingdotgg#1962) - LegendList migration for chat scrolling and branch lists (pingdotgg#1953) - Shell snapshot queries + backfill migration (pingdotgg#1973, pingdotgg#2004) - PATH hydration + fallback detection (pingdotgg#1799) - Warm sidebar thread subscriptions (pingdotgg#2001) - Full thread title tooltip (pingdotgg#1994) - Markdown file link UX (pingdotgg#1956), composer polish (pingdotgg#1944, pingdotgg#1992, pingdotgg#1985) - Worktree/branch state + draft reuse fixes (pingdotgg#2005, pingdotgg#2003, pingdotgg#1995, pingdotgg#1936) - Window controls overlay for Windows/Linux (pingdotgg#1969) - Backend readiness timeout 10s→30s (pingdotgg#1979) - Clear tracked RPCs on reconnect, live stream subscriptions (pingdotgg#2000, pingdotgg#1972) - Various misc fixes (pingdotgg#2051, pingdotgg#2052, pingdotgg#2025, pingdotgg#2027, pingdotgg#2049, pingdotgg#1997, pingdotgg#1975) Fork features preserved and reconciled: - All 8 provider adapters + conformance tests - Extended ProviderKind union across contracts/model/settings/provider - appearance/accentColor/themeConfig/ProviderLogo UI system - customModels + gitTextGeneration + providerModelOptions - Migration IDs 23 (NormalizeLegacyProviderKinds) and 24 (RepairProjectionThreadProposedPlanImplementationColumns) kept; new upstream migrations registered at IDs 25-26 to avoid breaking deployed fork databases - DesktopBridge: log directory channels (LOG_DIR/LIST/READ/OPEN_DIR) retained; getWsUrl replaced by upstream's getAppBranding - PROVIDER_CACHE_IDS extended to all 8 providers


What Changed
This tightens the UX for markdown-rendered local file links and keeps file-path presentation more consistent across assistant surfaces.
Why
Assistant messages were hard to scan when they referenced the same filename multiple times, especially when the visible markdown text was just
menu.tsxorMessagesTimeline.tsxrepeatedly. The useful context existed in the href, but the UI was not surfacing it well.This approach keeps the change small and local to existing rendering paths:
UI Changes
Before:
After:
Screenshots:



CHIPS
CONTEXT MENU
HOVER TOOLTIP
Checklist
Note
Improve file link rendering in chat markdown with icon, line/column, and context menu
filename · L1:C7), and parent path segments to disambiguate duplicate basenames.resolveMarkdownFileLinkMetain markdown-links.ts andformatWorkspaceRelativePathin filePathDisplay.ts to support structured metadata and workspace-relative display paths.MessagesTimelinework entry rows and previews are now formatted relative to the workspace root.Macroscope summarized b85c801.
Note
Medium Risk
Mostly UI/UX changes, but it touches link handling and editor-opening/context-menu behavior; mistakes could break navigation or open/copy actions for file links across chat surfaces.
Overview
Improves local markdown file-link UX by replacing plain anchors with memoized inline file chips that show VS Code-style icons, tooltips, and context-menu actions (open in editor, copy relative/full path), while keeping normal external links unchanged.
Adds
resolveMarkdownFileLinkMeta+formatWorkspaceRelativePathto compute workspace-relative display paths and parse line/column info, uses that metadata to label links asbasename · parentSuffix · Lx(:Cy)(disambiguating duplicate basenames), and reuses the same path formatting forMessagesTimelinechanged-file previews/badges.Updates CSS for the new chip styling and expands/adjusts tests to cover line/column labels, basename disambiguation, web-link passthrough, and timeline path formatting.
Reviewed by Cursor Bugbot for commit b85c801. Bugbot is set up for automated code reviews on this repo. Configure here.