Skip to content

feat(statusline): show active spec slug instead of disabled active-plan#55

Open
hapo-nghialuu wants to merge 1 commit into
devfrom
feat/statusline-active-spec
Open

feat(statusline): show active spec slug instead of disabled active-plan#55
hapo-nghialuu wants to merge 1 commit into
devfrom
feat/statusline-active-spec

Conversation

@hapo-nghialuu

Copy link
Copy Markdown
Member

Mục tiêu

Status line đang hard-code tắt chỉ báo plan (planPart = ''). Thay bằng chỉ báo spec đang active và hiển thị ra.

Thay đổi

  • Thêm detectActiveSpec(baseDir): scan specs/*/spec.json, lấy slug spec đầu tiên có status: in_progress (hỗ trợ legacy in-progress); đọc paths.specs từ runtime.json (default specs); fail-open.
  • Bật hiển thị: render 📋 <slug> ở location line; tự ẩn khi không có spec active.
  • Bỏ block đọc ck-session-*.jsonsession.activePlan (dead code, display vốn đã tắt).
  • Đổi field ctx.activePlanctx.activeSpec.
  • Đồng bộ cả source (packages/spec/src/claude/status.cjs) và installed copy (.claude/status.cjs).

Tái dùng đúng pattern discovery của hooks/spec-state.cjs (first match wins).

Verify

  • node --check status.cjs
  • Runtime giả lập: có spec in_progress → hiện 📋 user-auth; không có → ẩn, không lỗi ✓
  • Self-tests run-skill-self-tests.mjs: 42 pass / 0 fail
  • Source ↔ installed copy đồng bộ ✓

Câu hỏi mở

  • detectActiveSpec trùng ~10 dòng logic với spec-state.cjs — giữ inline (KISS) hay tách hooks/lib dùng chung?

Replace the disabled active-plan indicator with active-spec detection.
detectActiveSpec() scans specs/*/spec.json for status in_progress
(resolving paths.specs from runtime.json) and renders "📋 <slug>" in
the location line; hidden when no spec is active. Removes the unused
session temp-file activePlan lookup that fed the disabled display.
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