Skip to content

Show proper error message when trying to visualize pseudo scopes#3290

Merged
AndreasArvidsson merged 2 commits into
mainfrom
visualisePseudoScopes
Jul 7, 2026
Merged

Show proper error message when trying to visualize pseudo scopes#3290
AndreasArvidsson merged 2 commits into
mainfrom
visualisePseudoScopes

Conversation

@AndreasArvidsson

Copy link
Copy Markdown
Member

No description provided.

@AndreasArvidsson AndreasArvidsson requested a review from a team as a code owner July 7, 2026 08:09
@AndreasArvidsson AndreasArvidsson merged commit 95d4e61 into main Jul 7, 2026
16 checks passed
@AndreasArvidsson AndreasArvidsson deleted the visualisePseudoScopes branch July 7, 2026 08:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d508aadad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


return {
start(scopeType: ScopeType, visualizationType: VisualizationType) {
if (isPseudoScope(scopeType)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow interior scopes to be visualized

When the requested scope is {type: "interior"}, this guard now throws because isPseudoScope includes interior in pseudoScopes. Unlike instance/className/functionName, interior has a real handler (ScopeHandlerFactoryImpl has a dedicated case "interior" backed by language @interior captures), so cursorless.showScopeVisualizer for interior content/removal no longer works for custom spoken forms or contributor debugging even though the renderer can handle it. Exclude interior from this visualizer guard and only reject pseudo scopes without handlers.

Useful? React with 👍 / 👎.

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