Skip to content

refactor(ui): consolidate bulk modals and sprint Primer shell#48

Merged
fathiraz merged 3 commits into
mainfrom
refactor/sprint-bulk-primer-modals
Jun 6, 2026
Merged

refactor(ui): consolidate bulk modals and sprint Primer shell#48
fathiraz merged 3 commits into
mainfrom
refactor/sprint-bulk-primer-modals

Conversation

@fathiraz

@fathiraz fathiraz commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Introduce a shared ModalShell and route bulk/sprint dialogs through the modal factory for consistent Primer layout
  • Remove standalone bulk close/lock/open/pin/unpin modal components in favor of consolidated bulk action flows
  • Refresh sprint modal, settings, progress, and table widget UI to align with GitHub-native Primer CSS patterns
  • Extract sprint settings helpers with unit tests for field configuration logic

Changes

Modal infrastructure (src/ui/modal-shell.tsx, src/lib/modal-factory.tsx, src/lib/primer-css-helper.ts)

  • Added reusable modal shell (header slot, flat panel styling, motion tokens)
  • Updated modal factory to mount dialogs with shared shell semantics
  • Extended Primer CSS helper utilities used by sprint and bulk surfaces

Bulk actions (src/features/bulk-actions-*.tsx, deleted bulk-*-modal.tsx)

  • Wired bulk bar and modals to consolidated patterns; removed per-action modal files
  • Adjusted bulk delete modal and edit flyout/relationship pane for the new shell
  • Updated bulk edit flyout tests for the refactor

Sprint UI (src/features/sprint-*.tsx, src/features/sprint-settings-utils.ts)

  • Reworked sprint panel modal layout and settings view structure
  • Updated sprint injections, progress view, and group header widget
  • Added sprint-settings-utils plus tests for settings derivation

Content script (src/entries/content.ts)

  • Adjusted content entry wiring for sprint/bulk modal mounting

Test Plan

  • pnpm typecheck passes locally
  • Bulk bar: close, lock, open, pin, and unpin actions open the expected consolidated UI (no missing modals)
  • Bulk delete modal renders and confirms destructive flow
  • Bulk edit flyout still opens, edits fields, and passes existing unit tests
  • Sprint panel opens from project view; settings, progress, and end-sprint steps navigate correctly
  • Sprint group header widget shows loading/active/no-active states and opens the sprint panel
  • Modal keyboard focus and Escape behavior remain correct (no input trapped in GitHub page)

Summary by cubic

Consolidated bulk action modals and rebuilt the sprint panel on a shared ModalShell for a consistent Primer look and correct focus/Escape behavior. Restores close-reason selection, streamlines sprint widgets, and removes duplicate components.

  • Refactors

    • Added ModalShell and updated the modal factory to mount dialogs with shared Primer styling, motion, and Escape isolation.
    • Removed per-action bulk modals (BulkCloseModal, BulkLockModal, BulkOpenModal, BulkPinModal, BulkUnpinModal); routed remaining flows through the factory and ported close/delete to ModalShell.
    • Reworked sprint panel, settings, progress, and table widget to Primer patterns; added ProgressBar and updated header widget styling.
    • Extracted sprint-settings-utils with tests; extended primer-css-helper with chip/button presets; injected sprint UI via light DOM using ctx.
  • Bug Fixes

    • Restored bulk close reason radio and set mark-menu “Close” to COMPLETED per ADR; re-check selection after async PAT validation before opening the close modal.
    • Isolated modal Escape from global shortcuts and added ModalShell tests to verify.
    • Pruned detached sprint header widgets and stabilized tooltip mounting.
    • Clarified bulk edit empty states and relationship pane messaging.

Written for commit 63bbd43. Summary will update on new commits.

Review in cubic

Replace per-action bulk modal components with shared modal shell and
factory patterns; refresh sprint modal/settings to match GitHub-native
Primer CSS and extract sprint settings helpers with tests.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor auto review

No actionable issues found on changed lines.

No actionable issues found.

Generated automatically when this PR was submitted using Cursor CLI with --model auto.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 22 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/features/bulk-actions-bar.tsx
Comment thread src/features/sprint-injections.tsx
Comment thread src/ui/modal-shell.tsx
…cape

Restore bulk close reason selection via ModalShell, prune disconnected
sprint header widgets, and isolate modal Escape from global shortcuts.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 6 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/features/bulk-actions-bar.tsx
Comment thread src/features/bulk-actions-bar.tsx
Mark menu close always uses COMPLETED per ADR/regression spec.
Re-check selection after async PAT validation before opening modal.
@fathiraz fathiraz merged commit 99dd3d9 into main Jun 6, 2026
3 checks passed
@fathiraz fathiraz deleted the refactor/sprint-bulk-primer-modals branch June 6, 2026 13:52
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