Skip to content

Fix missing directories in path prompt when show_hidden is enabled#47983

Merged
JosephTLyons merged 2 commits intomainfrom
fix-missing-directories-in-path-prompt-when-show_hidden-is-enabled
Jan 30, 2026
Merged

Fix missing directories in path prompt when show_hidden is enabled#47983
JosephTLyons merged 2 commits intomainfrom
fix-missing-directories-in-path-prompt-when-show_hidden-is-enabled

Conversation

@JosephTLyons
Copy link
Collaborator

The Select Toolchain Path picker would skip directories that exist on my system and display open this directory multiple times. Personal is missing:

SCR-20260129-tvcc
~/Projects> ls
╭───┬──────────┬──────┬────────┬─────────────╮
│ # │   name   │ type │  size  │  modified   │
├───┼──────────┼──────┼────────┼─────────────┤
│ 0 │ Personal │ dir  │ 1.5 kB │ 2 weeks ago │
│ 1 │ Work     │ dir  │ 1.0 kB │ 2 hours ago │
╰───┴──────────┴──────┴────────┴─────────────╯
~/Projects> 

Release Notes:

  • Fixed a bug where directories could be missing from the Select Toolchain Path path picker

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 30, 2026
@JosephTLyons JosephTLyons enabled auto-merge (squash) January 30, 2026 04:07
When hidden_entries was true (set via .show_hidden()), max_id was never
computed because it was only calculated inside the block that filters
hidden files. This caused max_id to stay at 0.

When the current directory entry is prepended to the list, it was assigned
id: max_id + 1 = 1. However, entries already have sequential ids starting
from 0, causing duplicate ids and missing entries in the list.

Fix: compute max_id upfront from all entries before any filtering occurs.
@JosephTLyons JosephTLyons force-pushed the fix-missing-directories-in-path-prompt-when-show_hidden-is-enabled branch from 5e4e093 to ca6d98d Compare January 30, 2026 04:12
@JosephTLyons JosephTLyons merged commit 0ede074 into main Jan 30, 2026
27 checks passed
@JosephTLyons JosephTLyons deleted the fix-missing-directories-in-path-prompt-when-show_hidden-is-enabled branch January 30, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant