Repository navigation
style: restore rustfmt ordering in jcode-base and jcode-tui - #1818
Open
akushonkamen wants to merge 1 commit into
Open
akushonkamen wants to merge 1 commit into
akushonkamen wants to merge 1 commit into
Conversation
567706b (refactor(voice)) landed without running cargo fmt, leaving two ordering violations that keep the Quality Guardrails workflow red at "Check formatting" (step 6) and skip every later step: - crates/jcode-base/src/lib.rs: pub mod client_focus was declared after pub mod client_input - crates/jcode-tui/src/tui/app/voice_input.rs: the jcode_voice use group was declared before crossterm::event::KeyEvent Pure rustfmt-driven reordering, no semantic changes; cargo fmt --check is clean again for both crates and workspace-wide, and both crates still compile. Fixes 1jehuang#1796 Note: merging this restores formatting, but Quality Guardrails will still be red afterwards — the code-size-budget ratchet (step 12) currently reports 8 violations per scripts/check_code_size_budget.py on this branch, all pre-dating this change and none touched by it: - crates/jcode-app-core/src/server.rs (2545 -> 2556 LOC) - crates/jcode-app-core/src/tool/browser.rs (1272 -> 1284 LOC) - crates/jcode-sdk/src/client.rs (1968 -> 1985 LOC) - crates/jcode-voice/src/global/hotkey.rs (new oversized, 1211 > 1200 LOC) - src/cli/args.rs (1253 -> 1265 LOC) - src/cli/commands.rs (3584 -> 3614 LOC) - src/cli/dispatch.rs (1679 -> 1682 LOC) - src/cli/login.rs (1233 -> 1256 LOC) As the issue suggests, the baselines in scripts/code_size_budget.json are deliberately NOT blanket --updated here; shrinking those files is a separate decision per file. AI-assisted change, disclosed on the issue per CONTRIBUTING.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
|
This was referenced Oct 15, 2026
This branch has not been deployed
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.
Fixes #1796
Problem
567706b (
refactor(voice)) landed without running rustfmt, leaving two declaration-order violations that keep the Quality Guardrails workflow red at "Check formatting" (step 6) and mask every later step, including the ratchets:crates/jcode-base/src/lib.rs:pub mod client_focuswas declared afterpub mod client_inputcrates/jcode-tui/src/tui/app/voice_input.rs: thejcode_voiceuse group was declared beforecrossterm::event::KeyEventChange
Reorder only the two spots rustfmt requires —
client_focusmoves beforeclient_inputin lib.rs,jcode_voicemoves aftercrossterm::event::KeyEventin voice_input.rs. 2 files, ±2 lines, zero semantic changes.Note: the step-12 code-size-budget ratchet (
crates/jcode-sdk/src/client.rscurrently 1985 LOC vs baseline 1968 atscripts/code_size_budget.json:70) is a shrink decision and is deliberately left out of this fix — it is declared in the commit body and in the claim comment on the issue, to be handled separately. This change does not touch the baselines.Process notes: a timeline review of the issue (
gh api repos/1jehuang/jcode/issues/1796/timeline) showed this account only had #1816 cross-referenced (#1816 touches only server.rs and desktop-open/lib.rs, zero file overlap), with no earlier claim or PR. The claim comment with AI disclosure is at #1796 (comment) (AI-assisted contributions are explicitly welcome per CONTRIBUTING.md:19). The commit follows the repo's conventional-commit style; CONTRIBUTING.md has no DCO requirement, so no sign-off was added.Validation
cargo fmt --check -p jcode-base -p jcode-tuion pristine 54def93 (via stash round-trip) → exit 1, with the diff exactly lib.rs:28 (client_focusshould move earlier) + voice_input.rs:8 (jcode_voiceshould move later), matching the issue verbatim. After the fix, the same command → exit 0, and workspace-widecargo fmt --check→ exit 0.cargo check -p jcode-base -p jcode-tui→ exit 0 (2m13s).cargo test -p jcode-base -p jcode-tui: jcode-base--lib1647 passed / 15 failed / 6 ignored — those 15 (auth::transfer/platform/session/skill/usage) also run 0 passed / 15 failed with--exacton untouched pristine master, i.e. pre-existing environment-dependent failures on this machine. jcode-tui--lib2537 passed / 3 failed vs 2535 passed / 5 failed for the same suite on pristine master; the isolated subset (2 passed / 1 failed, all shimmer-animation timing tests) is bit-identical before and after the fix. All failures are pre-existing flaky; this change has zero test regressions.AI disclosure
AI-assisted change, as disclosed on the issue; per CONTRIBUTING.md, held to the same standards as handwritten code.