Skip to content

feat(doctor): native Rust path for sk status / statusline — eliminate Python startup cost #696

@magicpro97

Description

@magicpro97

User Story

As a user with sk statusline in my shell prompt, I want the status footer to render instantly, so my prompt never lags.

Problem

  • sk status and sk statusline dispatch via Python fallback — no Commands::Status enum in sk-rust/src/main.rs
  • Called on every session footer, Python startup adds ~150ms on cold start
  • statusline.py is 547 lines but most of the hot path (session-state JSON read + table render) is read-only and perfect for Rust

Proposed Solution

Add Commands::Status to main.rs handling wakeup/default modes natively. Python fallback retained for --quota (needs gh CLI).

Acceptance Criteria

  1. sk status and sk statusline invoke native Rust for default table mode; Python fallback retained for --quota
  2. Startup time for sk status ≤ 50ms on warm binary
  3. Output identical to Python for non-color path (SK_NO_COLOR=1)

Files

  • sk-rust/src/commands/statusline.rs (new)
  • sk-rust/src/main.rs

Priority

Medium — performance improvement, not blocking

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:mediumAuto-created for research issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions