Repository navigation
feat(extension): hint that a chapter has no changes on Completed - #89
Merged
Merged
Conversation
An unchanged chapter still offered an enabled Completed action, so clicking it applied the same tree. Mark such rows with `-unchanged` and swap that action for an always-disabled pass icon whose command title explains why. A disabled toolbar action shows only its title as a tooltip, hence the separate contributed command.
Both snapshots of every chapter live in the same workspace, so changing the applied chapter does not change which files differ. Clearing the cache on each same-root switch made every row briefly rebuild as expandable before the from/to check landed, so the list shifted twice on a chapter click. Keep the detected diffs when the workspace root is unchanged; a new course session still starts from an empty cache.
VS Code drops the twistie column on a row that is not collapsible, so an unchanged chapter started 22px left of its expandable neighbours and the whole list shifted whenever the applied chapter changed. Set iconPath on every chapter row: the applied chapter keeps its Not Started or Completed status icon, and every other chapter gets a mortar-board course marker. Rows now share one title edge regardless of chevron state, and no chapter shows a status it does not have.
The disabled hint is meant to occupy the inline Completed slot so hovering that slot explains why the action is unavailable. Contributing it to the navigation group as well duplicated the same no-op entry in the right-click menu, where it reads as an action the user could pick. Contribute it only to inline@3 and assert that the manifest has exactly one listing, so a later menu change cannot reintroduce the duplicate.
RJiazhen
force-pushed
the
RJiazhen/issue85
branch
from
October 19, 2026 12:01
1603079 to
3990315
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
An unchanged chapter still offered an enabled Completed action, and chapter rows without a chevron started left of their neighbours, so the list shifted on every chapter switch.
-unchangedcontextValuetoken and swap the Completed action for an always-disabled pass icon whose contributed command title explains why the chapter has nothing to apply. A disabled toolbar action only surfaces its title, hence the separatelearnByDiff.chapterHasNoChangescommand (no-op handler,enablement: "false").iconPath, chevron or not: the applied chapter keeps its Not Started (circle-large) / Completed (pass) status icon and every other chapter gets amortar-boardcourse marker. VS Code drops the twistie column on non-collapsible rows, so this keeps one title edge across row kinds.setSessionruns for the same workspace root. Both snapshots live in the same workspace, so a chapter switch does not change which files differ; clearing the cache made rows briefly rebuild as expandable and then collapse again.package.nls.json,zh-cn,zh-tw,ja;menus.test.tscovers the inline/navigationwhenclauses.Closes #85
Test plan
pnpm exec vp checkpnpm exec vp run -r test(124 tests, 21 files)pnpm exec vp run learn-by-diff#packsandbox/: an unchanged chapter shows a disabled pass icon, hovering it reads "No changes in this chapter"Made with Cursor