Repository navigation
Conversation
Rebuilds a queued render when a group or hierarchy toggle reaches setHidden before the render's frame commit, so the committed rows carry the current collapse state instead of the state the draft was built with. The stale frame callback is superseded the same way a second redraw supersedes it, and a timeline pass stays promoted. Adds holdFrames and atNextPublication to the table harness, and deferred-frame regressions for group collapse and expand, hierarchy collapse, and a timeline-promoted render. https://community.openproject.org/wp/OP-20570
myabc
marked this pull request as ready for review
October 24, 2026 04:56
This was referenced Oct 24, 2026
lwassermann
self-requested a review
October 26, 2026 09:20
Contributor
|
Did you run an AI code review? Claude Opus 5 high finds several issues, such as "performRenderPass resets the edit status of all cells", "please use the existing definition of next render and test-harness frame holding" or "let's do it after the guard clause, since all tests stay green". I'm lacking context though, even with the explanation. And it feels odd to be the meat puppet. Also, I've been told not to trigger AI code reviews without consent. Would that be ok for you in general, to invite Copilot to a PR? |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Ticket
https://community.openproject.org/wp/OP-20570
What are you trying to accomplish?
Fixes a collapse that is undone when a table redraw is pending.
WorkPackageTablebuilds a render pass and commits it on the next animation frame. A group or hierarchy toggle that lands between the build and the commit updates the current rows and the collapse service, and then the commit replaces those rows with rows built before the toggle. The children reappear and the expander reverts, while the collapse service still treats the group or parent as collapsed.The race was found during the review of DREAM-885 (#26288) and reproduces on
devin the Vitest harness and in the browser: with hierarchies and the Gantt shown, callingredrawTableAndTimeline()and toggling a parent in the same task leaves the child row and timeline cell visible.What approach did you choose and why?
setHiddenis the shared entry point for both toggle paths (GroupedRowsBuilder.refreshExpansionStateandHierarchyTransformer.renderHierarchyState). When a render is pending, it now rebuilds that render from the current collapse state, which supersedes the stale frame callback the same way a second redraw does, and keeps a timeline-promoted pass promoted. Both paths update their service state before callingsetHidden, so the rebuilt pass reads the new state. The cost is one extrabuildRowswhen a toggle lands inside the pending window, which is the same as a secondredrawTable().Fixing the two call sites instead was the alternative;
setHiddenis narrower and is where #26288 already applies the same rebuild to keyboard-enabled tables. When #26288 is rebased onto this, its gatedrebuildPendingRenderForSemantics()becomes this call, and its two capability-off "race unchanged" control tests need inverting or removing.Not covered: a programmatic hierarchy change before the table's first publication never reaches
setHidden, because the transformer filters ontableRendered.hasValue(). No UI path reaches it. Separately, any timeline redraw (raced or not) drops__hierarchy-root-collapsedfrom a collapsed parent's timeline cell, because onlyHierarchyTransformersets that class andTimelineRenderPassdoes not derive it from hierarchy state. That predates this change and is left for its own ticket.The table harness gains
holdFrames()andatNextPublication(). The new regressions cover group collapse and expand, hierarchy collapse, and a timeline-promoted render. Each one asserts inside thetableRenderedpublication and on the final markup.AI involvement
Directed – I specified the requirements and AI implemented most of it; I validated via testing rather than a full line-by-line review.
Merge checklist