Skip to content

fix(progress): show an attached goal item at once - #1724

Merged
github-actions[bot] merged 1 commit into
mainfrom
claude/goal-item-attachment-latency-56637c
Nov 10, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
claude/goal-item-attachment-latency-56637c

Conversation

@JSdotNet

Copy link
Copy Markdown
Owner

Summary

 GoalsHost.WriteAsync — attach, quick add, picker attach/move, detach
   await module write                 (AttachAsync / DetachAsync → GoalDto)
+  Draw(goal) + StateHasChanged()     row shows now, leaves No goal / the old goal
   await ReadAsync()                  stand-up → goals → pull requests (can reach GitHub)
-  render                             row showed only here, seconds later
+  render                             counts and PR statuses catch up

An item attached to a goal in the Goals view took seconds to appear. The board redrew only after a full re-read, and that re-read asks GitHub for every pull request on the board. The host now draws the goal the module answered with straight away. A goal the board has not read yet (one the picker's New goal… just made) is left to the reading, so a moved item never shows under No goal. The goal control on a task's panel (GoalAttach) gets the same fix: it renders the new goal and closes its picker before the re-read.

Changes

  • GoalsHost.razor:
    • WriteAsync takes a Written(Read, Goal). On success it draws the module's goal before the reading, and only when a reading follows.
    • Draw replaces that goal in the last reading and keeps its counts. It takes the goal's items off every other goal, since an item belongs to at most one.
    • The header comment says this.
  • GoalAttach.razor: renders before its re-read.
  • GoalsHostTests and GoalAttachTests:
    • The fakes can now hold the reading open and answer a write after a yield.
    • 6 new tests.

Testing

Before After Tier
bUnit (GoalsHostTests, GoalAttachTests, filtered) 5 failed / 58 passed in round 1; the round-2 test failed on the round-1 code 64 / 64, three runs A
Release build Backlog.WithoutAppHeads.slnf -warnaserror — 0 warnings, 0 errors B
Full dotnet test (Release) — 23,022 / 23,043 passed A
QA, desktop-web-harness, targeted row appeared with the counts, after the re-read row in 34–84 ms; counts 1–2.7 s later S

The 2 full-suite failures (TaskSyncWorkerTests.A_rehydrate_asked_for_during_a_cycle_is_still_carried_out, DevbookSyncWriteTests.Inheriting_again_clears_the_entry) are outside the change set. Each class passed 3/3 when rerun alone.

The new tests hold the reading open and assert the board before and after it lands:

  • An_attached_item_shows_on_its_goal_before_the_reading_after_it_lands
  • A_moved_item_shows_on_its_new_goal_and_leaves_the_old_one_before_the_reading_lands
  • An_item_moved_into_a_new_goal_from_the_picker_never_shows_under_no_goal_before_the_reading_lands
  • A_detached_item_leaves_its_goal_before_the_reading_lands
  • A_new_task_shows_on_its_goal_once_attached_before_the_reading_lands
  • An_attach_shows_the_new_goal_and_closes_the_picker_before_the_goals_are_read_again

QA covered four scenarios, all passing: attach a task, detach it, attach and detach PR #1712, and the goal picker on a task's panel. Timings run from the click to the DOM change. In the runs where the re-read was slow, the row was drawn well before the counts changed. Aspire showed no error logs; the two startup 404 traces for the fixture repos acme/web and acme/api were there before any scenario ran. The application heads (desktop and mobile MAUI) were not built.

Review took two rounds. Round 1 found one bug: a move into a goal just made in the picker showed the item under No goal for a moment. It is fixed and has its own test. One advisory remains open and predates this change: attach and detach have no busy guard, so two overlapping writes answered out of order would draw the older goal until the reading lands.

Spec check:

  • .devbook/domain/progress/features.md#the-goals-view is code-ahead. One sentence is still to be captured: "After an attach, a move or a detach made in it, a goal shows what it now holds at once, and its counts and pull request statuses follow when the view is read again."
  • #attaching-work-to-a-goal is aligned.

Related

Fixes a defect reported in a session; there is no issue.

Merge danger: two-way door. A revert undoes it: no migration, no stored value, no chapter change. Blast radius: local, limited to the Goals view and the goal control on the task panel, plan shelf, roadmap editor and pull request screens.

Checklist

  • Scope is focused and excludes unrelated changes
  • Documentation or instruction files were updated when governance or behavior changed (the host's header comment; the chapter sentence is a follow-up)
  • Running Aspire instances for this checkout were stopped before PR creation (build\stop-aspire-before-pr.ps1)
  • Follow-up work is captured when the implementation is intentionally partial
  • Issues this PR closes are linked with a closing keyword, or there are none

🤖 Generated with Claude Code

Attaching an item to a goal in the Goals view waited for the full re-read
(stand-up, goals, pull requests, which can reach GitHub) before the board
redrew, so the row appeared seconds later. The host now draws the goal the
module answered with at once on attach, quick add, picker attach and move,
and detach, and the reading after it brings the counts and statuses. A goal
the board has not read yet (made by the picker's New goal...) is left to the
reading, so a moved item never shows under No goal. The goal control on a
task's panel renders the new goal and closes its picker before re-reading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions
github-actions Bot enabled auto-merge November 10, 2026 11:47
@github-actions
github-actions Bot merged commit edf34e3 into main Nov 10, 2026
10 checks passed
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