Skip to content

fix(build): track ToolCallVisibility.cs — main CI was red (CS0103)#138

Merged
rbuergi merged 1 commit into
mainfrom
fix/persist-syncbehavior
Jun 30, 2026
Merged

fix(build): track ToolCallVisibility.cs — main CI was red (CS0103)#138
rbuergi merged 1 commit into
mainfrom
fix/persist-syncbehavior

Conversation

@rbuergi

@rbuergi rbuergi commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Hotfix for the red main after #136. ThreadMessageBubbleView.razor references ToolCallVisibility but the source file was never git added — builds locally, fails clean-checkout CI with -warnaserror, and blocks the self-update (needs a green main). One tracked file; verified -c Release -warnaserror.

🤖 Generated with Claude Code

… git-added (main went red)

The chat-bubble feat commits committed ThreadMessageBubbleView.razor referencing
ToolCallVisibility.Partition, but ToolCallVisibility.cs was left UNTRACKED in the working tree
— so the solution built locally yet failed `dotnet build -c Release -warnaserror` on a clean CI
checkout (CS0103: 'ToolCallVisibility' does not exist). That is what turned main red after #136
merged and what blocks the pull-based self-update (it needs a green main image to roll forward).
Verified: MeshWeaver.Blazor compiles -c Release -warnaserror with the file tracked.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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 hotfixes the broken main build by adding the missing tracked source file ToolCallVisibility.cs, which is referenced by Blazor chat components and was previously only present in local working copies.

Changes:

  • Adds ToolCallVisibility (partitioning/counting logic for tool-call visibility in chat bubbles) to MeshWeaver.Layout so clean-checkout CI compiles again.
  • Defines rules for “visible window” vs “collapsed remainder” of tool calls, including backfill and a completion linger window.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +31 to +43
/// <summary>Actively executing — only a delegation streaming its sub-thread carries this status.</summary>
public static bool IsRunning(ToolCallEntry call) => call.Status == ToolCallStatus.Streaming;

/// <summary>
/// Dispatched but no result yet. <see cref="ToolCallEntry.Status"/> defaults to
/// <see cref="ToolCallStatus.Success"/> via the record initializer even before the result lands,
/// so "pending" is "default status, result still null" — a terminal Failed/Cancelled counts as completed.
/// </summary>
public static bool IsPending(ToolCallEntry call) =>
call.Status == ToolCallStatus.Success && call.Result is null;

/// <summary>Settled — has a result, or reached a terminal Failed/Cancelled status.</summary>
public static bool IsCompleted(ToolCallEntry call) => !IsRunning(call) && !IsPending(call);
Comment on lines +86 to +90
// Backfill leftover slots with the newest completed ("when fewer than 5, also show closed");
// ALSO keep any just-finished call on screen for the linger window even when the cap is full.
var slots = Math.Max(0, cap - activeShown.Count);
var freshCount = completed.Count(c => IsFreshlyCompleted(c, nowUtc));
var completedShown = completed.Take(Math.Max(slots, freshCount)).ToList();
@rbuergi rbuergi merged commit 8b53773 into main Jun 30, 2026
4 of 7 checks passed
@github-actions

Copy link
Copy Markdown

Test Results (shard 3)

1 265 tests   1 249 ✅  3m 48s ⏱️
   12 suites      0 💤
   12 files       16 ❌

For more details on these failures, see this check.

Results for commit e244dfb.

rbuergi added a commit that referenced this pull request Jul 1, 2026
…e discriminator

These Layout.Test serialization tests never ran in CI before (the ToolCallVisibility build
failure masked them), so the $type short-name cure's fallout surfaced only after #138 landed:

- OptionConverter only matched the FULL "MeshWeaver.Layout.Option`1[" prefix; the short form
  "Option`1[Int32]" fell through to Type.GetType → "Unable to resolve Option type". Now accepts
  both the full and short Option`1[…] prefix.
- ControlsSerializationTest / LayoutSerializationTest hard-coded full-name $type
  ("MeshWeaver.Layout.HtmlControl", …) and queried TryGetType with full names — updated to the
  short names the discriminator now emits.

Result: 14/15 MeshWeaver.Layout.Test pass. Remaining: EditorTest.TestEditorWithResult (the
round-tripped EditorControl shows 0 PropertySkins) — a separate editor/round-trip issue, NOT this
serialization change (the editor processing is untouched on this branch). Tracked separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rbuergi added a commit that referenced this pull request Jul 10, 2026
…ate, off the REST rate limit

Replaces the `gh run watch` / `gh pr checks --watch` guidance (polls REST every ~3s → drains the
shared 5000/hr user-token budget → 403s that masquerade as CI-red) with a GraphQL check-suite poll
on its own budget. Gating on the check SUITE (COMPLETED only when every shard finishes) also closes
the late-shard race that turned main red after #138. Adds:
- step 6: fast-forward local main with `git fetch origin main:main` (no checkout — the tree is
  usually a dirty feature branch)
- run the step-3 gate in the background so the harness delivers ONE "CI finished" notification (the
  completion event; a local CLI session can't be webhooked directly)
- a 403 caveat (never merge off a rate-limit; /rate_limit is exempt), the GitHub-App-token durable
  fix, and the deferred webhook->WS push design

The poll collapses to the LATEST check-suite (`| last`) so a workflow re-run's extra suite can't make
`$(suite …)` multi-line and stall the gate (Copilot review).

What's New: skipped — pure-internal tooling change to the /pullrequest skill, no user-visible effect.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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