feat(web): add tooltip to composer file mention pill#1944
feat(web): add tooltip to composer file mention pill#1944juliusmarminge merged 2 commits intopingdotgg:mainfrom
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 |
|
Worth noting: |
ApprovabilityVerdict: Approved Minor UI enhancement adding a tooltip to file mention pills in the composer. The refactoring from TextNode to DecoratorNode is a standard Lexical pattern change to enable React-based tooltip rendering. Changes are self-contained with net negative lines and no runtime behavior changes beyond the additive tooltip feature. You can customize Macroscope's approvability policy. Learn more. |
Dismissing prior approval to re-evaluate 0311e7d
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
Migrated
ComposerMentionNodefromTextNodetoDecoratorNodeand added a<Tooltip />that shows the full file path on hover. Also cleaned up the offset/selection functions to useisComposerInlineTokenNodeinstead of per-typeinstanceofchecks.Why
The mention pill only shows the basename, so when multiple files share the same name (e.g.
src/utils/index.tsandsrc/api/index.ts) there's no way to tell them apart.ComposerMentionNodewas the only inline chip still onTextNode, Skills and Terminal already usedDecoratorNode, so this aligns all three and enables proper<Tooltip />support.UI Changes
Checklist
Note
Medium Risk
Moderate risk because it refactors the Lexical
ComposerMentionNodefrom aTextNodeto aDecoratorNode, which can affect editor serialization and cursor/selection behavior around inline tokens.Overview
Shows the full file path when hovering a composer file mention chip by rendering the mention as a
DecoratorNodewith aTooltip(while still displaying only the basename in the chip).This removes the previous manual DOM rendering/update logic for mention chips, adjusts mention JSON import/export to the new node type, and consolidates selection/offset calculations to treat mentions the same as other inline token nodes via
isComposerInlineTokenNode.Reviewed by Cursor Bugbot for commit 0311e7d. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Show full file path on composer mention pill hover
ComposerMentionNodein ComposerPromptEditor.tsx from aTextNodeto aDecoratorNode, switching from imperative DOM rendering to a newComposerMentionDecoratorReact component.isComposerInlineTokenNodepath, removing mention-specific branches.SerializedLexicalNodeinstead ofSerializedTextNode; existing serialized mention data may need re-validation.Macroscope summarized 0311e7d.