Skip to content

Feat/status command#138

Merged
Qsnh merged 18 commits intomainfrom
feat/status-command
Apr 29, 2026
Merged

Feat/status command#138
Qsnh merged 18 commits intomainfrom
feat/status-command

Conversation

@Qsnh
Copy link
Copy Markdown
Contributor

@Qsnh Qsnh commented Apr 29, 2026

No description provided.

Qsnh and others added 18 commits April 29, 2026 02:06
Design for a chat-side /status slash command that shows the current
session's active bees and running immediate tasks, complementing the
existing /engine, /clear, and /stop commands.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
TDD-style step-by-step plan covering i18n keys, the new
StatusCommandHandler in internal/domain/command, format helpers,
empty-state and error-path tests, and wiring into the dispatch chain
in internal/app/app.go.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Use a single time.Now() for both Unix and UnixMilli readings
- Rename HandleCommand local 'tasks' -> 'runningTasks' to match clear.go
- Memoize worker name lookups across tasks in formatStatus
- Drop comments that only restate identifiers/format strings; keep WHY

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Both /status and /clear consume the same minimal session-context and
task-by-session reads. Lifting them to shared interfaces (which the
Clear*Store interfaces now embed) lets /status reuse them without
duplicating signatures.
Replace per-task GetByID calls (N+1 against the worker store) with a
single GetByIDs batch keyed by the distinct WorkerIDs across running
tasks; this removes the per-call nameCache and the lookupWorkerName
helper. Also inject a clock so relative-time assertions are
deterministic on slow CI runners, switch test assertions to compare
against i18n constants instead of hard-coded literals, add godoc on
the exported types, and unify the task-line newline handling via
strings.Join.
…ng comments

- Move SetClockForTest behind an export_test.go helper so the production
  handler no longer exposes a mutable clock.
- Drop WHAT-restating doc comments on Status* types/helpers; keep only
  WHY (clock-skew clamp; seconds-vs-millis time-base note).
- Preallocate the lines slice in formatStatus to its exact final size.
- Replace the magic 499 in PlatformFailureNotifier with a named
  constant plus a comment explaining the ellipsis budget.
- Document the +1-rune ellipsis surplus in utils.TruncateRunes.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Qsnh Qsnh merged commit 9db0844 into main Apr 29, 2026
@Qsnh Qsnh deleted the feat/status-command branch April 29, 2026 11:13
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