Skip to content

fix(ios): focus-collapse composer + whole-round ensemble summary#8

Merged
boggspa merged 2 commits into
masterfrom
fix/composer-focus-ensemble-summary
Jun 18, 2026
Merged

fix(ios): focus-collapse composer + whole-round ensemble summary#8
boggspa merged 2 commits into
masterfrom
fix/composer-focus-ensemble-summary

Conversation

@boggspa

@boggspa boggspa commented Jun 18, 2026

Copy link
Copy Markdown
Owner

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: new onFocusChange (reports raw inputFocused, distinct from onExpandedChange).
  • ThreadDetailViews: composerFocused state gates the above-rows group (wrapped in if composerFocused), the tucked secondary rows, the telemetry rail, and the attachedTop/attachedBottom seams (via a now focus-gated hasAboveContent). Main composer forcesExpanded → false so 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

buildRunSummary returned summarizeRun(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. Extracted extractRunCostUsd() so per-run and round-fold share the exact cost logic.

Verification

  • Mac: typecheck ✓ · full suite 4841 ✓ · RemoteThreadProjection.test.ts adds ensemble-round aggregation + single-run-round no-op
  • iOS: swift build ✓ · swift test 73/73 ✓ · iPhone-17 simulator BUILD SUCCEEDED

Note: the composer-collapse is a layout change across the 13 shells; verified it compiles + builds, but an on-device contact-sheet pass per shell is worth a glance before the build ships.

🤖 Generated with Claude Code

boggspa and others added 2 commits June 18, 2026 16:20
…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 boggspa merged commit a464ae1 into master Jun 18, 2026
16 checks passed
@boggspa boggspa deleted the fix/composer-focus-ensemble-summary branch June 18, 2026 15:43
boggspa added a commit that referenced this pull request Jun 18, 2026
…nd summary

Build 23 = PR #8: composer collapses to one line on blur (above rows +
telemetry follow focus; ensemble included) + ensemble Task-complete summary
aggregates the whole round (#3 is Mac-projected, lands with v1.5.9).

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>
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