Skip to content

fix(setup-hints): delete orphaned StartupHints::with_spawn_notice helper #136

Closed

Description

@KooshaPari

Summary

PR #128 ("refactor(setup-hints): remove unreachable startup spawn notice") removed the only call site of StartupHints::with_spawn_notice, leaving the helper as a dead-code associated function. The session doc docs/sessions/2026-10-18-resume-reland/00_SESSION_OVERVIEW.md (~line 113) records this leftover as an explicit follow-up. The CI "Quality Guardrails" check now fails with:

error: associated function `with_spawn_notice` is never used
   --> crates/jcode-setup-hints/src/lib.rs:201:8

Investigation

  • with_spawn_notice is referenced NOWHERE on master except its own definition at crates/jcode-setup-hints/src/lib.rs:201.
  • StartupHints::with_status_and_display IS used in many places and must NOT be touched.
  • SetupHintsState::startup_spawn_hint_dismissed field must be KEPT for state-file serde compatibility (users may have false persisted).
  • fn startup_hints_for_launch(_state: &SetupHintsState) -> Option<StartupHints> must be KEPT (callers at lib.rs:1353 and tests in setup_hints_tests.rs depend on the signature).
  • StartupHints::status_notice field is NOT dead — it is read by src/cli/tui_launch.rs:244 and by crates/jcode-setup-hints/src/setup_hints_tests.rs:272. Field stays.

Fix

Delete the with_spawn_notice associated function entirely. No #[allow(dead_code)] — the call path is gone, the function should go too. Aggressive-change policy: remove, do not silence.

Validation

  • cargo clippy -p jcode-setup-hints --all-targets --all-features -- -D warnings — exit 0 (warning gone)
  • cargo fmt -p jcode-setup-hints -- --check — exit 0
  • cargo test -p jcode-setup-hints --lib — same set of pre-existing platform-specific failures as master (verified by re-running against origin/master); no NEW failures introduced by this change. The one setup_hints_test failure (first_three_launches_can_include_hotkey_notice_too) was already broken by PR refactor(setup-hints): remove unreachable startup spawn notice #128 and is out of scope here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions