Skip to content

chore: Pass the VS Code (and extension) version to App Inspector#143

Merged
skyrpex merged 1 commit intointegrate-appinspector-uifrom
DRG-472/appinsp/pass-vscode-version-to-appinspector
Apr 23, 2026
Merged

chore: Pass the VS Code (and extension) version to App Inspector#143
skyrpex merged 1 commit intointegrate-appinspector-uifrom
DRG-472/appinsp/pass-vscode-version-to-appinspector

Conversation

@peter-smith-phd
Copy link
Copy Markdown
Contributor

@peter-smith-phd peter-smith-phd commented Apr 23, 2026

Motivation

Pass the VS Code version, and the LocalStack extension version into App Inspector. This will be used when App Inspector sends usage analytics to the backend.

Change Summary

  • Inject an __APP_INSPECTOR_CONTEXT__ object into the App Inspector webview HTML containing source: "vscode", the VS Code version, and the extension version.
  • Consume that context in main.tsx and pass it to AppInspectorContextProvider as deploymentContainer, with an "unknown" fallback when the placeholder is not substituted.

Testing

  • Manually started App Inspector inside VS Code, then noted that the correct data appeared in the Tinybird database.

Related

Part of DRG-472.

🤖 Generated with Claude Code

@peter-smith-phd peter-smith-phd changed the title Pass the VS Code (and extension) version to App Inspector chore: Pass the VS Code (and extension) version to App Inspector Apr 23, 2026
@peter-smith-phd peter-smith-phd marked this pull request as ready for review April 23, 2026 01:09
Copy link
Copy Markdown
Contributor

@skyrpex skyrpex left a comment

Choose a reason for hiding this comment

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

I'd suggest using undefined instead of null as it's a safer default (if for some reason the replacement of __APP_INSPECTOR_CONTEXT__ doesn't occur, the value will be undefined instead of null).

Otherwise, it looks good to me 👍🏻

</head>
<body style="height: 100vh; margin: 0">
<div id="root" style="height: 100%; display: flex; flex-direction: column"></div>
<script>window.__APP_INSPECTOR_CONTEXT__ = null;</script>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
<script>window.__APP_INSPECTOR_CONTEXT__ = null;</script>
<script>window.__APP_INSPECTOR_CONTEXT__ = undefined;</script>

source: "vscode";
ideVersion: string;
extensionVersion: string;
} | null;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
} | null;
} | undefined;

);
})
.replace(
"window.__APP_INSPECTOR_CONTEXT__ = null;",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"window.__APP_INSPECTOR_CONTEXT__ = null;",
"window.__APP_INSPECTOR_CONTEXT__ = undefined;",

@skyrpex skyrpex merged commit 5d68876 into integrate-appinspector-ui Apr 23, 2026
3 of 6 checks passed
@skyrpex skyrpex deleted the DRG-472/appinsp/pass-vscode-version-to-appinspector branch April 23, 2026 06:57
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.

2 participants