Skip to content

docs: add env-fallback example with interactive playground - #31

Merged
gen740 merged 6 commits into
mainfrom
docs/env-fallback
May 10, 2026
Merged

gen740 merged 6 commits into
mainfrom
docs/env-fallback

Conversation

@gen740

@gen740 gen740 commented May 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add examples/env_fallback.cc: demonstrates --threads (NUM_THREADS, range<1,32>), --config (CONFIG_FILE, matches<*.toml>), and --verbose (VERBOSE flag) with env-var fallback
  • Add docs/examples/env-fallback.mdx with an interactive playground featuring an editable environment-variable table above the terminal
  • ExamplePlayground: new initialEnv prop renders a key=value editor panel; env vars are injected via ccall('setenv') before callMain (requires _setenv + ccall in EXPORTED_FUNCTIONS/EXPORTED_RUNTIME_METHODS)
  • Fix cursor blink: animate background only so the character under the cursor stays visible
  • parser.hh: prefix missing_required error subject with -- (e.g. --threads instead of threads); update affected tests
  • Add env-fallback entry to examples index TOC

🤖 Generated with Claude Code

gen740 and others added 6 commits May 10, 2026 23:19
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ound

- examples/env_fallback.cc: threads (NUM_THREADS, range<1,32>),
  config (CONFIG_FILE, matches<*.toml>), verbose (VERBOSE flag)
- ExamplePlayground: add initialEnv prop with editable env-var table;
  inject via ccall('setenv') before callMain
- CSS: pg-env-panel styles; fix cursor blink to animate background only
- exampleSetups: setupEnvFallbackFs creates /job.toml and /configs/prod.toml
- docs/examples/env-fallback.mdx: example page with interactive playground
- docs/examples/index.mdx: add env-fallback to TOC
- parser.hh: prefix missing_required subject with '--'
- test_parse.cc, test_sugar.cc: update subject assertions to '--option'

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ig files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gen740
gen740 enabled auto-merge (rebase) May 10, 2026 15:41
@gen740
gen740 merged commit fa46bda into main May 10, 2026
9 checks passed
@gen740
gen740 deleted the docs/env-fallback branch May 10, 2026 15:42
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