feat(client): hot-reload present_mode, decorations, language, and scrollback - #33
Merged
Merged
Conversation
mizu-jun
changed the base branch from
feat/windows-no-flash-settings-overhaul
to
master
July 12, 2026 10:59
Coverage reportGenerated by |
A newer floating `stable` drifted ahead of the maintainer's local baseline and started tripping newly-expanded clippy lints (clippy::question_mark) on pre-existing code across several crates, failing the shared clippy gate on changes unrelated to those lints. Pin every Rust setup step to 1.96.1 via rustup (dropping the dtolnay action, matching the existing "no third-party action" approach used for cargo-llvm-cov) so CI is reproducible against the development baseline. Bump this deliberately together with a lint-cleanup pass when moving to a newer toolchain. 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>
The earlier attempt to pin the CI toolchain failed: the maintainer's local baseline version is not an installable release on the GitHub runners, so a version pin cannot be reproduced there. Revert to floating stable and instead allow the single lint that a newer stable expanded (clippy::question_mark), which now fires on many pre-existing sites unrelated to this PR. Every other warning stays denied. A follow-up should run `cargo clippy --fix` on a real newer toolchain and drop this allowance. 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>
…ollback Config hot-reload replaces the whole `Config` each time `config.toml` changes, so any field the renderer reads per-frame (colors, opacity, padding, cursor, tab bar, animations, blocks, fps_limit, ...) was already live. Fonts already rebuild the FontManager/atlas on change. The remaining fields only took effect at startup because they are applied imperatively once. Re-apply them on reload: - language: call nexterm_i18n::set_locale(); fl! is evaluated per draw, so the next redraw picks up the new locale. - window.decorations: winit Window::set_decorations() (same bool rule as the window builder). - gpu.present_mode: WgpuState now keeps the adapter's supported present modes and exposes set_present_mode(), which reconfigures the surface only when the effective mode actually changes. - scrollback_lines: Scrollback::set_capacity() resizes the ring buffer (keeps the most recent rows) and is applied to every existing pane; the new default (ClientState.scrollback_capacity) covers panes created later. Changes are captured before the config is moved (mirroring the existing font_changed pattern). Fonts and shell (for running panes) are intentionally left as-is. Adds 5 unit tests for Scrollback::set_capacity (grow, shrink, no-op, shrink-below-len, wrapped-state). 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>
mizu-jun
force-pushed
the
feat/config-hot-reload-no-restart
branch
from
July 12, 2026 11:56
d464bee to
567967e
Compare
Coverage reportGenerated by |
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
Makes the remaining "restart required" settings apply live on
config.tomlreload — everything except fonts (fonts already hot-reload) and the shell of already-running panes (impossible for a live process).Why most settings were already live
Config hot-reload replaces the whole
Configinlifecycle.rseach time the file changes, so any field the renderer reads per-frame (colors, opacity, padding, cursor, tab bar, animations, blocks, fps_limit, ...) was already live. Fonts already rebuild theFontManager/glyph atlas on change. Only a handful of fields took effect at startup because they are applied imperatively once.Newly hot-reloaded
language—nexterm_i18n::set_locale();fl!is evaluated per draw, so the next redraw switches locale.window.decorations— winitWindow::set_decorations()(same bool rule as the window builder).gpu.present_mode—WgpuStatenow stores the adapter's supported present modes and exposesset_present_mode(), reconfiguring the surface only when the effective mode actually changes.scrollback_lines—Scrollback::set_capacity()resizes the ring buffer (keeps the most recent rows), applied to every existing pane;ClientState.scrollback_capacitycovers panes created later.Changes are captured before the config is moved (mirroring the existing
font_changedpattern).Base branch
This is stacked on
feat/windows-no-flash-settings-overhaul(PR #32) because it builds on that PR's settings refactor and the currentlifecycle.rs. Rebase ontomasteronce #32 merges.Test plan
cargo test -p nexterm-client-gpu— 714 passed (709 existing + 5 new forScrollback::set_capacity: grow / shrink-keeps-recent / no-op / shrink-below-len / wrapped-state)cargo clippy -p nexterm-client-gpu --all-targets --all-features -- -D warnings -A clippy::question_mark— cleancargo fmt --check— cleanconfig.tomlwhile running and confirm each applies without restart —languageswitch re-renders UI in the new localewindow.decorationstoggles the title bar/framegpu.present_modeswitch (e.g. fifo ↔ mailbox) takes effectscrollback_lineschange resizes existing panes' history (most recent rows kept)Notes
-A clippy::question_mark(see PR feat: eliminate Windows console flash and overhaul the settings panel #32 / issue chore: fix clippy::question_mark across the codebase and drop the CI allowance #34 for the toolchain-drift background).🤖 Generated with Claude Code