Skip to content

fix(cc-discovery): symlinked .md files + seed Waiting fixture + KO doc-coverage#234

Merged
hoangsonww merged 3 commits into
masterfrom
feat/discovery-seed-coverage-enhancements
Jul 16, 2026
Merged

fix(cc-discovery): symlinked .md files + seed Waiting fixture + KO doc-coverage#234
hoangsonww merged 3 commits into
masterfrom
feat/discovery-seed-coverage-enhancements

Conversation

@hoangsonww

Copy link
Copy Markdown
Owner

Three independent enhancements, one commit each:

1. fix(cc-discovery): follow symlinked agent/command/hook markdown files

Completes what #232 started. #232 taught skill directory discovery to follow symlinks (isDirLike), but the same Dirent quirk (ent.isFile() is false for a symlink pointing at a regular file) still hid symlinked .md files everywhere else — an agent, command, output style, or hook script linked into ~/.claude via ln -s stayed invisible to the Config Explorer while Claude Code itself resolves and uses it.

  • New isFileLike(ent, absPath) — exact file counterpart of isDirLike: ent.isFile() short-circuit (no extra stat for regular files), statSync follows symlinks, broken links are non-files rather than throws.
  • Applied at all four enumeration sites: readMdFilesAt (agents / commands / output-styles), countMdIn (plugin contribution counts), the plugin hooks counter, and readHookScripts.
  • Tests: symlinked agent .md discovered, broken symlink skipped without throwing, direct isFileLike unit coverage (file-symlink → true, dir-symlink → false).

2. feat(seed): stable waiting-on-input fixture

A freshly seeded dashboard never showed the Waiting overlay — both stable fixtures cover only working/idle states, so the yellow badge, the awaiting_reason chip/tooltip (#233), the Kanban Waiting column, and SessionDetail's waiting-for-input banner were all undemonstrable without a live blocked session.

New third idempotent fixture demo-waiting-…: active session, main agent blocked on a permission prompt, awaiting_input_since stamped ~4 minutes in the past (banner's "how long" readout renders something real), awaiting_reason = "notification" (the urgent/amber path). Wired into FIXTURE_SESSION_IDS so --reset cleans it like the others; listed in the printed test URLs. Verified against a scratch DB: insert → correct rows on session + agent, re-run → skipped.

3. chore(skills): README-KO.md in the doc-coverage matrix

The update-project-docs skill's mapping already lists README-KO.md as part of the canonical doc set, but doc-coverage.sh never checked it — Korean-README drift scored a clean matrix (had to be hand-checked in recent sweeps). Adds the KO row.

Testing

  • npm run test:server656/656 (6 new discovery tests)
  • npm run test:client261/261
  • File-header audit clean, Prettier clean
  • Seed verified twice against a throwaway DASHBOARD_DB_PATH (never the real DB)
  • doc-coverage.sh awaiting_reason now reports the KO column (6 hits)
  • Not run: mcp:typecheck (mcp/ untouched)

🤖 Generated with Claude Code

hoangsonww and others added 3 commits July 15, 2026 21:37
Completes the symlink support #232 added for skill DIRECTORIES: the same
Dirent quirk (ent.isFile() is false for a symlink pointing at a regular
file) still hid symlinked .md files from every file-enumeration site, so
an agent, command, output style, or hook script linked into ~/.claude
via ln -s was invisible to the Config Explorer while Claude Code itself
resolves and uses it.

Adds an isFileLike(ent, absPath) counterpart to isDirLike (statSync
follows the link; broken symlinks are non-files, never throw) and uses
it at all four sites: readMdFilesAt (agents/commands/output-styles),
countMdIn (plugin contribution counts), the plugin hooks counter, and
readHookScripts. Regular files short-circuit on ent.isFile(), so the
non-symlink path costs no extra stat.

Tests: symlinked agent .md discovered, broken .md symlink skipped
without throwing, plus direct isFileLike unit coverage (file symlink
true, directory symlink false).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…Waiting UI

The two existing stable fixtures only cover working/idle agent states,
so a freshly seeded dashboard never shows the Waiting overlay - the
yellow badge, the awaiting_reason chip/tooltip (urgent "notification" ->
amber), the Kanban Waiting column, or SessionDetail's waiting-for-input
banner all stayed invisible in demos.

Adds a third idempotent fixture (demo-waiting-...): an active session
whose main agent is blocked on a permission prompt, with
awaiting_input_since stamped ~4 minutes in the past (so the banner's
"how long" readout renders something real) and awaiting_reason =
"notification". Wired into FIXTURE_SESSION_IDS so --reset cleans it up
like the others, and listed in the printed test URLs.

Verified against a scratch DB: insert -> correct session/agent rows
(awaiting_input_since + awaiting_reason set on both), re-run -> skipped
(idempotent).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The update-project-docs skill's change->docs mapping already lists
README-KO.md as part of the canonical translated doc set, but the
doc-coverage.sh verification matrix never checked it - so a term missing
from the Korean README scored a clean matrix and the drift went
unnoticed (it had to be checked by hand during recent sweeps).

Adds the README-KO.md row right after the other translations. Verified:
`doc-coverage.sh awaiting_reason` now reports the KO column (6 hits).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 16, 2026 04:41
@cursor

cursor Bot commented Jul 16, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation labels Jul 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested labels Jul 16, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new isFileLike helper function in server/lib/cc-discovery.js to correctly resolve and handle symlinks pointing to regular files, replacing previous .isFile() checks across several file discovery functions. Unit tests have been added to verify this behavior, including handling broken symlinks. Additionally, a new 'waiting-on-input' demo session has been added to the database seeding script to exercise the Waiting UI elements, and the Korean translation README (README-KO.md) has been added to the documentation coverage script. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@hoangsonww
hoangsonww merged commit 4d4cf05 into master Jul 16, 2026
20 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Projects

Development

Successfully merging this pull request may close these issues.

2 participants