fix(github): unify Work Item issue discussions - #744
Open
Harry19081 wants to merge 1 commit into
Open
Conversation
Pre-commit hook ran. Total eslint: 2, total circular: 0
Member
Author
|
@NeonForge could you please review this PR, especially the shared GitHub issue-detail ownership, scoped invalidation, cache lifecycle, and Work Item floating-comment behavior? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
GitHub-synced Work Items used a separate local Discussion drill-in while regular GitHub Issue detail surfaces used the floating GitHub comment and status composer. Team Inbox, Work Management, Work Item tabs, chat panels, and Source Control also resolved overlapping issue, timeline, viewer, permission, and repository data independently. Project data-change events could invalidate unrelated reads, reload every project with every label/member set, or scan full Work Item collections for one open detail. Multiple mounted presentations could also run the same automatic orchestrator side effects.
Solution
Route every GitHub Issue detail host through one bounded per-Jotai-store coordinator keyed by non-secret auth identity, repository, and issue. GitHub-synced Work Item thread surfaces now omit local Discussion navigation and render the canonical floating GitHub composer; unresolved remotes do not expose a disabled dead composer.
Project data-change events now carry project and Work Item scope, cache invalidation fences only the affected scope, item events no longer fan out through the global project collection, and open Work Item details use one enriched-item Tauri read. Viewer lookup runs alongside repository discovery. Automatic review, stale-session checks, terminal lock release, and collaboration-org resolution are consolidated through single-owner or multicast lifecycle registries that release their entries after final unmount.
The resulting invariant is that one logical GitHub issue or Work Item has one shared read/coalescing identity and one owner for automatic side effects, regardless of how many presentation surfaces are mounted.
Potential risks
Verification
Audit
Performance verdict: pass by source and lifecycle tests. Issue-detail pages contain no repeating interval poller; the remaining stale-session grace timer is bounded and single-owner. Caches are entry-count and byte bounded, atom-family detail state is evicted after final release, project invalidation is scoped, and independent reads run in parallel. The existing two-second PM SQLite watermark remains unchanged as a cross-process CLI correctness safeguard.