Skip to content

fix: improve hidden index tree item visibility and menu actions#674

Open
lte-z wants to merge 2 commits into
microsoft:mainfrom
lte-z:dev/lte_z/index-hidden-state
Open

fix: improve hidden index tree item visibility and menu actions#674
lte-z wants to merge 2 commits into
microsoft:mainfrom
lte-z:dev/lte_z/index-hidden-state

Conversation

@lte-z
Copy link
Copy Markdown

@lte-z lte-z commented May 22, 2026

Fixes #656

Changes

This PR improves hidden index visibility and context menu behavior in the tree view.

Tree item updates

  • Added hidden/default state segments to IndexItem context values
  • Added a hidden description for hidden indexes in the tree view

Context menu updates

Updated menu when clauses so only valid actions are shown:

  • Hidden indexes show only "Unhide Index…"
  • Non-hidden indexes show only "Hide Index…"
  • _id_ indexes show neither action

Behavior

Hidden indexes

  • Display hidden next to the index name in the tree
  • Show only "Unhide Index…" in the context menu

Regular indexes

  • Show only "Hide Index…" in the context menu

_id_ index

  • Does not show hide/unhide actions

Screenshots

_id_ index

id index

Regular and hidden indexes

Regular and hidden indexes

Notes

  • Tooltip behavior remains unchanged
  • Uses createContextValue() to compose index state context segments

Copilot AI review requested due to automatic review settings May 22, 2026 06:02
@lte-z lte-z requested a review from a team as a code owner May 22, 2026 06:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds richer context and UI cues for DocumentDB index tree items so the Hide/Unhide Index commands only appear when appropriate (e.g., not for default _id_ indexes, and toggling based on hidden state).

Changes:

  • Add index_hidden / index_default context values and show a “hidden” description for hidden indexes in the tree.
  • Update command when clauses to hide/show Hide/Unhide actions based on those context values.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/tree/documentdb/IndexItem.ts Adds contextValue tokens for default/hidden indexes and displays “hidden” in the tree item description.
package.json Refines command visibility logic for Hide/Unhide Index using the new contextValue tokens.

Comment thread package.json Outdated
Comment thread package.json
Comment thread src/tree/documentdb/IndexItem.ts
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

Index tree items lack visual indication of hidden state & show incorrect context menu actions 👁️🗂️

2 participants