Skip to content

feat(web): add compact file chip paths - #8825

Open
ricardosalta wants to merge 7 commits into
pingdotgg:mainfrom
ricardosalta:codex/readable-path-chips-upstream
Open

ricardosalta wants to merge 7 commits into
pingdotgg:mainfrom
ricardosalta:codex/readable-path-chips-upstream

Conversation

@ricardosalta

@ricardosalta ricardosalta commented Aug 30, 2026 •

Copy link
Copy Markdown

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:

Default basename-only file chip

After — File chip paths enabled:

Compact file path chip enabled

Verification

  • 152 focused tests pass across path formatting, the complete current ChatMarkdown suite, observable live preference changes, persisted settings hydration, rerender isolation, settings search, and schema persistence.
  • Targeted lint, formatting, git diff --check, the actual ChatMarkdown suite, and full web typecheck pass.
  • The pnpm wrapper's automatic install is blocked locally by supply-chain policy findings in 74 unchanged upstream lockfile entries; the repository's committed @pierre/diffs patch was applied to the disposable dependency tree before the affected suite and direct full web typecheck passed.
  • The original artifact passed three independent hostile-review rounds. After rebasing onto current main, the exact new artifact passed a fresh hostile re-audit, including the upstream citation/directive changes in ChatMarkdown.

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

  • This PR is small and focused (focused, but GitHub correctly classifies the 653-line diff as size L; most added surface is regression coverage and the dependency-free React test host)
  • I explained what changed and why
  • I included before/after screenshots for the setting and rendered chip change
  • I included a video for animation/interaction changes (not applicable; no motion change)

Model: GPT-5.6 Sol · Harness: Codex in T3 Code.

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.
@coderabbitai

coderabbitai Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8aa2fa34-ea3e-47f2-b2b7-e08abb0487f1
📥 Commits

Reviewing files that changed from the base of the PR and between c475c8d and c7ed27c.

📒 Files selected for processing (11)
  • README.md
  • apps/web/src/components/ChatMarkdown.test.tsx
  • apps/web/src/components/ChatMarkdown.tsx
  • apps/web/src/components/settings/SettingsPanels.restore.test.tsx
  • apps/web/src/components/settings/SettingsPanels.tsx
  • apps/web/src/components/settings/settingsSearch.test.ts
  • apps/web/src/components/settings/settingsSearch.ts
  • apps/web/src/hooks/useSettings.ts
  • docs/README.md
  • packages/contracts/src/settings.test.ts
  • packages/contracts/src/settings.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/README.md
  • README.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Adds the showFileLinkPaths client setting for file-link chips. Adds compact path formatting for workspace, home, POSIX, Windows, and WSL paths. Updates chat rendering, settings controls, tests, and documentation.

Changes

File chip path display

Layer / File(s) Summary
File path setting contract
packages/contracts/src/settings.ts, packages/contracts/src/settings.test.ts
Adds showFileLinkPaths with a default of false, patch support, and validation tests.
Path compaction and label formatting
apps/web/src/filePathDisplay.ts, apps/web/src/filePathDisplay.test.ts
Adds compact path formatting and label selection. Tests cover POSIX, Windows, WSL, workspace-relative, and home-relative paths.
Chat chips and settings controls
apps/web/src/components/ChatMarkdown.tsx, apps/web/src/components/ChatMarkdown.test.tsx, apps/web/src/components/settings/SettingsPanels.tsx, apps/web/src/components/settings/SettingsPanels.restore.test.tsx, apps/web/src/components/settings/settingsSearch.ts, apps/web/src/components/settings/settingsSearch.test.ts, apps/web/src/hooks/useSettings.ts
Chat chips use the setting to format labels. Settings expose the preference and include it in search and restore behavior. Tests cover default labels, live updates, search, and restore behavior.
File-link documentation
docs/user/file-links.md, README.md, docs/README.md
Adds a file-links guide and links to it from the documentation indexes.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SettingsPanels
  participant ClientSettings
  participant ChatMarkdown
  participant FilePathDisplay
  participant FileLinkChip
  SettingsPanels->>ClientSettings: Update showFileLinkPaths
  ClientSettings-->>ChatMarkdown: Notify settings change
  ChatMarkdown->>FilePathDisplay: Format file chip label
  FilePathDisplay-->>ChatMarkdown: Return compact or short label
  ChatMarkdown->>FileLinkChip: Render updated label
Loading

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to c7ed2

The file-chip path preference appears ready to merge after normal checks; no unresolved behavior issue is established.

Security Architecture Review

Security architecture risk: 🔵 Low · up to c7ed2

The option is off by default and changes file labels rather than file-access permissions. The inspected behavior preserves existing action checks. No introduced security concern was established, but persistence recovery and integration coverage remain incomplete.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated exposure change is the visibility of longer labels for already-resolved file references on the client. The inspected preference path does not add a server-settings mutation, credential capability, or new privileged file operation.

Trust Boundaries and Controls

  • observed — Markdown-derived file metadata enters the new formatter as label input. Its result is passed separately from href, targetPath, panelPath, and action callbacks. Editor and reveal actions retain host-operation and remote-open checks; browser preview retains its preview-scope and environment checks. FileTagChipContent receives the label as a JSX child rather than as a destination.

Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore (reviewers only)

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Approvability ❌ Error The pull request adds a new user workflow: a persisted Settings → General → File chip paths option that changes ChatMarkdown chip rendering. This matches the rule "Adds a subsystem or user workflow." … A maintainer must review the new File chip paths setting, its persisted ClientSettings contract change, and its effect on file-chip rendering before approval.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding compact file chip paths to the web application.
Description check ✅ Passed The description explains the problem, change, scope, approval status, verification results, UI impact, and screenshots. It uses different headings from the template, but it provides the required infor…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Approvability

Explanation

The pull request adds a new user workflow: a persisted Settings → General → File chip paths option that changes ChatMarkdown chip rendering. This matches the rule "Adds a subsystem or user workflow." The change is implemented in apps/web/src/components/settings/SettingsPanels.tsx, apps/web/src/components/ChatMarkdown.tsx, and packages/contracts/src/settings.ts. The pull request needs a maintainer's review.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 30, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds a new opt-in file-chip display capability, including substantial cross-platform path formatting and integration across chat rendering, settings, persistence, and contracts. Existing defaults remain unchanged, but the feature’s scope and shared-code integration warrant human review.

You can add or adjust custom eligibility rules. Learn more.

@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Sep 30, 2026 — with ChatGPT Codex Connector
Merge upstream main without rewriting the published PR branch. Preserve scoped settings restore, streaming controls and jsdom tests while retaining compact path labels.

Validation prerequisite: pinned frozen dependency install is rejected by the unchanged supply-chain policy. Focused tests, lint and typecheck remain unrun pending an explicitly approved isolated exception. git diff --check passes.
@ricardosalta

Copy link
Copy Markdown
Author

⌾ Refreshed this PR against main 611132c with an ordinary merge; the new head is c7ed27c3, conflict-free and preserving the new thread-link handling.

Validation on the exact commit passed 331 focused tests, changed-file formatting, canonical lint and full web typecheck in a disposable Linux worker with a frozen lockfile and install scripts disabled. Lint has zero errors and the same 11 upstream warning diagnostics; the new missing cwd callback dependency was fixed.

The current-head CI run and preview workflows require maintainer approval. Please approve those Actions runs when convenient.

Maintenance: GPT-6.1-Sol through the Codex harness.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pre-merge checks failed. Please resolve the failing checks before merging.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants