Skip to content

refactor(config): centralize interactive render options - #11522

Merged
jdx merged 1 commit into
agent/refactor-env-directive-contextfrom
agent/refactor-interactive-renderer
Jul 30, 2026
Merged

jdx merged 1 commit into
agent/refactor-env-directive-contextfrom
agent/refactor-interactive-renderer

Conversation

@jdx

@jdx jdx commented Jul 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • group renderer metadata into a typed RenderOptions value
  • centralize terminal styles in RenderStyles
  • remove two clippy::too_many_arguments exceptions without changing rendered output

Validation

  • mise run lint
  • cargo check --all-features
  • cargo clippy -p mise-interactive-config --all-targets --all-features -- -D warnings
  • cargo test -p mise-interactive-config -- --skip schema::tests::test_setting_types --skip schema::tests::test_valid_settings (35 passed)

The full crate suite also reports two pre-existing schema failures (test_setting_types and test_valid_settings), reproduced unchanged on the parent branch in #11521.

AI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: e78d124e-3f2f-4ded-8a0b-6560384c33b3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Centralizes interactive rendering configuration without changing behavior.

  • Replaces separate title, path, dry-run, and undo arguments with a RenderOptions struct.
  • Groups terminal styles into a RenderStyles struct shared throughout each render pass.
  • Updates the sole renderer call site to supply the centralized options.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The sole renderer caller uses the new options type with values equivalent to the previous arguments, while the style extraction preserves the same rendering operations.

Important Files Changed

Filename Overview
crates/mise-interactive-config/src/editor/mod.rs Updates the sole Renderer::render call site with a one-to-one mapping into RenderOptions.
crates/mise-interactive-config/src/render.rs Consolidates render arguments and styles while preserving existing header, item, and footer behavior.

Reviews (1): Last reviewed commit: "refactor(config): centralize interactive..." | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▂▂▁▆▆█▆██▇▇█▇▇█▆▃▃ 84,685,231 → 84,698,440 +0.02% 31.26 → 29.09ms -6.93%
hook-env ▄▃▃▇▇█▆███▇▇█▇▇▇▁▁ 87,057,131 → 87,095,069 +0.04% 26.40 → 25.41ms -3.76%
ls ▄▆▁▄▅█▃▅▅▇▅▆▆▆▆▄▅▅ 76,709,887 → 76,708,856 -0.00% 21.20 → 18.70ms -11.77%
registry ▇▅▃▇▇█▅█▇██▇█▆▆▅▁▂ 50,102,060 → 50,123,893 +0.04% 14.46 → 12.41ms -14.14%
startup ▇█▃▇▇▇▆▆▆▇▆▆▇▅▆▅▁▁ 15,941,779 → 15,947,842 +0.04% 11.62 → 9.41ms -19.06%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

fb2e1fac769b vs 1581ac06d458 · measured on the runner, not pushed to the history.

@jdx
jdx merged commit 5982809 into main Jul 30, 2026
30 checks passed
@jdx
jdx deleted the agent/refactor-interactive-renderer branch July 30, 2026 23:56
jdx added a commit that referenced this pull request Jul 30, 2026
## Summary
- return process statuses through `ExitCode` instead of calling the
disallowed `std::process::exit`
- rename enum variants so they satisfy Clippy without suppressions
- normalize seccomp syscall constants across integer widths
- use an async-aware mutex in the brew test that holds a guard across
`await`
- remove six targeted Clippy exclusions and fix the uncovered
`mise-shim` warnings

## Validation
- `mise run lint`
- `cargo clippy --workspace --all-targets --all-features -- -D warnings`
- `cargo test -p mise-shim -p vfox --all-features` (91 passed, 2
ignored)
- `cargo test --all-features
test_manager_repairs_linked_record_without_repouring`

This is a prerequisite refactor in stack #11523; it targets #11522.

*AI-assisted — Tool: Codex; model: unavailable/unavailable; version:
unavailable.*

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Behavioral change is mainly exit path ordering (destructors run before
exit); exit codes and shell activation semantics are preserved.
> 
> **Overview**
> This PR clears several Clippy suppressions by adjusting how binaries
exit, renaming a few enums, and tightening test synchronization.
> 
> **Process exit:** `mise`, `mise-shim`, and `vfox` no longer call
`std::process::exit`. They return `ExitCode` from `main` (with
`exit::status` replacing `exit::terminate`), so teardown can run before
the process ends.
> 
> **Naming:** `ActivatePrelude` variants drop the `Env` suffix (`Set`,
`Prepend`, `MovePrepend`), and the completion CLI shell enum uses
`Powershell` instead of `PowerShell`, removing `enum_variant_names`
allowances.
> 
> **Other:** Seccomp rule keys use a small `syscall_number` helper
instead of a conversion lint allow. Brew pour tests switch from
`std::sync::Mutex` to `tokio::sync::Mutex` with `blocking_lock` /
`.await` so the async test can hold the env lock across `await` without
a clippy exception.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
479c2ea. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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