Skip to content

feat(ui): SPEC-V0-3-0-STATUS-BAR-WIRE-001 MS-1 — StatusBar functional wire (agent-mode / workspace-switch git label / status.* dispatch parity)#109

Merged
GoosLab merged 1 commit into
mainfrom
feature/SPEC-V0-3-0-STATUS-BAR-WIRE-001
May 5, 2026
Merged

feat(ui): SPEC-V0-3-0-STATUS-BAR-WIRE-001 MS-1 — StatusBar functional wire (agent-mode / workspace-switch git label / status.* dispatch parity)#109
GoosLab merged 1 commit into
mainfrom
feature/SPEC-V0-3-0-STATUS-BAR-WIRE-001

Conversation

@GoosLab
Copy link
Copy Markdown
Collaborator

@GoosLab GoosLab commented May 5, 2026

Summary

  • StatusBar functional wire (audit Top 16 follow-up, lightweight SPEC feat(explorer): SPEC-V3-005 MS-2 — watch + debounce + delta apply #14 of v0.3.0 cycle)
  • StatusCommand enum + route_status_command_to_kind (3 branches + None default)
  • derive_status_git_label_from_workspace placeholder helper
  • 3 cx-bound RootView setters: set_status_agent_mode / clear_status_agent_mode / refresh_status_git_label
  • dispatch_command status.* namespace branch (parity with pane.* / surface.new.*)
  • handle_activate_workspace hook → refresh_status_git_label (additive only)
  • status_bar.rs FROZEN

Tests

  • 5 cx-free helper unit tests (AC-SBW-1~5)
  • AC-SBW-6: 3-gate (cargo build + clippy + test)
  • Total: 1369 → 1374 PASS (+5)

Files Changed

  • crates/moai-studio-ui/src/lib.rs — StatusCommand + 5 helpers + 5 tests + hook
  • .moai/specs/SPEC-V0-3-0-STATUS-BAR-WIRE-001/ — spec.md + progress.md

🗿 MoAI email@mo.ai.kr

… wire (agent-mode setter / workspace-switch git label / status.* dispatch parity) (AC-SBW-1~6)

- StatusCommand enum + route_status_command_to_kind helper (3 branches + None)
- derive_status_git_label_from_workspace placeholder helper
- 3 cx-bound RootView setters + dispatch_command status.* parity
- handle_activate_workspace 후 refresh_status_git_label hook (additive)
- 6 cx-free helper unit tests (AC-SBW-1~6)

🗿 MoAI <email@mo.ai.kr>
@GoosLab GoosLab merged commit fc705d9 into main May 5, 2026
15 of 17 checks passed
@GoosLab GoosLab deleted the feature/SPEC-V0-3-0-STATUS-BAR-WIRE-001 branch May 5, 2026 03:22
GoosLab added a commit that referenced this pull request May 5, 2026
PR #109 (StatusBar wire) 머지 시 progress.md + lib.rs만 포함되고 spec.md가
plan phase commit 누락으로 main에 untracked 상태였음. lightweight SPEC 패턴
유지를 위해 spec.md 단독 commit으로 보완.

🗿 MoAI <email@mo.ai.kr>
GoosLab added a commit that referenced this pull request May 6, 2026
…graduation (placeholder → moai-git real query) (AC-SBW-7~12) (#111)

#109 placeholder body 졸업: derive_status_git_label_from_workspace 의 입력을 workspace ID(&str)에서 실제 path(&Path)로 바꾸고, 본체를 moai_git::GitRepo 호출로 교체. workspace 전환 시 status bar 가 실제 branch 이름과 dirty marker 를 표시한다.

주요 변경:
- crates/moai-studio-ui/src/lib.rs:
  - derive_status_git_label_from_workspace: &str → &Path. GitRepo::open + current_branch + is_dirty 호출. non-git/IO 실패는 None, detached HEAD 는 "detached" 라벨 (REQ-SBW-008..012).
  - refresh_status_git_label: self.active_id 로 self.workspaces 에서 in-memory lookup → project_path 추출 → derive 호출. lookup miss 는 clear_git_branch + cx.notify (REQ-SBW-013).
  - 기존 placeholder unit test 2개 제거, fixture 기반 5개 신설 (clean / dirty / non-git / detached / missing path). 1374 → 1377 tests.
- crates/moai-studio-ui/Cargo.toml: git2 0.20 dev-dependency 추가 (Repository::init / set_head_detached fixture 용도). production 코드는 기존 moai-git wrapper 만 사용.

Spec 편차 (progress.md §"Spec Deviation" 참고):
moai_git::current_branch() 는 detached HEAD 에서 Ok("HEAD") 반환 (Err(DetachedHead) 가 아님). 양쪽 경로 모두 "detached" 라벨로 매핑하여 사용자 가시 동작은 spec REQ-SBW-010 과 일치.

테스트:
- cargo test -p moai-studio-ui --lib → 1377 passed / 0 failed
- cargo clippy -p moai-studio-ui --all-targets -- -D warnings → 0 warnings
- cargo fmt --all -- --check → clean

🗿 MoAI <email@mo.ai.kr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant