Skip to content

tui: keep inaccessible apps out of the mention picker - #24104

Closed
dank-openai wants to merge 2 commits into
mainfrom
dank/wip/prevent-inaccessible-app-mentions
Closed

dank-openai wants to merge 2 commits into
mainfrom
dank/wip/prevent-inaccessible-app-mentions

Conversation

@dank-openai

@dank-openai dank-openai commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

Fixes $ autocomplete showing every App.

Keep the app server's accessibility decision when an app list update reaches the TUI, so directory-only apps do not appear in the $ mention picker as if they were available.

Previously, the TUI marked both available before building the picker. Now it preserves the unavailable flag and only Google Drive is shown.

Tests

Manual inspection: Codex TUI now works as expected. $ only shows installed plugins, skills, etc.

Validation covered the app-list update path and nearby app picker behavior:

  • cargo test -p codex-tui apps_notification_update_excludes_inaccessible_apps_from_mentions -- --nocapture
  • cargo test -p codex-tui apps_ -- --nocapture

Preserve the accessibility flags already computed by the app server when the TUI receives an app list update. This stops directory-only apps from being marked as usable and shown in the `$` picker.
Cover an app list update with one usable app and one directory-only app. The `$` picker should show the usable app and keep the directory-only app hidden.

### Tests

- `cargo test -p codex-tui apps_notification_update_excludes_inaccessible_apps_from_mentions -- --nocapture`
@dank-openai
dank-openai marked this pull request as ready for review May 22, 2026 17:26
@dank-openai
dank-openai requested a review from etraut-openai May 26, 2026 01:15
canvrno-oai added a commit that referenced this pull request May 26, 2026
## Summary

Fix the TUI `$` app mention paths so App Directory rows that are not
accessible are not treated as usable apps.

This includes the core preservation fix from #24104, but expands it to
the other app mention paths:

- preserve app-server `is_accessible` flags when partial
`app/list/updated` snapshots reach the TUI
- require apps to be both accessible and enabled when resolving exact
`$slug` mentions
- require restored/stale `app://...` bindings to point at accessible,
enabled apps before emitting structured app mentions
- remove the now-unused `codex-chatgpt` dependency from `codex-tui`,
which addresses the `cargo shear` failure seen on #24104

## Root Cause

The app server already sends merged app snapshots with accessibility
computed. The TUI handled app-server app list updates as partial app
loads and re-ran the old accessible-app merge path. That path treated
every notification row as accessible, so App Directory entries with
`isAccessible=false` could appear in `$` suggestions.

Regression source: #22914 routed app-list updates through the app server
while reusing the old TUI partial-load handling. Related precursor:
#14717 introduced the partial-load path, but #22914 made it user-visible
for app-server updates.

## Issues

Fixes #24145
Fixes #24205
Fixes #24319

## Validation

- `just fmt`
- `git diff --check`
- `just bazel-lock-update`
- `just bazel-lock-check`
- `just argument-comment-lint -p codex-tui`
- `just test -p codex-tui
chatwidget::tests::popups_and_settings::apps_notification_update_excludes_inaccessible_apps_from_mentions
chatwidget::tests::composer_submission::submit_user_message_ignores_inaccessible_app_mentions_from_bindings
chatwidget::skills::tests::find_app_mentions_requires_accessible_enabled_apps_for_bound_paths
chatwidget::skills::tests::find_app_mentions_requires_accessible_enabled_apps_for_slugs`
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Jun 9, 2026
wangjiecloud pushed a commit to wangjiecloud/codex that referenced this pull request Jun 27, 2026
## Summary

Fix the TUI `$` app mention paths so App Directory rows that are not
accessible are not treated as usable apps.

This includes the core preservation fix from openai#24104, but expands it to
the other app mention paths:

- preserve app-server `is_accessible` flags when partial
`app/list/updated` snapshots reach the TUI
- require apps to be both accessible and enabled when resolving exact
`$slug` mentions
- require restored/stale `app://...` bindings to point at accessible,
enabled apps before emitting structured app mentions
- remove the now-unused `codex-chatgpt` dependency from `codex-tui`,
which addresses the `cargo shear` failure seen on openai#24104

## Root Cause

The app server already sends merged app snapshots with accessibility
computed. The TUI handled app-server app list updates as partial app
loads and re-ran the old accessible-app merge path. That path treated
every notification row as accessible, so App Directory entries with
`isAccessible=false` could appear in `$` suggestions.

Regression source: openai#22914 routed app-list updates through the app server
while reusing the old TUI partial-load handling. Related precursor:
openai#14717 introduced the partial-load path, but openai#22914 made it user-visible
for app-server updates.

## Issues

Fixes openai#24145
Fixes openai#24205
Fixes openai#24319

## Validation

- `just fmt`
- `git diff --check`
- `just bazel-lock-update`
- `just bazel-lock-check`
- `just argument-comment-lint -p codex-tui`
- `just test -p codex-tui
chatwidget::tests::popups_and_settings::apps_notification_update_excludes_inaccessible_apps_from_mentions
chatwidget::tests::composer_submission::submit_user_message_ignores_inaccessible_app_mentions_from_bindings
chatwidget::skills::tests::find_app_mentions_requires_accessible_enabled_apps_for_bound_paths
chatwidget::skills::tests::find_app_mentions_requires_accessible_enabled_apps_for_slugs`
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