Skip to content

Let project comments become issues that can be marked done - #84

Merged
Mistium merged 3 commits into
mainfrom
comment-issues
Nov 21, 2026
Merged

Mistium merged 3 commits into
mainfrom
comment-issues

Conversation

@Mistium

@Mistium Mistium commented Nov 21, 2026

Copy link
Copy Markdown
Member

Project comments can become issues, roturGIT style: tracked, marked done, reopened, and listed by state.

  • PUT /projects/:id/comments/:cid/issue with {"state": "open" | "done" | "none"}.
    • Only top-level comments can be issues.
    • The comment's author (case-insensitive) or anyone who can edit the project can change it.
    • Anyone else gets 404, so they can't tell a hidden comment exists.
    • The issue records who opened and closed it, and when.
    • On success the change is broadcast as comment_edited.
  • Numbering. Issues are numbered per project. none turns an issue back into a plain comment but keeps its number reserved, so /code/issues/<n> links never point at a different issue, and tracking the same comment again brings its number back.
  • GET /projects/:id/comments takes ?issue=open|done|any (plus &number=N) and returns the matching issues with all their replies. Every response now includes issueCounts: {open, done}, counted after the viewer's visibility filter.
  • Project setting issuesOff. It is saved through the normal project update and returned with the project. While it is on, opening, closing and reopening issues is refused with 403. Untracking (none) is still allowed.
  • Shadow-ban fix. Comment broadcasts (create, edit, pin, issue) are skipped when the comment's author is shadow-banned. Before this, a shadow-banned user's new or edited comment reached every open project page in real time.

Version: 1.4.1 → 1.5.0 (minor, new feature).

Checks:

  • osl test passes (64 files), including new comment-issues.test.osl cases for permissions, numbering, reserved numbers, reopen, filters and counts.
  • osl lsp check reports no new errors, scripts/check_conventions.py passes, and scripts/e2e_smoke.py passes.
  • I also ran it end to end against a local server with fake sessions:
    • another user's comment returns 404, and a reply returns 400;
    • the open and done filters return whole threads with correct counts;
    • the project owner can triage;
    • untracking reserves the number, and re-tracking restores it;
    • with issuesOff, everything except none returns 403.

An independent review was run against the branch, and its must-fix and should-fix API findings are fixed here: the shadow-ban broadcast, number reuse, and the 403/404 existence leak.

Nothing is visible from the API alone. The UI is in the scratch-gui comment-issues branch (stacked on scratch-gui #227), which follows once this is deployed.

@Mistium
Mistium merged commit d7021be into main Nov 21, 2026
1 check passed
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