fix(project): push SSE update when an issue on a board is closed/reopened #20

Merged
oleks merged 1 commits from fix/issue-19-sse-state into main 2026-05-17 20:59:50 +03:00
Owner

Summary

Closing or reopening an issue did not notify project boards that carry it as a card — boards showed stale state until a manual reload. CloseIssue/ReopenIssue only published milestone events and the issue timeline notification, nothing project-scoped.

Adds a CardStateChanged project event, published per linked project from CloseIssue/ReopenIssue (best-effort; never fails the state change). The board frontend flips the issue-state octicon in place and refetches the affected column so state-filtered boards and counts stay correct. The dispatch check precedes the CardUnlinked branch so a close/reopen is not mistaken for a card removal. Also converts a pre-existing String#match to RegExp#exec in the same file to keep it lint-clean.

Test plan

  • New unit case TestPublishHelpers_NameAndPayload/card.state_changed (services/project_events).
  • go build services/project_events + services/issue; gofmt clean.
  • eslint clean on web_src/js/features/repo-projects.ts.

Closes #19


Authored by Claude Opus 4.7 (assisting @oleks).

## Summary Closing or reopening an issue did not notify project boards that carry it as a card — boards showed stale state until a manual reload. CloseIssue/ReopenIssue only published milestone events and the issue timeline notification, nothing project-scoped. Adds a CardStateChanged project event, published per linked project from CloseIssue/ReopenIssue (best-effort; never fails the state change). The board frontend flips the issue-state octicon in place and refetches the affected column so state-filtered boards and counts stay correct. The dispatch check precedes the CardUnlinked branch so a close/reopen is not mistaken for a card removal. Also converts a pre-existing String#match to RegExp#exec in the same file to keep it lint-clean. ## Test plan - New unit case TestPublishHelpers_NameAndPayload/card.state_changed (services/project_events). - go build services/project_events + services/issue; gofmt clean. - eslint clean on web_src/js/features/repo-projects.ts. Closes #19 --- Authored by Claude Opus 4.7 (assisting @oleks).
oleks added 1 commit 2026-05-17 20:59:41 +03:00
Closing or reopening an issue did not notify project boards that carry
it as a card, so board tabs showed stale state until a manual reload.
CloseIssue/ReopenIssue only published milestone events and the issue
timeline notification — nothing project-scoped.

Add a CardStateChanged project event, published per linked project from
CloseIssue/ReopenIssue (best-effort; never fails the state change). The
board frontend flips the issue-state octicon in place and refetches the
affected column so state-filtered boards and counts stay correct. The
dispatch check precedes the CardUnlinked branch so a close/reopen is
not mistaken for a card removal.

Also switch a pre-existing String#match to RegExp#exec in the same file
to keep it lint-clean.

Closes #19
oleks merged commit c45ea82fd1 into main 2026-05-17 20:59:50 +03:00
oleks deleted branch fix/issue-19-sse-state 2026-05-17 20:59:50 +03:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: oleks/gitea#20