Fork-aware PR/review discovery, guided setup, and worklog UX#7
Merged
Conversation
- Item.ReviewState carries the user's verdict on a reviewed PR (APPROVED / CHANGES_REQUESTED / COMMENTED / …). - CleanText strips ANSI/OSC escape sequences and control characters from externally-sourced text (commit subjects, PR titles) so a crafted message cannot inject terminal escapes into the picker, preview, or a worklog printed to the terminal.
…iews GitHub discovery now queries every remote (not just origin), so PRs and reviews opened against an upstream parent in a fork workflow are found. - repoSlugs(): collect distinct owner/repo across all remotes, origin first - createdQualifier / updatedSinceQualifier: date authored PRs by created:, and PR-commits/reviews by a lower-bound updated: so in-range items that were updated again later aren't dropped - reviewDayInRange returns the review verdict; any review state counts - anchorMidnight pins relative --since words (today, yesterday, N days ago) to local midnight so "--since today" no longer misses earlier work - isNoiseSubject drops merge commits and git-stash entries - sanitize commit/PR titles via model.CleanText - announce each scan phase before it runs (count 0) so the UI can show the active phase, then report its result count Adds tests for the date qualifiers, slug parsing, and noise filtering.
…r spinner - Markdown is grouped by date then by kind (Commits / Pull requests / Reviews), with a cleaner header and one-line summary. - Review entries show the verdict (approved / changes requested / …) and the PR's state, with a distinct icon per verdict. - Scanning spinner shows a completed-phase checklist, the phase currently running, and elapsed time + running total — so it never looks frozen, and the reviews phase is visible while it runs. Adds render tests for the verdict mapping and review line.
…picker - First run with no repos launches a guided setup: scan common roots, show repo counts, pick one, optionally save it, and report gh auth. Re-runnable any time via --setup. - config gains ErrNoRepos, ScanCommonRoots, CountRepos, SaveRoot. - Clearer guidance when no repos are configured, nothing is found in range, or gh is missing/unauthenticated. - --copy now copies the whole worklog and skips the picker and editor, for a one-shot "scan and copy" flow. Adds config tests for CountRepos and SaveRoot.
- CI runs govulncheck on every push to catch known vulnerabilities in the module and its dependencies. - SECURITY.md documents the threat model (no shell interpolation, no credential handling, text sanitization) and how to report issues. - Stop .gitignore's *.md rule from hiding SECURITY.md. - cspell.json whitelists project-specific terms.
- Quick start covering the guided first-run setup and --setup. - Pull requests & reviews section: reviews are on by default, fork-aware discovery, and how to enable via gh. - Security summary linking SECURITY.md. - Note --copy skips the picker.
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
A batch of correctness fixes and DX/UX improvements to commit-chronicle, split into logical, independently-building commits.
Fixes (correctness)
origin. In a fork workflow you push to your fork but open PRs / submit reviews against theupstreamparent; those were previously invisible.--sinceanchoring —--since today(andyesterday,N days ago) now anchor to local midnight, so they no longer silently miss work committed earlier in the day.created:; PR-commits and reviews use a lower-boundupdated:so in-range items updated again later aren't dropped.index on …,WIP on …) are filtered out of the worklog.Reviews
Onboarding / DX
ghauth. Re-runnable via--setup.ghmissing.--copynow copies the whole worklog and skips the picker + editor (one-shot "scan and copy").Output / UX
Security
model.CleanText) to strip terminal escape sequences before display.govulncheckto CI; addSECURITY.md.Commits
feat(model)— review verdict field + text sanitizerfix(collect)— fork-aware discovery, date handling, richer reviews, noise filteringfeat(render,tui)— grouped markdown, review verdict, livelier spinnerfeat(app)— guided setup, better messages,--copyskips pickerchore(security)— govulncheck CI, SECURITY.md, cspelldocs(readme)— quick start, reviews, fork behavior, securityTesting
go build ./...,go vet ./...,gofmt, andgo test ./...all pass.CleanText, config helpers, review verdict rendering.