fix(ios): focus-collapse composer + whole-round ensemble summary#8
Merged
Conversation
…e last participant buildRunSummary returned summarizeRun(runs[last]) — for an ensemble round (one run per participant, all sharing an ensembleRoundId) that meant the headline Task-complete card showed only whichever participant finished last. Continuous ensembles with many turns made the tally badly understate the round. Now when the last run belongs to a multi-participant round, fold the whole round: SUM tokens (in/out/total) and cost across participants (cost summed numerically then formatted once; "~" if any was estimated), UNION file changes (per-file rows dedupe by path with summed churn; per-workspace rows dedupe by path), and span the duration earliest-start → latest-end. The round-boundary (last) run supplies the representative runId/provider/model/status. Extracted extractRunCostUsd() so per-run and round-fold share the exact cost logic. Solo chats + single-run rounds are unchanged. Tests: ensemble-round aggregation (summed tokens/cost, spanned duration, folded duplicate file) + single-run-round no-op. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…drops The above-composer rows lingered while a draft/queue existed because they gated on composerExpanded (which stays true on content). Per request, tie them to raw FOCUS instead: when the composer loses focus, hide everything above the input — diff/changes rows, roster, queued prompts — AND the telemetry rail, leaving just the one-line input + model pill + send. - ComposerView: add onFocusChange (reports raw inputFocused, distinct from onExpandedChange which lingers on draft/queue). - ThreadDetailViews: new composerFocused state drives the above-rows group (now wrapped in `if composerFocused`), the tucked secondary rows, the telemetry rail, and the attachedTop/attachedBottom seams via hasAboveContent (now focus-gated). Main composer forcesExpanded → false so ensemble collapses on blur too (its roster reappears on focus for @-direct). A draft still keeps the input itself expanded (Composer's own isExpanded), so text isn't hidden. Verified: swift build + 73 tests + iPhone-17 simulator build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
boggspa
added a commit
that referenced
this pull request
Jun 18, 2026
Same-day follow-up to 1.5.8 carrying the field-feedback batch (PR #8): iOS composer collapses to one line when not focused, and the ensemble Task-complete summary now aggregates the whole round (sum tokens/cost, union file changes, span duration) instead of the last participant — the Mac-projected half, which is why it needs a desktop release. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two iOS-companion fixes from field feedback (build 23 / v1.5.9 candidates).
1. Composer collapses to one line when the keyboard drops
The above-composer rows lingered while a draft/queue existed (they gated on
composerExpanded, which stays true on content). Now they follow raw focus: blur the composer → hide everything above the input (diff/changes rows, roster, queued prompts) and the telemetry rail, leaving just the one-line input + model pill + send.ComposerView: newonFocusChange(reports rawinputFocused, distinct fromonExpandedChange).ThreadDetailViews:composerFocusedstate gates the above-rows group (wrapped inif composerFocused), the tucked secondary rows, the telemetry rail, and theattachedTop/attachedBottomseams (via a now focus-gatedhasAboveContent). Main composerforcesExpanded → falseso ensemble collapses on blur too (roster reappears on focus for @-direct) — per the explicit ask to include all four row types. A draft still keeps the input itself expanded, so typed text isn't hidden.2. Ensemble "Task Complete" summary reflects the whole round
buildRunSummaryreturnedsummarizeRun(runs[last])— for an ensemble round (one run per participant) that showed only the last participant's stats. Continuous ensembles with many turns badly understated the round.Now when the last run belongs to a multi-participant round, fold the whole round: sum tokens (in/out/total) and cost (numeric then formatted once;
~if any estimated), union file changes (per-file rows dedupe by path with summed churn; per-workspace by path), and span the duration earliest-start → latest-end. The round-boundary run supplies the representative runId/provider/model/status. Solo chats + single-run rounds unchanged. ExtractedextractRunCostUsd()so per-run and round-fold share the exact cost logic.Verification
typecheck✓ · full suite 4841 ✓ ·RemoteThreadProjection.test.tsadds ensemble-round aggregation + single-run-round no-opswift build✓ ·swift test73/73 ✓ · iPhone-17 simulator BUILD SUCCEEDED🤖 Generated with Claude Code