fix: complete IssueStatus/IssueType types and improve formatTimeAgo#48
Open
kevglynn wants to merge 1 commit into
Open
fix: complete IssueStatus/IssueType types and improve formatTimeAgo#48kevglynn wants to merge 1 commit into
kevglynn wants to merge 1 commit into
Conversation
IssueStatus was missing deferred, pinned, and hooked — three built-in beads statuses. IssueType was missing question and docs. The code worked at runtime via fallback logic, but the types were incomplete and could mask bugs in exhaustive switch/case checks. formatTimeAgo now shows weeks (2w–4w), months (1mo–11mo), and years instead of raw day counts for older issues. "30d ago" → "1mo ago". Made-with: Cursor
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.
Summary
Two small quality fixes:
Complete type definitions —
IssueStatuswas missingdeferred,pinned, andhooked(three built-in beads statuses).IssueTypewas missingquestionanddocs. The code works at runtime via fallback logic, but incomplete types can mask bugs in exhaustive checks.Improve formatTimeAgo granularity — Previously, anything older than 1 day showed raw day counts (
30d ago). Now shows weeks (2w ago), months (1mo ago), and years (1y ago) for better readability.Changes
src/core/types.tsdeferred,pinned,hookedtoIssueStatus; addquestion,docstoIssueTypesrc/core/utils.tsformatTimeAgoTime formatting examples
14d ago2w ago30d ago1mo ago90d ago3mo ago400d ago1y agoTest Plan
tsc --noEmit)Closes #47
Made with Cursor