Skip to content

fix: use current board angle when setting proposal climb as active#868

Open
marcodejongh wants to merge 3 commits intomainfrom
claude/fix-proposal-climb-angle-T48j9
Open

fix: use current board angle when setting proposal climb as active#868
marcodejongh wants to merge 3 commits intomainfrom
claude/fix-proposal-climb-angle-T48j9

Conversation

@marcodejongh
Copy link
Owner

When a proposal climb was set as the active climb via "Set Active",
the climb's angle would be set to 0 or the proposal's stored angle
instead of the current board/queue angle. This happened because the
climb object from the proposal card carried the proposal's angle.

Override the climb's angle with the current board angle in both
addToQueue and setCurrentClimb in the GraphQL QueueContext (party mode)
and the persistent session queue adapter (local mode).

https://claude.ai/code/session_01Na4cZifibvzbqcjysHmDiE

When a proposal climb was set as the active climb via "Set Active",
the climb's angle would be set to 0 or the proposal's stored angle
instead of the current board/queue angle. This happened because the
climb object from the proposal card carried the proposal's angle.

Override the climb's angle with the current board angle in both
addToQueue and setCurrentClimb in the GraphQL QueueContext (party mode)
and the persistent session queue adapter (local mode).

https://claude.ai/code/session_01Na4cZifibvzbqcjysHmDiE
@vercel
Copy link

vercel bot commented Feb 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
boardsesh Building Building Preview, Comment Feb 28, 2026 11:23am

Request Review

@claude
Copy link

claude bot commented Feb 28, 2026

Claude Review

Ready to merge - Minor issues noted below, but nothing blocking.

Issues

  1. Missing test coverage - No tests verify the angle override behavior. The existing queue-bridge-context.test.tsx tests addToQueue and setCurrentClimb but don't assert that the climb's angle is overridden with the current board angle (line 300 only checks climb.uuid, not climb.angle).

  2. Edge case: empty queue in local mode (queue-bridge-context.tsx:66) - When localCurrentClimbQueueItem is null, angle defaults to 0. If a user adds a proposal to an empty local queue, the climb will have angle 0 instead of its original angle. This may or may not be intended behavior.

…de tests

When the local queue is empty (no current climb), the angle defaults to 0.
Previously this would override any added climb's angle to 0. Now only
override the climb's angle when there's a real angle source (party session
or existing queue item with an angle).

Add 4 tests verifying:
- addToQueue overrides angle with current queue angle
- setCurrentClimb overrides angle with current queue angle
- addToQueue preserves climb's original angle on empty queue
- setCurrentClimb preserves climb's original angle on empty queue

https://claude.ai/code/session_01Na4cZifibvzbqcjysHmDiE
@claude
Copy link

claude bot commented Feb 28, 2026

Claude Review

Ready to merge - Bug fix is correct and well-tested for the local queue adapter.

Minor notes (non-blocking):

  • Missing tests for GraphQL context (packages/web/app/components/graphql-queue/QueueContext.tsx): The angle override fix is applied to both QueueContext.tsx and queue-bridge-context.tsx, but tests only cover the latter. The changes are identical in pattern ({ ...climb, angle } override), so this is low risk.

No documentation updates needed - this is a bug fix that doesn't affect documented systems.

The test relied on two sequential saveQueueState calls getting different
Date.now() values, but both could execute within the same millisecond,
making the result non-deterministic. Write directly to IndexedDB with
controlled timestamps instead, matching the pattern used by the
corrupted items test.

https://claude.ai/code/session_01Na4cZifibvzbqcjysHmDiE
@claude
Copy link

claude bot commented Feb 28, 2026

Claude Review

Ready to merge - No significant issues found.

Bug fix correctly overrides climb angle with current board angle when setting proposal climbs as active. Implementation handles edge cases appropriately (empty queue in local mode preserves original angle). Test coverage is good, including edge cases for both addToQueue and setCurrentClimb operations.

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.

2 participants