Skip to content

feat(agent-chat): the data box shows what it waits for - #12221

Merged
MarkusNeusinger merged 4 commits into
mainfrom
feat/agent-convert-loading
Oct 21, 2026
Merged

MarkusNeusinger merged 4 commits into
mainfrom
feat/agent-convert-loading

Conversation

@MarkusNeusinger

Copy link
Copy Markdown
Owner

Summary

  • Owner report 2026-10-21: dropping a Parquet file (or any other binary file read on the server), or clicking .parse(), greyed out the buttons and seemed to do nothing until the data suddenly appeared. The only sign of work was a quiet line under the buttons.
  • New BoxWorking:
    • It is drawn over the data box while a server-side file read or a parse runs: # reading "x.parquet" on the server … · 4 s or # parsing your data … · 3 s.
    • It has the existing pulsing Ellipsis, a seconds counter from the first second on, and a thin indeterminate bar along the box's foot.
    • That is a plain indicator, not a spinner (docs/reference/style-guide.md §10.1).
    • There is no bar motion under prefers-reduced-motion.
    • The overlay is aria-hidden; screen readers keep hearing the existing live line. The drop zone gets aria-busy.
  • In DataPanel, the converting boolean became convertLine (the line text itself), so the overlay and the live line say the same thing.

Plan

N/A. Gemini 4 Argon reviewed it first; its verdict is in a comment.

Test plan

  • BoxWorking.test.tsx: the line shows at once, and the counter reads · 3 s after 3 s (fake timers).
  • DataPanel.test.tsx: the overlay shows during a conversion and during .parse(), and is gone after the file lands. aria-busy is set while parsing.
  • yarn lint, fm:check, type-check, test (1,163 passed) and build.
  • Not driven in a browser: the flow needs the agents backend. After deploy, check it on /debug/agent by dropping ~/anyplot-testdaten/line-timeseries/stromzaehler.parquet, in both themes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M

A server-side file read (Parquet, Excel, ODS, Feather, NumPy) and a
.parse() take seconds, but the box only greyed its buttons and changed a
quiet line under them, so the page looked stuck. BoxWorking draws the
step over the box with a pulsing ellipsis, a seconds counter and a thin
bar (plain indicator, style guide 10.1; no motion under reduced motion).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
Copilot AI balanced review requested due to automatic review settings October 20, 2026 22:52
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M

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.

🟡 Changes recommended

Elapsed time resets when the overlay remounts, and long filenames can be clipped on narrow screens.

2 open issues
What changed in this PR

Adds visible progress feedback to the agent-chat data box during server-side file reads and parsing.

Changes:

  • Adds an overlay with status text, elapsed seconds, and a reduced-motion-aware progress bar.
  • Shares conversion status text and marks the drop zone as busy.
  • Adds component tests and a changelog entry.
File Description
changelog.d/​agent-box-working.md Documents the progress feedback.
app/​src/​sections/​agent-chat/​DataPanel.tsx Integrates the overlay and busy state.
app/​src/​sections/​agent-chat/​DataPanel.test.tsx Checks conversion and parsing feedback.
app/​src/​sections/​agent-chat/​BoxWorking.tsx Implements the progress overlay and timer.
app/​src/​sections/​agent-chat/​BoxWorking.test.tsx Tests status text and elapsed seconds.

Review effort: Balanced

Comment thread app/src/sections/agent-chat/BoxWorking.tsx Outdated
Comment thread app/src/sections/agent-chat/BoxWorking.tsx
@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…icks

Gemini 4 Argon review of #12221:
- the overlay dims the text underneath, so the line stands out on the
  box's own surface in both themes;
- a drag over the box hides the overlay instead of unmounting it, so the
  seconds counter keeps running;
- only the conversion that set the line clears it (convertSeq), so a
  later read that converted nothing cannot leave the box waiting;
- aria-busy sits on the textarea, not on its wrapper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
@MarkusNeusinger

Copy link
Copy Markdown
Owner Author

First review: Gemini 4 Argon

Verdict: needs fixes. Applied in the latest commit:

  • Overlay surface: the pill shared the textarea's surface. The overlay now dims the text underneath (color-mix of --bg-elevated at 55 %), so the line stands out in both themes.
  • Stuck overlay: a later read that converted nothing could leave the overlay stuck, because the clear was guarded by readSeq. Only the conversion that set the line clears it now (convertSeq).
  • Drag over the box: a drag unmounted the overlay and reset the counter. It is now hidden instead, and the counter keeps running.
  • aria-busy: moved from the wrapper div to the textarea.

Not applied:

  • Disabling the textarea while it waits. Editing during a conversion is a designed path: the edit wins, and .replace() asks when the file lands (textRef, offerFile). That behaviour is unchanged by this PR, so I kept it.
  • Dropping the counter and the bar as over-designed. The owner asked for a visible loading animation. A sandbox read takes several seconds, so the counter shows that the page is alive. The bar has no motion under reduced motion.
  • Hiding the live line under the box. Screen readers need it, and the overlay is aria-hidden.

Fable was not involved: this is a UI-only change with no high-risk surface.

… wrap

Copilot review of #12221:
- the panel keeps when the conversion and the parse began (set where
  they start), so collapsing and reopening the card no longer restarts
  the overlay's seconds count;
- the overlay's label wraps a long file or sheet name instead of being
  clipped on a narrow screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M

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.

🔵 Needs a closer look

Browser verification of overlay layout and legibility on desktop and mobile in both themes remains outstanding.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@MarkusNeusinger
MarkusNeusinger merged commit c87940f into main Oct 21, 2026
16 checks passed
@MarkusNeusinger
MarkusNeusinger deleted the feat/agent-convert-loading branch October 21, 2026 06:08
MarkusNeusinger added a commit that referenced this pull request Oct 22, 2026
…ude (#12226)

## Summary
- Google's Antigravity FAQ ("Wrapping `agy` inside third-party coding
agents or applications … is not supported under consumer plans") and a
staff reply on 2026-10-16 ([forum topic
189905](https://discuss.ai.google.dev/t/clarification-on-consumer-plan-policy-for-invoking-official-agy-via-local-subprocess/189905):
"No under consumer plans", even for the unmodified binary as a local
subprocess) rule out the read-only `agy -p` second opinions #12223
introduced. Claude stopped running agy on 2026-10-21.
- Second opinions and first PR reviews go through the new `zweitmeinung`
project skill: `.claude/skills/zweitmeinung/gemini_review.py` calls
Gemini through Vertex AI in project `anyplot`, location `global` (the
site's agents stay on `eu`), with read-only tools over tracked
repository files, prefetched data, and the public API; no shell, no
credentials. The owner's split (2026-10-21/22): **Gemini 3.8 Flash on
Flex PayGo** (half price) for routine first reviews, on probation
against Copilot's findings; **Gemini 4 Argon**, thinking high, for plans
and second opinions.
- Cost work after a comparison run on three merged PRs (#12203, #12221,
#12222): every tool turn re-sends the conversation, so `--diff-base`
inlines the diff and changed files and `read_files` reads several files
per call. Two loop bugs found there are fixed and pinned by tests: a
text part beside the last function responses made Vertex answer 400, and
a last turn without tools lost the implicit cache while Flash kept
calling tools. The budget is now enforced through the tool responses
with one tool configuration for all turns. Measured: Flash $0.07–0.28
per review, Argon $0.57–1.16.
- Flex gets 5 minutes per run (and per request); after that, or after a
timeout or a 429/5xx, the run goes online (`flex_fallback`,
`per_turn_seconds`). The SDK retries timeouts too: the first Flash
review of this PR waited over an hour on 15-minute attempts, and with a
5-minute cap per request the next one still ran for over 25 minutes.
- Hardening after Copilot's reviews: a symlink is visible only when its
target is itself a visible entry (a tracked `review.txt -> .env` exposed
the untracked `.env` before), secret-name patterns apply to every path
component of `--data` files, lock files stay out of the inlined diff and
the diff is capped at 120,000 characters, a backtracking search pattern
is stopped after 10 seconds, a line longer than the tool limit is cut
instead of looping, and an unencoded URL is refused instead of crashing
the run.
- `gemini-task`: Gemini pushes its `gemini/*` branch and opens a **draft
PR** labelled `gemini`. CI runs on drafts, Copilot does not
(`review_draft_pull_requests: false` in the ruleset), and Claude marks
the draft ready after its own review. The owner may let Gemini run tests
and builds unattended in his own agy session; only he starts agy.
- `CLAUDE.md` and `.claude/guardrails.md` describe the lanes and costs;
the guardrail test anchors pin the obligations (Flash/Argon split, draft
PRs only, Claude never runs agy).

## Plan
N/A. The owner chose the Vertex route on 2026-10-21 after reading a
research report on the policy, then the Flash/Argon split, the draft-PR
hand-over, and moving the skill into the repository on 2026-10-22.

## Test plan
- [x] `uv run pytest tests/unit tests/integration -n 8` (new
`tests/unit/test_gemini_review.py`: confinement, http_get refusals,
inlining caps, and the tool loop against a fake Vertex client)
- [x] `uv run ruff check . && uv run ruff format --check .`
- [x] `uv run python -m tools.changelog check --base origin/main`
- [x] Flash smoke run with `--max-turns 1` on Vertex: forced last turn
answers (exit 0), `traffic_type` `ON_DEMAND_FLEX`
- [x] Gemini 3.8 Flash first review of this PR through the repository
script: 3 of 5 findings applied (owner-only PR comments for Gemini, `git
diff -z`, `*api_key*`); 2 skipped (callers already resolve
`check_attachment`'s root, and the SDK returns `finish_reason` as an
enum). Flex gave no answer on the first turn, so the run went online: 9
turns, $0.86.
- [x] Copilot: three rounds on the rework, 9 findings, all applied

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M

---------

Co-authored-by: Claude Opus 5.5 <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