feat(web): add compact file chip paths - #8825
ricardosalta wants to merge 4 commits into
Conversation
Keep basename-only labels as the default and add a client-local setting that renders workspace paths with ./, home paths with ~/, and other paths absolutely. Preserve line and column positions and document the option.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (12)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughAdds a ChangesFile chip path display
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant SettingsPanels
participant ClientSettings
participant ChatMarkdown
participant FilePathDisplay
participant MarkdownFileLink
SettingsPanels->>ClientSettings: Set showFileLinkPaths
ClientSettings-->>ChatMarkdown: Publish settings update
ChatMarkdown->>FilePathDisplay: Format file chip label
FilePathDisplay-->>ChatMarkdown: Return compact or short label
ChatMarkdown->>MarkdownFileLink: Render updated chip
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The file-chip path preference retains source positions in compact labels and has no remaining actionable merge risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 9 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds a persisted file-chip display preference and new path-formatting behavior used by the production ChatMarkdown renderer. The option is off by default and preserves existing labels, but the change introduces a new product default and spans shared renderer and settings infrastructure. You can add or adjust custom eligibility rules. Learn more. |
What Changed
Added a client-local Settings → General → File chip paths option. The existing short labels remain the default; enabling the option renders workspace files with
./, other files under the inferred home directory with~/, and unrelated files as absolute paths. Line and column positions stay attached.The formatter handles POSIX, Windows drive, and UNC paths without generating parent-relative labels. Paths containing
.or..stay absolute because resolving them safely requires the filesystem that owns the workspace. The setting participates in search, persistence, and Restore defaults. This option applies to web and desktop; mobile keeps its existing basename-only renderer.Why
File-name-only chips hide which directory a referenced file belongs to. Duplicate names get a parent suffix, and the full path is available on hover, but users who scan long agent responses still have to stop and inspect each chip. This keeps the compact default while giving path-oriented workflows an explicit, persistent alternative.
UI Changes
Before — default short labels:
After — File chip paths enabled:
Verification
git diff --check, the actual ChatMarkdown suite, and full web typecheck pass.@pierre/diffspatch was applied to the disposable dependency tree before the affected suite and direct full web typecheck passed.main, the exact new artifact passed a fresh hostile re-audit, including the upstream citation/directive changes inChatMarkdown.This is a direct feature PR without prior maintainer approval. I understand the contributor guide prefers an Ideas proposal for non-trivial features and that maintainers may close unsolicited feature PRs.
Checklist
Model: GPT-5.6 Sol · Harness: Codex in T3 Code.
Summary by CodeRabbit
New Features
Documentation