Skip to content

#1083 chosenTeamUnavailable re-parses the teams body on every render - #31

Merged
polymaniadeveloper-hub merged 1 commit into
fix/mobile-board-exitfrom
delivery/1083-chosenteamunavailable-re-parses-the-team-1e37df276f
Oct 13, 2026
Merged

polymaniadeveloper-hub merged 1 commit into
fix/mobile-board-exitfrom
delivery/1083-chosenteamunavailable-re-parses-the-team-1e37df276f

Conversation

@polymaniadeveloper-hub

Copy link
Copy Markdown
Collaborator

Task pingdotgg#1083, run run-1e37df276f. Approved by T for commit 52a76ba, which passed its checks and the QA gate.

What was asked

Found by qa-attack (zhipu) while testing task task-8a53ca9f8c.

Steps: Open the composer in Orchestrator mode with any prompt and type; each keystroke re-renders OrchestratorComposerControls, whose teamAvailabilityReason now calls chosenTeamUnavailable(teamsRead, draft), and that function runs selectableTeams(read.body) (full parseTeam pass over every record) instead of reusing the memoized teams array the component already holds at OrchestratorComposerControls.tsx:68.
Expected: The already-memoized selectableTeams(teamsRead.body) result is reused, as the old expression did via the teams memo.
Actual: The whole teams body is re-parsed once per render. Cost is microseconds for realistic team lists, so no user-visible jank is expected; it is a redundant parse the change introduced.

  • Finding: find-7e8048b3a2, not blocking, out of scope of the task it was found on, in the code that change delivered
  • Run: run-f1aab4eb94
  • Candidate tested: a9d27ec
  • Evidence: /Users/tevinmuparadzi/.paperclip/polymania/runs/run-f1aab4eb94/evidence

Done when

  1. Computing teamAvailabilityReason in OrchestratorComposerControls uses the memoized selectableTeams result (or data derived from it), so selectableTeams runs at most once per change of teamsRead.body, not once per render.
  2. With a failed teams reading that retains a body missing the settled chosen team, Save draft and Start stay blocked with 'Team is not offered here. Choose another team.'
  3. A successfully loaded empty team list still answers 'No teams are available to choose from.' and takes precedence over the not-offered message.
  4. The focused tests delivered with task-8a53ca9f8c (new draft, saved draft, empty-list precedence, unchanged failure behavior, recovery without replaying blocked requests) still pass unchanged.

Opened by the delivery engine after a person's approval. Merging is a separate step.

Removed redundant team parsing by passing the memoized teams to chosenTeamUnavailable. Preserved blocking messages, empty-list precedence and failure behavior.

Task task-a4bb7fbb17, revision 2, run run-1e37df276f.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Oct 13, 2026
@polymaniadeveloper-hub
polymaniadeveloper-hub merged commit 983a86f into fix/mobile-board-exit Oct 13, 2026
7 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant