Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.