Fix high prio recommendations, add error / health screen

This commit is contained in:
2026-07-28 15:40:11 +02:00
parent 948f3e1a79
commit 7511311297
19 changed files with 1885 additions and 148 deletions

152
TODO.md
View File

@@ -1,42 +1,126 @@
# TODO
The read-only model now includes paginated review threads and comments, PR
conversation comments, submitted reviews, individual checks, branch-protection
requirements, rulesets, merge queues, deployment requirements, viewer
capabilities, head SHA, persistent unread updates, offline cache fallback,
commit/force-push history, and paginated checks and annotations.
The following read-only improvements remain before or alongside write support.
This list reflects the current implementation: paginated review threads,
thread comments, conversation comments, reviews, timeline events, checks, and
annotations; cached read-only snapshots; persistent unread state; contextual
keybindings; thread replies and resolution changes; and pull-request metadata
editing are already implemented.
## Workflow and navigation
## Completed resilience work
- Open the current PR, comment, review, check, or source location in a browser.
- Copy URLs, commit SHAs, file paths, and rendered comment text to the
clipboard.
- Add navigation for the next thread by status or author, not only the next
unread update.
- Remember the selected PR, thread, scroll position, pane width, and folded
state between runs.
- Audit screen-reader behavior beyond the new no-color and high-contrast modes.
- Refreshes render core data before annotations and conflict analysis. A
failed paginated subsection is marked partial and keeps the last complete
value while other sections continue updating.
- Polling uses GitHub rate-limit and retry headers, backs off at low remaining
budgets, and adds jitter. Failed-check annotations are cached by immutable
check ID.
- Superseded list, detail, and enrichment requests are canceled as newer
navigation or refresh work starts.
- Reply and PR-metadata drafts are stored in a versioned, atomic, permission
restricted file and restored after cancellation or restart.
- Unread state and disk cache are versioned and atomically replaced. Corrupt
persistence is reported by the health screen rather than silently trusted.
Cache writes are content-addressed, bounded, oldest-first pruned, and cached
branch recommendations remain available offline.
- Editor character motions, deletion, selection, wrapping, and clipboard
ranges operate on grapheme boundaries, with regression coverage for
combining marks, full-width characters, variation selectors, and joined
emoji.
- The health screen reports component status, rate-limit state, persistence
paths, partial data, and the session's wrapped warning/error history.
## Data completeness and resilience
## High value workflow additions
- Model pending reviews, minimized comments, deleted comments, and explicit
reply relationships.
- Show rate-limit remaining/reset information and distinguish it from network
or permission failures.
- Support retrying individual failed pages while retaining clearly marked
partial data, rather than failing the entire refresh.
- Add fixture coverage for GitHub Enterprise Server schema differences, team
reviewers, deleted users, very large PRs, and mixed legacy status contexts.
- Open the current PR, thread comment, submitted review, check, annotation,
commit, or source location in a browser.
- Copy URLs, commit SHAs, file paths, branch names, rendered comment text, and
raw Markdown through explicit contextual actions.
- Add a dedicated changed-files/check-details view. It should make the complete
PR diff and check annotations inspectable even when no review thread exists
at that location.
- Add navigation to the next thread by status, file, author, or failed check,
not only the next unread update.
- Persist the selected PR/thread, scroll anchors, focused pane, hidden-list
state, folded threads, active filter, and pane width between runs.
- Make the picker scope configurable: assigned PRs, viewer-authored PRs,
review-requested PRs, subscribed PRs, or a union of those scopes. Clearly
label why each PR appears.
- Add saved/named thread filters and search history for repeated review
workflows.
- Distinguish local unread state from GitHub notification state, and optionally
integrate with GitHub notifications without silently marking remote
notifications as read.
- Make health events individually selectable and copyable, and retain
per-subsection last-success timestamps across refreshes.
## Preparation for write support
## Data completeness and compatibility
- Add dashboard selectors for requested reviewers, labels, and assignees. Each
selector must support adding, removing, and clearing values with explicit
confirmation.
- Fetch per-comment update/delete permissions.
- Define head-SHA conflict handling for comments and suggestions composed
against an older revision.
- Design confirmation and optimistic-update behavior for submitting reviews
and applying suggestions. Thread replies and resolution changes now use
confirmed server responses.
- Paginate or explicitly mark truncation for the remaining fixed-size
connections: assignees, labels, review requests, latest reviews, repository
rulesets, and rules within a ruleset.
- Model pending reviews, minimized comments, deleted comments/users, edited
timestamps, and explicit reply relationships.
- Preserve enough team-reviewer identity to distinguish teams with the same
display name and to generate a correct browser target.
- Represent partial permissions per comment and conversation item, not only
aggregate PR/thread capabilities.
- Verify ruleset, branch-protection, merge-queue, deployment, and check behavior
against supported GitHub Enterprise Server versions. Degrade individual
fields when a schema feature is unavailable instead of rejecting the whole
PR query.
- Improve uploaded-image and attachment handling with optional terminal image
protocols or an open/download action while keeping a textual fallback.
## Write roadmap
- Add fuzzy multi-select editors for requested reviewers, assignees, labels,
and milestone. Support adding, removing, and clearing values with an explicit
before/after confirmation.
- Add top-level PR conversation replies and editing/deleting the viewer's own
comments. Fetch and enforce per-comment update/delete permissions.
- Add reaction add/remove actions while retaining the current read-only counts.
- Support submitting pending reviews and review summaries, including approve,
comment, and request-changes states.
- Support applying GitHub suggestions only after validating the original
commit/head SHA and showing the exact resulting patch. Define behavior for
multiple suggestions, conflicts, dirty Git/Jujutsu workspaces, and remote
application.
- Add draft/ready-for-review and close/reopen actions.
- Consider merge, auto-merge, and merge-queue actions only after required
checks, review decision, permissions, stale-head protection, and destructive
confirmations are represented accurately.
- Define consistent optimistic-update and rollback behavior for every mutation.
Preserve drafts and server responses when a post-mutation refresh fails.
## UX and configurability
- Add diff-view settings for context size, tab width, whitespace visibility,
line-number style, syntax theme, and whether outdated/resolved context starts
collapsed.
- Add an optional command palette so configured actions remain discoverable
even when their key is forgotten or unbound.
- Audit screen-reader behavior beyond no-color/high-contrast themes, including
focus announcements, status symbols, popup ordering, and live refreshes.
- Add optional mouse selection/scrolling without changing keyboard-first
defaults.
- Make relative/absolute timestamp display and timezone configurable.
## Testing and maintainability
- Finish consolidating key dispatch, help, compact footers, and contextual
conflict validation into one action registry. Context validation is already
enforced, but declaration order and help descriptions remain separate.
- Coalesce unread-state persistence through the same delayed flush mechanism
used for drafts if future read-state actions make writes frequent.
- Add recorded GraphQL fixtures for GitHub.com and supported GitHub Enterprise
Server versions, including partial errors, rate limits, deleted actors, team
reviewers, mixed legacy statuses, and very large PRs.
- Add golden terminal snapshots across narrow/wide sizes, all themes,
configurable keys, Unicode-heavy content, editor modes, partial-data states,
and cached/live transitions.
- Add end-to-end mutation tests covering permission changes, stale head SHAs,
offline transitions, server success followed by refresh failure, and draft
recovery.
- Split the large GitHub-fetch and TUI update/render modules by data source and
screen once doing so removes duplicated state transitions; keep shared
behavior in small typed helpers rather than introducing a framework.