Skip to content

Fix GCC feedback: symlinked files in files tab + sticky Copy button (#353)#354

Open
jmchilton wants to merge 3 commits into
mainfrom
user_bugs
Open

Fix GCC feedback: symlinked files in files tab + sticky Copy button (#353)#354
jmchilton wants to merge 3 commits into
mainfrom
user_bugs

Conversation

@jmchilton

Copy link
Copy Markdown
Member

Addresses both items from #353 (GCC user feedback session).

1. Show symlinked files in the files tab

walkDir dropped symlink entries because a symlink Dirent reports false for both isFile() and isDirectory(). It now resolves the target type via stat:

  • symlink → file shows as a file (with target size)
  • symlink → directory is walked only when its real path stays inside cwd (mirrors the main.ts file-protocol containment guard, so a symlink can't expose content outside the working directory); outside-cwd linked dirs still show but render empty
  • broken symlinks surface as files so they stay visible

2. Copy button sticks around forever

The selection Copy button is position:fixed at coords captured when text was selected. Scrolling the chat with a trackpad (no mousedown) left it pinned in the viewport. It now repositions on scroll/resize and hides once the selection scrolls out of the chat's visible bounds. Placement math extracted to a pure computeCopyButtonPlacement for unit testing.

Tests

New tests/files-walkdir-symlinks.test.ts (real tmpdir with file/dir/broken/outside-cwd links) and computeCopyButtonPlacement cases in tests/chat-panel.test.ts. Full suite: 924 passing; app tsc --noEmit clean.

Note: the Copy-button report wording was garbled ("Highlight causes Copy button to hove … sticks around forever"); interpreted as the fixed-position button staying pinned during scroll. Not yet validated against the live UI.

🤖 Generated with Claude Code

jmchilton and others added 3 commits June 25, 2026 09:42
walkDir dropped symlink entries because a symlink Dirent reports false
for both isFile() and isDirectory(). Resolve the target type via stat so
linked files/dirs appear; broken links surface as files. (#353)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Copy button is position:fixed at coords captured when the selection
was made. Scrolling the chat (trackpad, no mousedown) or resizing left it
pinned in the viewport forever. Reposition on scroll/resize, hide once the
selection scrolls out of the chat's visible bounds. Placement math
extracted to computeCopyButtonPlacement with unit tests. (#353)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Following the symlink walkDir fix, a symlinked directory pointing outside
cwd would get its contents enumerated, bypassing the resolveWithin /
file-protocol containment boundary. Gate recursion on an isWithinCwd
realpath check (mirrors main.ts file handler); outside-cwd linked dirs
still show but render empty. Add right-edge clamp test for copy button.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant