Skip to content

Check all IFS shortcuts in a single command - #3569

Merged
sebjulliand merged 1 commit into
codefori:masterfrom
phpdave:fix/throttle_ifs_shortcut_checks
Dec 4, 2026
Merged

sebjulliand merged 1 commit into
codefori:masterfrom
phpdave:fix/throttle_ifs_shortcut_checks

Conversation

@phpdave

@phpdave phpdave commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Changes

Follow-up to #3422, related to #2998.

The IFS shortcut decorator runs one isDirectory command per shortcut. VS Code requests all the decorations at once, so every shortcut opens its own SSH channel, and past sshd's MaxSessions (10 by default) the server refuses them: (SSH) Channel open failure: open failed.

  • IBMiContent.isDirectory now also accepts an array of paths, checked in a single command (same approach as countFiles).
  • ShortcutDecorationProvider checks all the shortcuts with one call and keeps the result until the next refresh.

Tested with 30 IFS shortcuts and bsh as the default shell: 45 refused channels on connect before, none after (2 commands, about 280 ms each).

Note: countFiles checks each directory with (cd ... || echo 0). Under bsh a failed cd ends the subshell, so a missing directory prints nothing and the counts shift. Not changed here.

How to test this PR

  1. Add more than 10 IFS shortcuts, one of them to a directory that no longer exists
  2. Reconnect
  3. No Channel open failure error; the output shows a single test -d ... command per refresh
  4. Only the missing directory has the ⚠ badge
  5. Run the test cases (isDirectory)

Checklist

  • have tested my change
  • have created one or more test cases
  • updated relevant documentation
  • Remove any/all console.logs I added
  • have added myself to the contributors' list in CONTRIBUTING.md

🤖 Generated with Claude Code

The IFS shortcut decorator ran one `isDirectory` command per shortcut,
all at once, opening more SSH channels than the server allows
("Channel open failure: open failed").

`isDirectory` now also accepts an array of paths, checked in a single
command, and the decorator uses it to check every shortcut at once.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@phpdave
phpdave deployed to testing_environment December 3, 2026 23:13 — with GitHub Actions Active
@sebjulliand
sebjulliand self-requested a review December 4, 2026 08:31
@sebjulliand sebjulliand self-assigned this Dec 4, 2026
@sebjulliand sebjulliand added bug A confirmed issue when something isn't working as intended enhancement New feature or request labels Dec 4, 2026

@sebjulliand sebjulliand left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works like a charm!
Thanks @phpdave

@sebjulliand
sebjulliand merged commit 8a56bf6 into codefori:master Dec 4, 2026
2 checks passed

This branch was successfully deployed

1 active deployment
testing_environment — 7d9fe9ae Deployed Dec 3, 2026 by phpdave via Test runner #820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug A confirmed issue when something isn't working as intended enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants