-
-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add support for overriding title and level through CLI params #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Naptie <57532127+Naptie@users.noreply.github.com>
Co-authored-by: Naptie <57532127+Naptie@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds CLI parameter support for overriding chart title and level strings in the Tauri environment, enabling automated batch rendering workflows. The implementation allows users to pass --title and --level arguments when launching the application, which will override values from chart files and disable the corresponding UI input fields.
- Adds CLI argument parsing to read
--titleand--levelfrom Tauri CLI args - Implements consistent override application when bundles are created, selected, or auto-selected
- Introduces helper function to reduce code duplication in override logic
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/routes/(app)/+page.svelte | Implements CLI parameter parsing, override logic via helper function, and UI field disabling when overrides are active |
| .gitignore | Adds package-lock.json to ignore list, appropriate for a pnpm-based project |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ...metadata!, | ||
| title: overrideTitle ?? metadata!.title, | ||
| level: overrideLevel ?? metadata!.level, | ||
| levelType: overrideLevel ? inferLevelType(overrideLevel) : metadata!.levelType, |
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition overrideLevel ? inferLevelType(overrideLevel) : metadata!.levelType uses a truthy check which could be problematic if overrideLevel is an empty string. Empty strings are falsy in JavaScript, so an empty string override would incorrectly fall back to the original levelType. Consider using overrideLevel !== undefined instead to match the pattern used in line 227 of the helper function.
| levelType: overrideLevel ? inferLevelType(overrideLevel) : metadata!.levelType, | |
| levelType: overrideLevel !== undefined ? inferLevelType(overrideLevel) : metadata!.levelType, |
Adds CLI parameter support for overriding chart title and level strings in Tauri environment, enabling automated batch rendering workflows.
Changes
--titleand--levelfrom Tauri CLI args ininit()applyMetadataOverrides(bundle)helper to reduce duplicationUsage
When overrides are set, the original values from chart files are replaced and the corresponding UI fields remain disabled.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
cdn.jsdelivr.net/usr/local/bin/node node /home/REDACTED/work/player/player/node_modules/.bin/vite build --config vite/config.prod.mjs(dns block)eu.posthog.com/usr/local/bin/node node /home/REDACTED/work/player/player/node_modules/.bin/vite build --config vite/config.prod.mjs(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.