You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 11a33f4
Browse filesBrowse the repository at this point in the historyBrowse files
feat(dashboard): add clickable draft-to-ready badge, gate approve on failing CI, and refine dep status (#168)
## Summary
- Add a two-step clickable `Draft` / `D` -> `Ready?` pill (`DraftBadge`)
for self-authored open draft PRs across Pull Requests, Dependencies, and
Tracked Items tabs, backed by `markPullRequestReadyForReview` and a 60s
optimistic guard
- Gate `canApprovePR` to disallow inline PR approval when CI checks are
failing (`checkStatus === "failure"`)
- Refine `classifyDepStatus` so enriched non-draft PRs with `checkStatus
=== null` or `reviewDecision === "APPROVED"` remain in Mergeable (while
`CHANGES_REQUESTED` routes to Needs Action) and render explicit
check-status reason badges and `/checks` links in DependenciesTab
|`read:org`|`GET /user/orgs` — list user's organizations for the org selector |
134
134
135
-
**Note:** The `repo` scope grants write access to repositories. An Octokit request guard blocks all REST write operations (POST/PUT/PATCH/DELETE) and all GraphQL mutations except explicit user-confirmed PR approvals (`addPullRequestReview` with `event: APPROVE`).
135
+
**Note:** The `repo` scope grants write access to repositories. An Octokit request guard blocks all REST write operations (POST/PUT/PATCH/DELETE) and all GraphQL mutations except explicit user-confirmed PR approvals (`addPullRequestReview` with `event: APPROVE`) and marking draft PRs ready (`markPullRequestReadyForReview`).
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Open issues where you're the creator, assignee, or mentioned. A scope filter let
33
33
34
34
### Pull Requests
35
35
36
-
Open PRs with CI status dots (green/yellow/red), review decision badges, a read-only `auto` badge when GitHub auto-merge is enabled (with merge method tooltip), size badges (XS–XL by lines changed), draft indicators, and a two-step inline `Approve` button on PR rows requiring approval. A "blocked" filter catches PRs where checks are failing or a review requested changes. The scope filter works here too. Reviewer avatars stack for multiple reviewers.
36
+
Open PRs with CI status dots (green/yellow/red), review decision badges, a read-only `auto` badge when GitHub auto-merge is enabled (with merge method tooltip), size badges (XS–XL by lines changed), clickable two-step `Draft` → `Ready?` badges on your own draft PRs (read-only draft indicators on others'), and a two-step inline `Approve` button on PR rows requiring approval (hidden when CI checks are failing). A "blocked" filter catches PRs where checks are failing or a review requested changes. The scope filter works here too. Reviewer avatars stack for multiple reviewers.
37
37
38
38
### Actions
39
39
@@ -81,7 +81,7 @@ Star counts appear in repo group headers, fetched as part of the standard data r
81
81
82
82
### Dependencies Tab
83
83
84
-
An auto-detected built-in tab that appears when dependency bot PRs are found in your tracked repos. Dependency PRs are identified via a multi-layer bot detection pipeline (PR author login, branch name prefix, configurable label). Items are grouped by status — **Needs Review** (CI passing, not yet approved), **Waiting** (CI pending or draft), and **Stale** (open more than 14 days) — rather than by repo. Abandoned dependency pills link directly to the Renovate Dashboard issue for bulk resolution. Configurable via **Settings > Dependencies**.
84
+
An auto-detected built-in tab that appears when dependency bot PRs are found in your tracked repos. Dependency PRs are identified via a multi-layer bot detection pipeline (PR author login, branch name prefix, configurable label). Items are grouped by status — **Mergeable** (CI passing or no CI configured, not a draft, and no changes requested), **Pending Rebase**, **Needs Action** (with explicit reason badges for failing/running checks, merge conflicts, drafts, or requested changes), and **Stale** (not updated in over 14 days) — rather than by repo. Abandoned dependency pills link directly to the Renovate Dashboard issue for bulk resolution. Configurable via **Settings > Dependencies**.
OAuth tokens are stored in `localStorage` under an app-specific key — this is standard for single-user personal dashboards and matches the threat model here. CSP headers block script injection via Cloudflare (`script-src 'self'` with a SHA-256 exception for the dark-mode initialization script only). An Octokit hook blocks all non-GET REST requests and all GraphQL mutations except the single user-confirmed PR approval mutation (addPullRequestReview with event: APPROVE) — the repo scope is required for private repo access, and all other write operations are rejected client-side. OAuth state is generated with `crypto.getRandomValues` and verified on callback. Token validation runs on every page load via `GET /user`; a 401 clears the stored token immediately.
173
+
OAuth tokens are stored in `localStorage` under an app-specific key — this is standard for single-user personal dashboards and matches the threat model here. CSP headers block script injection via Cloudflare (`script-src 'self'` with a SHA-256 exception for the dark-mode initialization script only). An Octokit hook blocks all non-GET REST requests and all GraphQL mutations except explicit user-confirmed PR approval (`addPullRequestReview` with `event: APPROVE`) and marking draft PRs ready (`markPullRequestReadyForReview`) — the repo scope is required for private repo access, and all other write operations are rejected client-side. OAuth state is generated with `crypto.getRandomValues` and verified on callback. Token validation runs on every page load via `GET /user`; a 401 clears the stored token immediately.
Copy file name to clipboardExpand all lines: docs/USER_GUIDE.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ If you prefer not to use OAuth, you can sign in with a GitHub Personal Access To
81
81
Two token formats are accepted:
82
82
83
83
-**Classic tokens** (starts with `ghp_`) — recommended. Works across all organizations you belong to. Required scopes: `repo`, `read:org` (under admin:org).
84
-
-**Fine-grained tokens** (starts with `github_pat_`) — also work, but only access one organization at a time. Required permissions: Actions (read), Contents (read), Issues (read), Pull requests (read and write to approve PRs from the dashboard, or read-only for viewing only).
84
+
-**Fine-grained tokens** (starts with `github_pat_`) — also work, but only access one organization at a time. Required permissions: Actions (read), Contents (read), Issues (read), Pull requests (read and write to approve PRs or mark draft PRs ready from the dashboard, or read-only for viewing only).
85
85
86
86
The token is validated against the GitHub API before being stored. It is saved permanently in your browser's `localStorage` — you will not need to re-enter it on revisit.
87
87
@@ -227,9 +227,17 @@ The dot links to the PR's checks page on GitHub.
227
227
228
228
When GitHub auto-merge is enabled on a pull request, a read-only `auto` badge appears next to the review badge (in both comfortable and compact density across the Pull Requests, Dependencies, and Tracked tabs). Hover or focus the badge to view the configured merge method (`merge`, `squash`, or `rebase`).
229
229
230
+
#### Draft Badge & Mark Ready Action
231
+
232
+
Draft pull requests display a `Draft` badge (`D` in compact mode) across the Pull Requests, Dependencies, and Tracked tabs. When you are the author of an open draft PR, the badge is interactive and uses a two-step confirmation to mark the PR ready for review on GitHub:
233
+
1. Click **Draft** (or **D**) once to arm confirmation (**Ready?**). The confirmation state resets automatically after 4 seconds, on Escape, or when focus leaves the badge.
234
+
2. Click **Ready?** to execute `markPullRequestReadyForReview` on GitHub and transition the PR out of draft status.
235
+
236
+
Draft PRs authored by other users render as a read-only indicator.
237
+
230
238
#### Inline Approve Action
231
239
232
-
Open, non-draft pull requests not authored by you show an **Approve** button next to the pull request title on hover when branch protection requires a review (`Review needed`) or when a review has been requested of you or your team (unless you have already approved the PR without a fresh re-request).
240
+
Open, non-draft pull requests not authored by you show an **Approve** button next to the pull request title on hover when branch protection requires a review (`Review needed`) or when a review has been requested of you or your team (unless you have already approved the PR without a fresh re-request). The **Approve** button is hidden when CI checks are failing (`checkStatus === "failure"`).
233
241
234
242
Approval uses a two-step inline confirmation to prevent accidental clicks:
235
243
1. Click **Approve** once to arm confirmation (**Confirm?**, or **Confirm (auto)** when auto-merge is enabled on the PR). The confirmation state resets automatically after 4 seconds, on Escape, or when focus leaves the button.
@@ -318,10 +326,10 @@ Unlike the Pull Requests tab (which groups by repo), the Dependencies tab groups
318
326
319
327
| Group | Criteria |
320
328
|-------|----------|
321
-
|**Mergeable**| CI passing (all checks green), not yet approved — awaiting review |
329
+
|**Mergeable**| CI passing (or no CI configured), not a draft, and no changes requested — ready to review or merge|
322
330
|**Pending Rebase**| PR has the configured rebase label — waiting for the bot to rebase |
323
-
|**Needs Action**| CI pending, checks still running, or PR is a draft — not yet actionable|
324
-
|**Stale**| PR has been open more than 14 days without merging — may need a rebase or manual review |
331
+
|**Needs Action**|Failing or running CI checks, merge conflicts, draft PR, or changes requested — rows display explicit reason badges (`Failing checks`, `Merge conflict`, `Checks running`, `Draft`, `Changes`)|
332
+
|**Stale**| PR has not been updated in over 14 days — may need a rebase or manual review |
325
333
326
334
Within each group, PRs are sorted by repository name, then update category (maintenance, pin, digest, patch, minor, major), then update date.
327
335
@@ -838,9 +846,9 @@ For detailed per-source API call counts, see Settings > API Usage.
838
846
839
847
OAuth tokens (from "Sign in with GitHub") work across all your organizations and support all features. Classic PATs with the correct scopes (`repo`, `read:org`) behave identically to OAuth.
840
848
841
-
Fine-grained PATs are limited to one organization at a time. Required permissions: Actions (read), Contents (read), Issues (read), Pull requests (read and write to approve PRs from the dashboard, or read-only for viewing only).
849
+
Fine-grained PATs are limited to one organization at a time. Required permissions: Actions (read), Contents (read), Issues (read), Pull requests (read and write to approve PRs or mark draft PRs ready from the dashboard, or read-only for viewing only).
842
850
843
-
**Approving a PR fails with a permission error (403 / FORBIDDEN).**
851
+
**Approving a PR or marking a draft PR ready fails with a permission error (403 / FORBIDDEN).**
844
852
845
853
Your token does not have write permission for pull requests. If you are using a fine-grained Personal Access Token, open GitHub Settings, edit or regenerate the token with **Pull requests** set to **Read and write** (`Pull requests: Read and write`), and replace your token in **Settings > Data > Authentication**.
0 commit comments