Skip to content

[AGILE-251] Migrate Backlogs to Pragmatic DnD#23218

Open
myabc wants to merge 111 commits into
devfrom
implementation/74970-backlogs-pragmatic-dnd
Open

[AGILE-251] Migrate Backlogs to Pragmatic DnD#23218
myabc wants to merge 111 commits into
devfrom
implementation/74970-backlogs-pragmatic-dnd

Conversation

@myabc

@myabc myabc commented May 14, 2026

Copy link
Copy Markdown
Contributor

Ticket

https://community.openproject.org/wp/AGILE-251
https://community.openproject.org/wp/AGILE-284 (optimistic reordering, folded in from #23643)
https://community.openproject.org/wp/AGILE-272

Resolves BUGs: https://community.openproject.org/wp/AGILE-252, https://community.openproject.org/wp/AGILE-258

What are you trying to accomplish?

Migrate Backlogs drag and drop to Pragmatic Drag and Drop while preserving the existing inbox / sprint / backlog-bucket move workflows.

The legacy generic (jQuery/Dragula) wiring is replaced by a small Stimulus suite on @atlaskit/pragmatic-drag-and-drop. Move semantics and server endpoints are unchanged — only the client interaction layer. Backlogs cards now render as ViewComponents (server-rendered markup), and a Turbo guard (pragmatic-dnd-morph-attributes.ts) preserves Pragmatic's registration attributes across morphs so DnD survives stream updates.

What approach did you choose and why?

The DnD layer is a reusable, Backlogs-agnostic sortable-lists Stimulus suite:

  • sortable-lists.controller.ts — list "root": owns the move request, drag monitor, and auto-scroll; scopes each drop to its root (accepted type matches, source + resolved target contained) so multiple roots don't steal drops.
  • item.controller.ts — per-card draggable + drop target with closest-edge indicators and a sanitized drag preview.
  • drag-and-drop.ts — the Pragmatic payload contract plus pure, unit-testable drop-intent resolution.
  • list-dom.ts — DnD-agnostic list/row DOM contract: selectors, item/row resolution (incl. truncation markers), optimistic reorder with snapshot/restore.
  • turbo/pragmatic-dnd-morph-attributes.ts — a turbo:before-morph-attribute guard preserving PDD marker attributes across idiomorph morphs. data-drop-target-for-element is PDD-internal, so it is regression-tested and flagged in-code to re-verify on PDD upgrades.
  • list-refresh.controller.ts — non-DnD: reloads the frame when a work package changes outside a drag (split-pane / Angular edits emit HAL events, not a Turbo stream), hardened against a subscribe-after-disconnect race.

Reordering is optimistic (AGILE-284, from #23643): the row moves on drop and persists in the background; the turbo-stream response reconciles on success, and a failure rolls back with a prefers-reduced-motion-aware FLIP animation.

Server moves still flow through Backlogs::WorkPackages::UpdateService, which normalizes list_id before validating list_type (sprint / backlog bucket / inbox) so an empty inbox id and an integer id are handled consistently.

Keyboard handling is intentionally minimal: the card is the single focus target and the action menu is the accessible move path. Prototyped keyboard DnD and the drag-specific ARIA-role layer were removed rather than shipped half-complete; full accessible DnD is tracked under follow-up work.

Working checklist

  • ARIA attribute cleanup [AGILE-323] Backlogs card keyboard and accessibility follow-ups #24106
  • Handle inner interactive elements — card links + assignee avatar are draggable="false" so a native link/image drag can't pre-empt the card drag (complements canDragFromPoint).
  • final design pass:
  • incorporate Experiment/project attributes dnd #23893 to keep the solution generic: per-list types, positionMode: 'absolute', flexible DOM structure
  • additional topological change: separate scrollable controller
  • fully enable optimistic reordering (return 204 No Content from backend)
  • revisit Controller communication (Events vs. Outlets) (with @ulferts)
  • revisit runtime checks / performance penalties (with @ulferts)

Addressed from review (2026-07-05 triage)

  • Scope backlogs drag styling under .op-border-box-list so the global data-dragging marker no longer restyles admin/settings dragula lists (review #5)
  • Guard optimistic rollback against a captured parent detached by a mid-flight morph (review #9)
  • Clear the drop indicator when an item disconnects mid-drag (review #7)
  • Document the list-level "drop container" and drop-position-value in frontend/CONTEXT.md (review #15)
  • Hoist the sortable-lists PDD mocks off the shared Vitest registry (review #13)
  • Route list_type through Backlogs::Target instead of hand-spelled literals (review #14)

Review follow-ups (deferred; 2026-07-05 triage)

  • Hold the moving guard until the reconciling frame reload lands, not on PUT resolve — a second drag races the about-to-morph DOM (review #2; sortable-lists.controller.ts)
  • Re-sync split-view selection when a promoted frame visit is cancelled — optimistic data-selected plus a reverted aria-current can leave two cards highlighted (review #6; backlogs/work-package.controller.ts)
  • Scope the morph guard to owner-controller elements and gate on an active drag/selection — it currently blocks every aria-current removal inside the backlogs frame (review #8a; pragmatic-dnd-morph-attributes.ts)
  • Restore the truncation marker ("Show N more") as a drop target — a direct drop no-ops (same-list) or top-inserts (cross-list) instead of filing after the collapsed block (review #10; sortable-lists/drag-and-drop.ts)
  • Wrap the two-phase list move (UpdateService commit + post-commit move_after) in one transaction — a failure between the phases can leave a stale/nil position (review #12; work_packages/update_service.rb)
  • Move to a filtered-out sprint/bucket silently hides the card (dialogs offer unfiltered targets, the frame re-render honours filters) — scope options to the active filters or extend the invisibility check (review #4; work_packages_controller.rb)
  • Silence the vitest "vi.mock not at top level" deprecation in the sortable-lists specs (top-level vi.mock + aliased core-stimulus/test-helpers; vitest-v4 hoister × vite-alias, non-fatal today)
  • Make the backlogs DnD pickup helper robust without retry — pick_up_and_release_work_package is now capped via retry_block, but the stale node it retries on (likely a mid-drag list-refresh morph detaching the grabbed row) should be waited out or re-queried inside the drag so no retry is needed (spec/support/pages/backlog.rb)
Archived

  • Create child implementation branch for the Backlogs-only Pragmatic DnD migration
  • Port Backlogs item dragging to Pragmatic Drag and Drop
  • Add Selenium-native drag-and-drop feature helper coverage
  • Add diagnostic native drag probe for Selenium/WebDriver behavior
  • Cover existing Backlogs DnD flows for inbox, sprint, and backlog bucket lists
  • Add failing feature specs for post-Turbo-morph DnD in inbox, sprint, and bucket lists
  • Instrument failing feature specs to identify the post-morph DnD lifecycle failure
  • Add a Vitest Stimulus integration spec for Turbo morph lifecycle behavior if instrumentation confirms the reproduction
  • Handle picking up an item and dropping (without moving)
  • Fix Stimulus/Pragmatic DnD lifecycle handling after Turbo morphs
  • Re-run bundle exec rspec modules/backlogs/spec/features/work_packages
  • Re-run focused frontend tests for Backlogs Stimulus controllers
  • Manually smoke-test Backlogs drag and drop after Turbo updates
  • Investigate behavior on server error (e.g. rollback)
  • Investigate optimistic updates
  • Implement optimistic DOM reordering for sortable list moves, including rollback on non-OK or rejected move requests (folded into this PR from [AGILE-284] Reorder sortable lists optimistically #23643)
  • Specify Empty drop zone behavior for empty Backlogs lists
  • Distinguish selected Work package cards from hover state
  • Decide multi-select scope and drag-preview behavior
  • Specify read-only, saving, touch, and keyboard drag states
  • Investigate Space scrolling when a Backlogs card or row is focused, then define keyboard drag interaction

Follow-up work

  • Add accessibility live announcements for sortable-list drag start, candidate position change, drop, and cancellation using Primer live-region-element
  • Configure data for external consumers

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (basic tests)
    • macOS — Chrome, Safari, Firefox
    • Windows — Chrome, Edge, Firefox
    • Linux — Chrome, Firefox
    • Android — Chrome (Firefox not supported)
    • iOS/iPadOS — Safari, Chrome (Webkit)

@myabc myabc force-pushed the implementation/74970-backlogs-pragmatic-dnd branch from 8ac3e26 to 9994516 Compare May 14, 2026 21:02
@myabc myabc added feature DO NOT MERGE javascript Pull requests that update Javascript code pullpreview labels May 14, 2026
@myabc myabc added this to the 17.5.x milestone May 14, 2026
@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown

Deploying openproject with PullPreview

Field Value
Latest commit c330ed0
Job deploy
Status ✅ Deploy successful
Preview URL https://pr-23218-74970-backlogs-pra-ip-167-233-23-8.my.opf.run:443

View logs

@myabc myabc force-pushed the implementation/74970-backlogs-pragmatic-dnd branch from 9994516 to 4a84694 Compare May 14, 2026 21:36
@myabc myabc requested a review from Copilot May 14, 2026 21:36

Copilot AI 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.

Pull request overview

This PR migrates Backlogs drag-and-drop from the legacy approach to Atlassian’s Pragmatic Drag and Drop, moving Stimulus wiring onto the inner work package card and introducing new frontend helpers/controllers to compute drop targets and ordering.

Changes:

  • Introduces Pragmatic DnD-based Stimulus controllers/helpers for Backlogs item dragging and list drop targeting.
  • Moves Backlogs-specific data attributes (story + draggable item wiring) from BorderBox rows to the inner work package card, and updates Backlogs views/components accordingly.
  • Adds Atlaskit Pragmatic DnD dependencies and updates Ruby/JS specs to reflect the new DOM + data attributes.

Reviewed changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
spec/components/open_project/common/work_package_card_component_spec.rb Adds coverage for forwarding system arguments to the root card element.
modules/backlogs/spec/support/pages/backlog.rb Updates test selectors to target the new draggable item data attribute on the card.
modules/backlogs/spec/requests/backlogs/backlog_spec.rb Adds assertions for Backlogs controller wiring and list targets in rendered backlog HTML.
modules/backlogs/spec/components/backlogs/work_package_card_list_item_component_spec.rb Adjusts expectations to verify Backlogs Stimulus wiring is on the card, not the row.
modules/backlogs/spec/components/backlogs/work_package_card_list_component_spec.rb Updates list/component specs for new target attributes and card-level data wiring.
modules/backlogs/spec/components/backlogs/story_points_component_spec.rb Adds expectation around wrapper positioning for SR-only label placement.
modules/backlogs/spec/components/backlogs/sprint_component_spec.rb Updates sprint DnD expectations to use Backlogs list targets + card-level draggable attributes.
modules/backlogs/spec/components/backlogs/inbox_component_spec.rb Updates inbox drop-target assertions to new Backlogs list target attributes.
modules/backlogs/spec/components/backlogs/bucket_component_spec.rb Updates bucket drop-target + card wiring assertions for new DnD approach.
modules/backlogs/app/views/backlogs/backlog/show.html.erb Removes legacy content_controller wiring for Backlogs.
modules/backlogs/app/views/backlogs/backlog/_backlog_list.html.erb Replaces legacy generic-drag-and-drop wiring with data-controller="backlogs" root.
modules/backlogs/app/components/backlogs/work_package_card_list_item_component.rb Moves Backlogs Stimulus wiring/data to the inner card; adds draggable card args.
modules/backlogs/app/components/backlogs/work_package_card_list_component.rb Changes list target data attributes to data-backlogs-target="list" + id.
modules/backlogs/app/components/backlogs/work_package_card_component.rb Forwards system arguments to the shared/common work package card.
modules/backlogs/app/components/backlogs/inbox_component.html.erb Updates inbox list container data attributes to match Backlogs controller targets.
frontend/src/stimulus/controllers/dynamic/backlogs/item.controller.ts Adds a Stimulus controller to make individual cards draggable + item drop targets.
frontend/src/stimulus/controllers/dynamic/backlogs/item.controller.spec.ts Adds unit tests for item controller state rendering + preventUnhandled integration.
frontend/src/stimulus/controllers/dynamic/backlogs/drag-and-drop.ts Adds helper utilities for resolving targets and computing prev_id for move requests.
frontend/src/stimulus/controllers/dynamic/backlogs/drag-and-drop.spec.ts Adds unit tests for drag-and-drop helper logic (target resolution, ordering).
frontend/src/stimulus/controllers/dynamic/backlogs.controller.ts Replaces HAL-events refresh behavior with Pragmatic DnD monitoring + move requests.
frontend/src/global_styles/primer/_overrides.sass Updates styles for new drag/drop indicators and Box-card dragging visuals.
frontend/package.json Adds Atlaskit Pragmatic DnD dependencies.
frontend/package-lock.json Locks Atlaskit Pragmatic DnD dependencies and transitive packages.
app/components/open_project/common/work_package_card_component.rb Allows forwarding system arguments; ensures Box-card class on root; adds card_arguments.
app/components/open_project/common/work_package_card_component.html.erb Uses card_arguments to apply forwarded system arguments to the root element.
Files not reviewed (1)
  • frontend/package-lock.json: Language not supported

Comment thread modules/backlogs/app/components/backlogs/work_package_card_list_item_component.rb Outdated
Comment thread frontend/src/global_styles/primer/_overrides.sass Outdated
@myabc myabc force-pushed the implementation/74970-backlogs-pragmatic-dnd branch 3 times, most recently from cca6f5e to 10fa291 Compare May 15, 2026 18:56
Comment thread spec/support/authentication_helpers.rb
Comment thread spec/support/pages/page.rb Outdated
Comment thread spec/support/edit_fields/edit_field.rb Outdated
@myabc myabc force-pushed the implementation/74970-backlogs-pragmatic-dnd branch 5 times, most recently from 2ffd5e6 to ba69795 Compare May 17, 2026 01:28
@myabc myabc changed the title Implementation/74970 backlogs pragmatic dnd [#74970] Migrate Backlogs to Pragmatic DnD May 18, 2026
Base automatically changed from implementation/74684-extract-border-box-list-component to dev May 18, 2026 12:55
@myabc myabc force-pushed the implementation/74970-backlogs-pragmatic-dnd branch 3 times, most recently from 8c94399 to 3e53b87 Compare June 1, 2026 21:53
@myabc myabc requested a review from Copilot June 1, 2026 21:53
@myabc

myabc commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Hi @HDinger,

I'd be grateful if you could take another look at this. Since your last review of the CSS, there have been a number of changes:

Screenshot 2026-07-05 at 21 21 10
  • drop zone visual improvements
    • container styling (blue outline)
    • drop zone message (rendered on top of Blankslate - a slightly different approach than we discussed)
  • hiding of empty state as soon as siblings exist - not directly requested by the UX/UI team, but discussed internally with @dombesz. Straightforward to implement and makes the page feel more "responsive"
  • applying user-select: none to cards - makes DnD behave better on touchscreens.
Screen.Recording.2026-07-05.at.21.31.53.mov

I've tried to clean up the CSS as best I can - consolidating as much as possible in app/components/open_project/common/border_box_list_component.sass. We will probably need to look into a Border Box refactor one of these days, but the styling should be good enough for a first iteration.

For discussion:

  • the vertical padding has ended up being slightly less than with the previous DnD implementation. We may need to revisit this vs. original specification.

description: nil,
icon: nil,
interactive: false,
drop_target_label: nil,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not sure about the naming

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/projects/project_autocomplete_spec.rb[1:1]
🤖 Ask Copilot to investigate

Copy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer.

@copilot The following spec(s) are flaky in CI (first seen on PR #23218, linked for reference only):

- `rspec ./spec/features/projects/project_autocomplete_spec.rb[1:1]`

Treat this as a standalone task, unrelated to PR #23218. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #23218 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @myabc to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @myabc, and request a review from @myabc.
On every commit, set @myabc as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

myabc added 3 commits July 6, 2026 12:00
Card links and the avatar image are natively draggable and pre-empt
the Pragmatic card drag; mark them `draggable="false"`.
`data-drop-target-for-element` is a Pragmatic DnD implementation
detail; note it in-code to re-verify on upgrades.
Move Backlogs drag auto-scroll out of the sortable-lists root into a
dedicated outlet-connected `sortable-lists--scrollable` child, mirroring
the list and item controllers. The root drops to monitor and drop
orchestration, and scroll containers wire in through an outlet instead
of being descendant targets. No behaviour change; axis and speed keep
their `vertical`/`standard` defaults.
"Box-row--clickable",
"Box-row--draggable" => draggable?
"Box-card",
"Box-card--clickable",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

for follow up: implement a clickable? option

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/activities/work_package/activities_spec.rb[1:5:2:2]
🤖 Ask Copilot to investigate

Copy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer.

@copilot The following spec(s) are flaky in CI (first seen on PR #23218, linked for reference only):

- `rspec ./spec/features/activities/work_package/activities_spec.rb[1:5:2:2]`

Treat this as a standalone task, unrelated to PR #23218. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #23218 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @myabc to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @myabc, and request a review from @myabc.
On every commit, set @myabc as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

Comment thread frontend/src/global_styles/content/modules/_backlogs.sass Outdated
myabc added 6 commits July 6, 2026 14:26
Derives the bucket, sprint, and inbox wire-format list types from
`Backlogs::Target` instead of hand-spelling them across the six
components, keeping the `(list_type, list_id)` contract in one place.

The move dialogs read the value into a local before the Primer form
block, which is instance-exec'd against the form object and so can
not resolve the component method directly.

Updates the component specs to assert the shared target values.
Replaces the runtime `vi.doMock` calls in `beforeAll` with hoisted
top-level `vi.mock` declarations, so the specs no longer mutate the
shared, non-isolated Vitest module registry mid-run — the source of
the chromium-only spy-contention flake.
The `.Box-row[data-dragging="source"]` and `[data-drop-position]`
rules sat at the top level of the shared border-box component, so the
global `generic-drag-and-drop` `data-dragging` marker restyled dragged
rows in admin and settings dragula lists. Nests them under
`.op-border-box-list`, and renames the drop-gap custom properties to
match that scope.
A list-refresh morph triggered by an unrelated WorkPackage update can
replace the captured parent list mid-request. Restoring an optimistic
move into that detached node dropped the row out of the live DOM until
the next reload. Skips restoration when the captured parent is no
longer connected, letting the pending refresh reconcile the position.
`renderDropIndicatorOn` writes the drop position onto the item's next
sibling. When a list-refresh morph removes the hovering item mid-drag,
its controller disconnects without an `onDrop`, and no other
controller may clear a foreign owner — so the indicator lingered as a
phantom drop line until a full reload. Clears the owned indicator in
`disconnect`.
The frontend ubiquitous-language doc named only the per-item Drop
target, yet the code also outlines the whole list via
`data-drop-container`. Adds a Drop container term for that list-level
state, documents the wired `drop-position-value` in the consumer
contract, and aligns the sass comment. Keeps the existing
`_Avoid_: Container` notes, since Drop container is a distinct state,
not a synonym for a target or list.
Comment on lines +69 to +72
// Box density variant classes copied onto the drag-preview container. The preview is
// mounted outside the originating Box, so variant-scoped card styles (e.g.
// `.Box--condensed .Box-card`) would not apply to it otherwise.
const BOX_DENSITY_VARIANT_CLASSES = ['Box--condensed', 'Box--spacious'] as const;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@HDinger I do not like that we have to hard-code these classes here.

myabc added 11 commits July 6, 2026 16:34
Drops the unused `require "json"` and the `expect_backlog_blankslate*`
aliases, which had no callers.
Uses 2-space continuation indent for the `move` service call and the
`target_open_sprints` / `target_buckets` query chains instead of
paren-aligned indent, and moves `move_params` / `move_service_params`
to the bottom of the private section.
Breaks the two card-list data guards, the bucket-dialog select-list
arguments, and the item controller's missing-value warnings across lines
to stay within the 120-column guide.
Updates the selected/current-state comments to name the
`backlogs--work-package` controller, renamed from `backlogs--story`
earlier on this branch.
Types the `dropTargets.find` predicates as type guards so the target
item and list narrow to `HTMLElement` with their payload types, dropping
the three redundant re-checks that followed.
A drop onto the list from a row already in it is a no-op — the item drop
targets own within-list reorder — yet the list-level `canDrop` still
accepted it, so the source list painted its container outline for
nothing. Adds the `isSourceListTarget` exclusion `resolveDropIntent`
already applies.
Moves the `op:toasters:add` event name into a dependency-free
`toast-event` module so the Stimulus controller can dispatch it via the
shared `OPToastEvent` constant without importing the Angular
`ToastService` graph; `toast.service` now re-exports it. Also drops an
unused filter arg the touched file carried.
Moves the aria-busy progress/dim rule out of the backlogs page
module and onto `.op-border-box-list`, beside its sibling drop
state. The rule targeted the sortable list by its Stimulus
controller attribute; `.op-border-box-list` names the same element
and keeps the busy styling next to the list it belongs to.
Replaces the unbounded `loop`/`next`-on-stale-element retry in
`pick_up_and_release_work_package` with the shared `retry_block` helper,
capped at three tries on the stale-node errors. Because `retry_block`
no-ops under `RSPEC_RETRY_RETRY_COUNT=0`, single and local runs now fail
fast on a stale node instead of spinning, so the underlying fault
surfaces for the follow-up rather than being masked.
Moves the drag-preview clone, sanitisation and Box density copying
out of the item controller into a `preview` helper, leaving the
controller to wire pragmatic drag and drop. The sanitisation and
density logic is a pure DOM transform, so it gains a focused spec
that exercises it without booting a controller.
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/activities/work_package/activities_spec.rb[1:5:2:2]
  • rspec ./spec/features/work_packages/table/switch_types_spec.rb[1:1:2]
🤖 Ask Copilot to investigate

Copy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer.

@copilot The following spec(s) are flaky in CI (first seen on PR #23218, linked for reference only):

- `rspec ./spec/features/activities/work_package/activities_spec.rb[1:5:2:2]`
- `rspec ./spec/features/work_packages/table/switch_types_spec.rb[1:1:2]`

Treat this as a standalone task, unrelated to PR #23218. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #23218 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @myabc to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @myabc, and request a review from @myabc.
On every commit, set @myabc as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

Copilot AI 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.

Pull request overview

Copilot reviewed 92 out of 93 changed files in this pull request and generated 3 comments.

Files not reviewed (1)
  • frontend/package-lock.json: Generated file

Comment on lines +129 to +132
blankslate_description: "Drag items here to add them."
blankslate_title: "Backlog bucket is empty"
drop_zone_label: "Drop here to add item to this bucket"
label_actions: "Backlog bucket actions"
Comment on lines +157 to 160
drop_zone_label: "Drop here to add item to inbox"
show_more:
one: "Show 1 more item"
other: "Show %{count} more items"
Comment on lines 190 to 193
blankslate_description: "No items planned yet. Drag items here to add them."
blankslate_title: "%{name} is empty"
drop_zone_label: "Drop here to add item to this sprint"
label_actions: "Sprint actions"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature javascript Pull requests that update Javascript code needs review pullpreview

Development

Successfully merging this pull request may close these issues.

7 participants