Skip to content

Commit 5cd004e

Browse files
fix(web): editor file-link labels truncate inside the chip
> 🤖 claude/anthropic claude-opus-5-5 (high) ## What Changed - **File-link label:** gets `min-w-0 truncate` - **Plain link:** label class resets ## Why The editor chip is `max-w-full`, but its label never truncated, so a long label spilled past the chip edge. The chat file-link chip already truncates its label; the editor mark view did not. Upstream-triage: fork fix; the rich Markdown editor exists only in the fork. The issue's other two conditions ship in the `github-issues` PR. ## Close conditions - [x] **File-link chip:** label truncates ## UI Changes `NOTES.md` in rich mode, narrow files panel: | Before | After | | --- | --- | | ![editor-beforec.png](https://github.com/user-attachments/assets/b458d2ee-ead2-4a11-9c7d-a3e97040ef0f) | ![editor-afterc.png](https://github.com/user-attachments/assets/0fd9a373-8d96-47d0-b5f6-567733508885) | ## Verification | Check | Result | | --- | --- | | Label right edge, chip at 620, before | 653, spills | | Label right edge, chip at 620, after | 613, ellipsis | | `vp run typecheck` (web) | exit 0 | | `vp lint` (1 file) | exit 0 | | `vp run build:desktop` | exit 0 | | `vp run fork:ci` | exit 0 | Each side measured in real Chrome after a full reload. ## Checklist - [x] This PR is small and focused - [x] I explained what changed and why - [x] I included before/after screenshots for any UI changes - [x] I included a video for animation/interaction changes (n/a) Part of #1363 Claude Opus 5.5 via Claude Code in T3 Code. ## Fork trailers Fork-Domain: markdown-editing Fork-Tier: bugfix Fork-Upstreamable: no <!-- gh-bot:attest {"v":2,"repo":"RSI-Software/t3code-hyprws","ref":"fix/editor-file-link-truncate@06f8b4a","agents":[{"role":"host","iface":"claude","provider":"anthropic","model":"claude-opus-5-5","effort":"high","harness":"[email protected]","session":"f01f8046c783"}],"ts":"2026-09-28T23:36:34Z"} --> Co-authored-by: donjor <[email protected]>
1 parent 7665889 commit 5cd004e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎apps/web/src/components/files/markdownEditorPresentation.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,13 @@ function linkView(options: MarkdownEditorPresentationOptions) {
206206
else dom.removeAttribute("title");
207207

208208
dom.className = "";
209+
contentDOM.className = "";
209210
iconSlot.replaceChildren();
210211
if (!file?.workspaceRelativePath) return;
211212

212213
dom.className = `${FILE_LINK_CHIP_CLASS_NAME} t3-markdown-editor__file-link`;
214+
// The label truncates to the chip, as the chat chip's label does.
215+
contentDOM.className = "min-w-0 truncate";
213216
dom.dataset["filePath"] = file.workspaceRelativePath;
214217
dom.title = file.displayPath;
215218
const icon = iconElement(file.filePath, options.theme.current);

0 commit comments

Comments
 (0)