feat(hovercard): match GitHub native issue row hover UI#34
Merged
Conversation
Mount hovercards from a shared shadow host and trigger registry so previews append inside extension UI instead of per-row React roots. Show repo, title, Open/Closed state, body excerpt, then project fields; fetch issue state through the preview GraphQL path.
Contributor
There was a problem hiding this comment.
2 issues found across 13 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
- Use itemId as React key so recycled table rows reset fetch state - Destroy hovercard host after queue/toast/onboarding UIs (LIFO)
Contributor
There was a problem hiding this comment.
4 issues found across 13 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/features/hierarchy-chip-tooltip.tsx">
<violation number="1" location="src/features/hierarchy-chip-tooltip.tsx:332">
P3: Project field-detection logic is duplicated between `ProjectBlock` and `hasProjectBlock`, creating drift risk and inconsistent rendering conditions.</violation>
</file>
<file name="src/features/hierarchy-injections.tsx">
<violation number="1" location="src/features/hierarchy-injections.tsx:18">
P2: Rows are marked as seen before validity checks, which prevents cleanup for recycled rows and can leave stale hovercard trigger registrations.</violation>
</file>
<file name="src/lib/hovercard-trigger-registry.ts">
<violation number="1" location="src/lib/hovercard-trigger-registry.ts:41">
P2: Cleanup deletes by element key only, so stale teardown can remove a newer trigger registration for the same row element.</violation>
</file>
<file name="src/lib/hovercard-factory.tsx">
<violation number="1" location="src/lib/hovercard-factory.tsx:38">
P2: React list key uses `itemId` instead of unique trigger `id`, which can collide for multiple active triggers and cause stale/misbound hovercards.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Contributor
There was a problem hiding this comment.
1 issue found across 13 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Inject Tippy and card theme styles into the hovercard append target's shadow root so row previews render correctly inside the CSUI host. Harden hovercard registration teardown with per-registration tokens, key the portal list by trigger id, and remove stale hierarchy row hover bindings when the title cell or item id is invalid. Extract shared project-block metadata for visibility checks and add unit tests for shadow injection and cleanup paths.
Contributor
There was a problem hiding this comment.
2 issues found across 8 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Run ensureTippyCss and ensureRgpCardTheme in useLayoutEffect so styles attach once appendTarget is stable instead of during render. Include itemId in hovercard portal keys so React remounts when the triggered row changes.
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.
Summary
Changes
Hovercard infrastructure
Row preview UI
Background / API
Screenshot
Test plan
Summary by cubic
Rebuilt the project row hovercard to match GitHub’s issue hovercard and render from a shared shadow portal for correct theming and z-index on Projects. Adds Open/Closed badge, body excerpt, and hardens trigger cleanup and CSS injection for reliable previews.
New Features
Refactors
itemIdto remount on recycled rows; row instances keyed byitemId; host torn down last (LIFO).state; tuned layout and loading skeleton timing.Written for commit d58a5e1. Summary will update on new commits.
Review in cubic