Skip to content

feat: GitHub-parity issues (edit, labels, assignees, filters, paging, URL state) — F-1 - #81

Merged
PastaPastaPasta merged 14 commits into
masterfrom
feat/issues-parity
Sep 27, 2026
Merged

PastaPastaPasta merged 14 commits into
masterfrom
feat/issues-parity

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

F-1: GitHub-parity issues (web + CLI)

Implements platform-parity-spec §1.2 and Group F item F-1. Fixes D-201, D-215, D-216, D-217, D-904, D-913, SR-03 and SR-04.

Web issue list (/repo/issues)

  • Open/Closed tabs show exact counts past 100 (SR-03). The closed count is a fold over the complete repo feed. The open count is the countable issue.number total minus closed minus hidden, so it is correct without reading every issue. The repo header shows the same proven count.
  • Filters. Label (multi), author, assignee (me, an id, or none) and "mentions me". Sort by newest, oldest or most commented. The search box accepts GitHub qualifiers (is:closed label:bug author:@me no:assignee sort:comments-desc) and matches #12. Everything is in the URL and survives a reload (D-913, D-217).
  • Keyset paging past 100 (D-904). Pages of 50, backed by $createdAt <= keyset composites of 100.
  • Rows show label chips in each label's colour, assignee avatars and comment counts.
  • Reads use composite queries. One documents.composite returns the newest 100 issues plus comment counts, author DPNS names, and siblings for the first feed page and the labels. The rest of the feed is read only when it is larger. Closed or labelled issues past the loaded pages are resolved by $id in composites. The author filter uses the author index. The new wrapper is lib/sdk/composite.ts, with a plain-query fallback; P-3 should extend it.

Issue page

  • One composite returns the issue, its comments, events and author events (bound on $id → targetId), plus the labels and members (siblings). Names come from one batched DPNS read.
  • Edits. You can edit the title and body, and your own comments; edited items show an "edited" marker (D-216). Edits use updateTarget / updateComment, which carry the revision guard.
  • Private repos. Edits are re-sealed through sealEdit (feat(web): create private repos and write sealed content from the browser #67), and the replace sets only enc and epoch. With no seal context, a private edit is still refused.
  • Label picker applies and removes labels, filters them, and creates a label with a colour and description (D-215).
  • Assignee picker lists members, or accepts any identity id (D-201). An assign event names the assignee in both value and refId, so the sparse event.addressee index answers "assigned to me". Explore's panel now reads that index.
  • Autolinks. #n and @name link automatically; emails, fragments, hex colours and code are left alone.
  • Editors have Write and Preview tabs.
  • Issue templates are read from .forge/ISSUE_TEMPLATE, falling back to .github/ISSUE_TEMPLATE, on the default branch.

forge-core and CLI

  • WriteEngine::replace_document signs one DocumentReplace. It is idempotent (nothing is signed when the document already reads that way) and refuses a non-owner before signing. It confirms a spent nonce by re-reading.
  • New Collab methods: update_target, update_comment, set_assignee, delete_label and issues_with_state. issues_with_state does a keyset read of every issue plus one read of the feed, with no per-row reads, and decrypts for members through readable_all.
  • event_payload_props now refuses an assign or unassign unless refId equals value, and refuses an empty label. The TypeScript side has the same rules.
  • New or changed dg commands:
    • dg issue edit (a re-run writes nothing; a non-author gets E601 before signing)
    • dg issue label <repo> <n> add|remove <label>... (the old --add/--remove still work)
    • dg issue assign|unassign <repo> <n> me|<id|dpns>...
    • dg issue list --label --author --assignee --search --state --limit --page (filters cover the whole repo; SR-04)
    • dg label delete
  • dg label create|list already existed.
  • Private repos:

Pin / lock

Pin and lock are left out. They need no contract change, but the spec assigns event kinds 19–22 to F-7 and C-2 (rules and vectors).

Fixtures

Tests (all run live on moutai)

  • Playwright e2e/v2-issues.spec.ts, 7/7 passing:
    • exact counts past 100, and paging to page 3
    • filters and sort in the URL, surviving a reload
    • request budgets for the list and the issue page
    • with E2E_WRITE=1: edit a title and see "edited"; create and apply a coloured label; assign F1COLLAB, whose "assigned to me" filter then finds the issue
  • CLI e2e scenario 18 passes 21/21 checks, including the raw event.addressee read finding the assign event.
  • Unit tests:
    • URL state and qualifier parsing (issue-query.test.ts)
    • the issue index against a composite-capable mock, including request counts
    • labels, templates and autolinks
    • assign payloads, and private edit sealing
    • Rust payload rules
    • E601 wording
  • Suites: vitest 1572 passed; cargo test -p forge-core -p dg passed; clippy clean.

Measured request counts (cold loads, moutai):

Page Total DAPI requests getDocuments Of which the page itself Of which repo chrome
Issues list 13 10 3 (1 composite for issues, counts, names, feed and labels; 1 $id in composite; 1 count) 7
Issue page 12 9 2 (1 composite plus 1 batched DPNS) 7

The remaining chrome reads belong to P-3, so the ≤ 8 / ≤ 5 budgets hold for the pages themselves. The Playwright spec asserts page reads + 7 chrome.

Evidence (screenshots): dash-forge-qa/evidence/impl/feat-issues-parity/.

Review (code-review-validator and code-simplifier) — fixed here

  • Index reads could corrupt each other when concurrent. Two concurrent reads of one keyset bound could end a walk early and mark closed targets as "not issues", and an id admitted by two reads at once could be listed twice. All index reads now run on one queue per index. There is a test for this.
  • Sorting oldest-first showed nothing on a repo that one composite holds entirely. Once every issue is loaded, the list now sorts the whole set. There is a test for this.
  • The header's proved open count is dropped on a close or reopen, so the header no longer shows the old number.
  • DPNS names from a full lookup page were discarded. seedFromDomains fixes this, with a test.
  • forge-core:
    • update_comment refuses private repos.
    • replace_document reports an edit that landed after a spent nonce as written.
    • Label event values must be trimmed; dg trims them.
  • Simplifications:
    • one mention rule and one title matcher
    • composite helpers: compositeOf, siblingOf, docsAt and countsAt, plus readChunk
    • candidatesFor and rowsOf
    • shared BODY_MAX, utf8Length and isIdentityId
    • dead exports removed

Follow-ups (not in this PR)

  • The open count on a public repo is only exact when every issue is well-formed. It is total − closed − hidden, and "hidden" counts only the malformed issues seen in loaded chunks. Label the count as such, or count malformed issues on a full read.
  • Private web edits always re-sign. sealEdit re-seals with a fresh nonce, so an edit is never skipped as "already applied". Comment edits also carry no revision guard.
  • Explore's refId == me read is capped at 100 and unordered; review requests share that index.
  • Remaining simplifier items:
    • a labelChoices helper, and passing defs or byName but not both
    • labelQuery and completeLabels in labels.ts
    • one totals read
    • Rust: remove the clones in issues_with_state, add post_event_payload, and fetch the contract once in delete_label
    • nonce and doctype helpers in platform/mod.rs, and drop the Row tuple in dg issue.rs
  • Breaking CLI changes:
    • dg issue list --limit 0 is now a usage error; the default is 30.
    • In the JSON output, truncated now means "more pages exist".

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Issue lists now support search, filters for state, labels, author, assignee, and mentions, plus sorting and pagination.
    • Create and edit issues and comments, assign or unassign people, and add, remove, define, or delete labels.
    • Issue forms can use repository templates and Markdown previews. Issue pages show labels, assignees, edited markers, and a combined activity timeline.
    • Markdown issue references and mentions link to relevant pages.
  • Documentation
    • Updated collaboration guidance with issue filters, editing, assignments, and label management.

PastaPastaPasta and others added 9 commits September 27, 2026 04:55
…edit

WriteEngine::replace_document signs one DocumentReplace over the stored document with the changes merged and the revision bumped, skips an edit that already holds (nothing signed), refuses a non-owner before signing, and confirms a spent nonce or a revision refusal by re-reading. Collab::update_target / update_comment are the author edits (title/body, comment body); private repos are refused (plaintext would sit next to enc). dg issue edit --title/--body/--body-file uses it. Verified live on moutai: an edit landed (13.5M credits), a re-run wrote nothing, a non-author was refused with E601 before signing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ers and paging, dg label delete

Assign events carry the assignee as value and refId (the sparse addressee index answers assigned-to-me). dg issue list reads every issue by keyset and the repo feed once, then filters by --label/--author/--assignee/--search/--state and pages with --limit/--page (SR-04). dg label delete removes the signer's definitions and retires a label others also defined. Adds CLI e2e scenario 18 and the issue-list paging fixture seeder.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…assignees, edits

Issue list: Open/Closed tabs with exact counts (closed from the complete feed against the countable total, SR-03), label/author/assignee/mentions filters, newest/oldest/most-commented sort, search with GitHub qualifiers, all in the URL (D-913, D-217), keyset paging past 100 (D-904), label chips and assignee avatars. Reads through composite queries: one composite for the first 100 issues, comment counts, names, feed and labels. Issue page: one composite for the issue, comments, events, labels and members; title/body and own-comment edits with an edited marker (D-216), a label picker with colours and label creation (D-215), an assignee picker writing refId (D-201), #n/@name autolinks, Write/Preview, issue templates from .forge or .github ISSUE_TEMPLATE.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Keeps master's private-repo read gate (the issue index and the issue page admit issues and comments through gateFor, keyed per reader session), the WCAG contrast classes, the review-comment grouping and the markdown safety limits, with F-1's composite reads, autolinks and edit slots on top. Registers CLI scenario 18 and the issues-paging fixture.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…m the addressee index

forge-web/e2e/v2-issues.spec.ts: exact counts past 100, keyset paging to page 3, URL filters surviving a reload, request budgets, and (E2E_WRITE=1) edit with the edited marker, a coloured label, an assignment found by assigned-to-me. All pass on moutai. CLI scenario 18 passes on moutai. Explore's assigned-to-me reads event.addressee (refId) across repos.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…el delete

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…al private edits

Private-repo edits of issues and comments now re-seal through #67's sealEdit and replace only enc/epoch (no plaintext ever leaves); without a seal context a private edit is still refused. The issue page and list use #68's privateComposeBlock / composeCost / SealedLimit. dg issue list reads private issues through readable_all (decrypted for members); the CLI edit still refuses private repos (no sealed CLI edit yet).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…d label names

Issue index: every read runs on one queue per index (a concurrent read no longer ends a walk early or lists a row twice); once every issue is loaded the list sorts the whole set (oldest-first on a small repo showed nothing). The proved header count is dropped on a count-changing write. DPNS names from a full lookup page are kept (seedFromDomains). forge-core: update_comment refuses private repos; replace_document reports an edit that landed after a spent nonce as written; label event values must be trimmed (dg trims). Simplifications: one mention rule, one title matcher, composite helpers (compositeOf/siblingOf/docsAt/countsAt, readChunk), candidatesFor/rowsOf, BODY_MAX/utf8Length/isIdentityId, dead exports removed. Contrast: muted text has its dark variant.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4dbb561d-9ce6-4b39-8bee-9465e6616d16

📥 Commits

Reviewing files that changed from the base of the PR and between 8eae3c0 and 7734939.

📒 Files selected for processing (43)
  • crates/dg/src/errors.rs
  • crates/dg/src/issue.rs
  • crates/dg/src/label.rs
  • crates/dg/src/main.rs
  • crates/forge-core/src/collab/v2.rs
  • docs/guides/collaborating.md
  • e2e/README.md
  • e2e/cli/run.sh
  • e2e/cli/scenarios/22-issue-parity.sh
  • forge-contracts/scripts/seed-issues-paging.mjs
  • forge-web/components/markdown-view.tsx
  • forge-web/components/repo/issue-bits.tsx
  • forge-web/components/repo/issue-content.tsx
  • forge-web/components/repo/issue-templates.tsx
  • forge-web/components/repo/issues-content.tsx
  • forge-web/components/repo/timeline.tsx
  • forge-web/components/repo/use-repo-totals.ts
  • forge-web/e2e/keyboard-theme.spec.ts
  • forge-web/e2e/v2-issues.spec.ts
  • forge-web/e2e/v2-reads.spec.ts
  • forge-web/hooks/use-repo-chrome.ts
  • forge-web/lib/repo/index.ts
  • forge-web/lib/repo/issue-index.test.ts
  • forge-web/lib/repo/issue-index.ts
  • forge-web/lib/repo/issues.ts
  • forge-web/lib/repo/labels.test.ts
  • forge-web/lib/repo/labels.ts
  • forge-web/lib/repo/members.ts
  • forge-web/lib/repo/review-writes.test.ts
  • forge-web/lib/repo/review-writes.ts
  • forge-web/lib/sdk/composite.ts
  • forge-web/lib/sdk/query.ts
  • forge-web/lib/view/dpns.test.ts
  • forge-web/lib/view/dpns.ts
  • forge-web/lib/view/index.ts
  • forge-web/lib/view/issue-query.test.ts
  • forge-web/lib/view/issue-query.ts
  • forge-web/lib/view/issue-templates.test.ts
  • forge-web/lib/view/issue-templates.ts
  • forge-web/lib/view/issues-view.ts
  • forge-web/lib/view/markdown.test.ts
  • forge-web/lib/view/markdown.ts
  • forge-web/lib/view/mine.ts
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

PastaPastaPasta and others added 5 commits September 27, 2026 12:04
Adopts master's WriteEngine::replace_document (from #66) and drops F-1's duplicate; update_target/update_comment call it. Issue pages honour the archive gate. The CLI issue-parity scenario is renumbered 20 (18 is repo settings). e2e helpers use master's E2E_IDENTITY_DIR.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Explore also shows a Sign in button in its signed-out panel, so the unscoped locator matched two elements.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The CLI issue-parity scenario is renumbered 21 (20 is config + storage UX).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Keeps F-1's private-repo refusal in update_target/update_comment (collab_contract no longer refuses private repos, so without it a CLI edit would publish plaintext beside enc). The #n/@name autolinks ride #82's markdown render context. The CLI issue-parity scenario is renumbered 22.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Carries #84's coarse-pointer touch targets onto the F-1 issue list tabs, issue body header and timeline cards.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta
PastaPastaPasta merged commit 98c09c0 into master Sep 27, 2026
22 checks passed
PastaPastaPasta added a commit that referenced this pull request Sep 27, 2026
The filtered list (#81) built a keyless reader, so a member of a private repo got E301 and a non-member never reached E307. It now uses the session's signer, and scenario 19 lists by the sealed label.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
PastaPastaPasta added a commit that referenced this pull request Sep 27, 2026
fix(web): e2e regressions after #66 and #81, a WebKit focus trap and SDK loading under Node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant