Skip to content

feat: "Open config.toml" link in the settings panel footer - #39

Merged
mizu-jun merged 2 commits into
masterfrom
feat/settings-convenience-pack
Jul 29, 2026
Merged

feat: "Open config.toml" link in the settings panel footer#39
mizu-jun merged 2 commits into
masterfrom
feat/settings-convenience-pack

Conversation

@mizu-jun

Copy link
Copy Markdown
Owner

Summary

P4 of the Windows-Terminal-like UX plan: a right-aligned accent link in the settings-panel footer bar opens config.toml with the OS default editor — the equivalent of Windows Terminal's "Open JSON file" button, completing the GUI-settings + direct-file-edit two-tier flow.

Changes

  • platform::open_config_file() follows the existing open_releases_url pattern (open / xdg-open / cmd /c start "" <path> with CREATE_NO_WINDOW); the empty start title argument keeps paths with spaces intact. Creates the file (and parent dir) first when it does not exist.
  • Footer link drawn in overlay/settings/mod.rs; the hit-test in settings_panel_hit.rs mirrors the same bottom_y geometry. Link colour passes ensure_readable (≥ 4.5:1 contrast).
  • i18n: settings-open-config-file in all 8 locales.

Scope note

The per-field "restore default" item originally sketched for this phase moves into the P2 settings-row refactor, which introduces the per-row metadata (default value + write-back target) it needs — wiring ~50 fields twice would be wasted work.

Test plan

  • cargo test -p nexterm-client-gpu -p nexterm-i18n green (714 + locale key-parity)
  • cargo clippy --all-targets — no new warnings; cargo fmt --check clean
  • Desktop smoke test: link visible in the footer, click opens the editor, no console flash on Windows, long translations don't collide with the left hint text

🤖 Generated with Claude Code

Windows Terminal's "Open JSON file" equivalent: a right-aligned accent
link in the settings-panel footer bar opens config.toml with the OS
default editor.

- `platform::open_config_file` follows the `open_releases_url` pattern
  (open / xdg-open / `cmd /c start "" <path>` with CREATE_NO_WINDOW; the
  empty title argument keeps paths with spaces intact) and creates the
  file first when it does not exist yet.
- Hit-test mirrors the footer geometry (`bottom_y` formula) and only the
  label region is clickable; the link colour goes through
  `ensure_readable` for the 4.5:1 contrast rule.
- i18n: new `settings-open-config-file` key in all 8 locales.

Note: the per-field "restore default" item originally planned for this
phase moves into the P2 row-refactor, which introduces the per-row
metadata it needs.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@github-actions

Copy link
Copy Markdown

Coverage report


Generated by cargo llvm-cov (workspace minus nexterm-client-gpu and nexterm-i18n).

@github-actions

Copy link
Copy Markdown

Coverage report


Generated by cargo llvm-cov (workspace minus nexterm-client-gpu and nexterm-i18n).

@mizu-jun
mizu-jun merged commit accba48 into master Jul 29, 2026
12 checks passed
@mizu-jun
mizu-jun deleted the feat/settings-convenience-pack branch August 29, 2026 06:35
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