UI quickstart improvements#13
Merged
Merged
Conversation
- Remove VITE_ prefix from env vars for cleaner user experience - Use Vite define + loadEnv to explicitly expose unprefixed env vars - Clean up placeholder-map.yaml (remove unused process.env patterns) - Add run_command field to manifest and snippet extraction - Fix tsconfig types for Node.js in scripts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR improves the Quickstart React UI sample configuration and snippet metadata so downstream tooling (ciam-core/admin Quickstart UI) can run samples and render extracted snippets with the correct environment-variable placeholders.
Changes:
- Add
run_commandto scenario manifests and propagate it intosnippets.jsonvia extraction/aggregation scripts. - Switch the React Vite sample from
VITE_*env vars to plainISSUER_URL,CLIENT_ID, etc., explicitly exposing only the required variables to the client. - Update placeholder mapping to match the new
import.meta.env.*patterns and adjust scripts TS config to include Node types.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| snippets.json | Adds run_command field to the emitted snippet metadata. |
| snippet-manifest.yaml | Adds run_command to the aggregated scenario manifest. |
| scripts/tsconfig.json | Includes Node.js types for script compilation. |
| scripts/extract-snippets.ts | Extends snippet extraction to include optional run_command from manifests. |
| scripts/aggregate-manifests.ts | Extends scenario manifest typing to include optional run_command. |
| samples/react/manifest.yaml | Adds per-scenario run_command for React sample. |
| samples/react/login-pkce/vite.config.ts | Loads non-VITE_ env vars and defines a safe, explicit client exposure list. |
| samples/react/login-pkce/src/App.tsx | Updates env var reads to import.meta.env.ISSUER_URL, etc. |
| samples/react/login-pkce/.env.example | Updates example env file to remove VITE_ prefixes. |
| placeholder-map.yaml | Updates placeholder patterns to match new env var access and removes unused patterns. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Extract run_command to local variable to avoid redundant lookup - Add validation for missing env vars in vite.config.ts with clear error Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CI has no .env file. Validate on serve only and default to empty strings during build so CI passes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VITE_prefix from env vars — users configure plainISSUER_URL,CLIENT_ID, etc. in.envloadEnv+defineto explicitly expose only the 5 required env vars to the browser (no security risk)placeholder-map.yaml— remove unusedprocess.env.REACT_APP_*andprocess.env.SA_*patternsrun_commandfield to manifest and snippet extraction so ciam-core knows how to run each sampletsconfig.jsonin scripts to include Node.js types🤖 Generated with Claude Code