huskies: create 475_refactor_deduplicate_lifecycle_rs_move_functions_into_a_shared_parameterised_helper
This commit is contained in:
@@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
name: "Split Chat.tsx into smaller components"
|
|
||||||
---
|
|
||||||
|
|
||||||
# Refactor 473: Split Chat.tsx into smaller components
|
|
||||||
|
|
||||||
## Current State
|
|
||||||
|
|
||||||
- TBD
|
|
||||||
|
|
||||||
## Desired State
|
|
||||||
|
|
||||||
Chat.tsx is 1513 lines and growing. ChatInput and ChatHeader are already split out. Break up the remaining monolith into focused components — likely candidates: message list/rendering, websocket connection management, message bubbles, typing indicators, and any other distinct UI concerns.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- [ ] Chat.tsx reduced to under 500 lines by extracting components
|
|
||||||
- [ ] Message list/rendering extracted into its own component
|
|
||||||
- [ ] Message bubble rendering extracted into its own component
|
|
||||||
- [ ] WebSocket connection logic extracted (hook or provider)
|
|
||||||
- [ ] All existing Chat.test.tsx tests still pass
|
|
||||||
- [ ] No visual or behavioural regressions in the chat UI
|
|
||||||
|
|
||||||
## Out of Scope
|
|
||||||
|
|
||||||
- TBD
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
name: "Per-file test coverage report with improvement targets"
|
|
||||||
---
|
|
||||||
|
|
||||||
# Story 474: Per-file test coverage report with improvement targets
|
|
||||||
|
|
||||||
## User Story
|
|
||||||
|
|
||||||
As a developer, I want a standardised JSON output format for test coverage so that any language's coverage tool can produce it and huskies can read it without language-specific logic.
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
- [ ] Define a standard `.coverage_report.json` format: `{ "overall": float, "threshold": float, "files": [{ "path": string, "coverage": float }] }`
|
|
||||||
- [ ] Update huskies' own `script/test_coverage` to write `.coverage_report.json` in this format (Rust via `cargo llvm-cov --json`, frontend via vitest)
|
|
||||||
- [ ] `coverage` bot command reads `.coverage_report.json` and shows overall percentage plus top 5 lowest-covered files as improvement targets
|
|
||||||
- [ ] Document the `.coverage_report.json` format in `.huskies/README.md` so other projects can produce it from any language
|
|
||||||
- [ ] Huskies server has zero language-specific coverage logic — all intelligence is in the project's `script/test_coverage`
|
|
||||||
|
|
||||||
## Out of Scope
|
|
||||||
|
|
||||||
- TBD
|
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
name: "Deduplicate lifecycle.rs move functions into a shared parameterised helper"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Refactor 475: Deduplicate lifecycle.rs move functions into a shared parameterised helper
|
||||||
|
|
||||||
|
## Current State
|
||||||
|
|
||||||
|
- TBD
|
||||||
|
|
||||||
|
## Desired State
|
||||||
|
|
||||||
|
The move_story_to_current, move_story_to_done, move_story_to_merge, move_story_to_qa, and reject_story_from_qa functions share the same pattern: build paths, check idempotency, find source file in one or more stages, rename, clear front matter fields, log. Extract a shared `move_story()` helper parameterised by source stages, target stage, and fields to clear. The named functions become thin wrappers. The existing `move_story_to_stage` function should also use this shared helper. 27 existing tests provide a safety net.
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
- [ ] Single shared move_story helper function parameterised by source stages, target stage, and fields to clear
|
||||||
|
- [ ] All existing named move functions (move_story_to_current, move_story_to_done, move_story_to_merge, move_story_to_qa, reject_story_from_qa) become thin wrappers
|
||||||
|
- [ ] move_story_to_stage also delegates to the shared helper
|
||||||
|
- [ ] All 27 existing tests pass unchanged
|
||||||
|
- [ ] Net reduction of at least 150 lines from lifecycle.rs
|
||||||
|
|
||||||
|
## Out of Scope
|
||||||
|
|
||||||
|
- TBD
|
||||||
Reference in New Issue
Block a user