Skip to content

Route diff calls through kata, improve review navigation UX#349

Merged
JonJagger merged 8 commits into
mainfrom
route-diff-through-kata-improve-review-ux
May 24, 2026
Merged

Route diff calls through kata, improve review navigation UX#349
JonJagger merged 8 commits into
mainfrom
route-diff-through-kata-improve-review-ux

Conversation

@JonJagger
Copy link
Copy Markdown
Member

Replace direct browser-to-differ calls for diff_summary and diff_lines with kata/diff_summary and kata/diff_lines routes backed by the saver service, keeping all external service calls server-side.

Remove the yin-yang wait spinner from review getJSON calls. Add smooth fadeTo transitions when navigating within the review page, with file and output refreshes sequenced so they are never both visible at the same time.

Replace direct browser-to-differ calls for diff_summary and diff_lines
with kata/diff_summary and kata/diff_lines routes backed by the saver
service, keeping all external service calls server-side.

Remove the yin-yang wait spinner from review getJSON calls. Add smooth
fadeTo transitions when navigating within the review page, with file and
output refreshes sequenced so they are never both visible at the same time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@JonJagger JonJagger marked this pull request as draft May 21, 2026 17:14
JonJagger and others added 7 commits May 21, 2026 19:43
The saver no longer supports writes on v0/v1 katas, so all tests must
create v2 katas. starter_manifest now explicitly sets version=2 and
normalises visible_files to hash format. stdout/stderr are passed as
{content, truncated} hashes rather than plain strings, and status is
compared as a string since v2 stores it as a plain file. The v_tests
versioning scaffolding (v_test?, v_tests, captured_stdout loop) is
removed entirely. Fb9824 (saver-outage gap test) is deleted because v2
enforces strictly sequential indexes. Fb9825 and Fb9860 are updated to
use result['next_index'] rather than hardcoded indexes, as v2 may
insert file_edit events that consume index slots.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The diff_lines and diff_summary routes added in the previous commit had no
tests. These smoke tests confirm the routes work: after editing hiker.sh
between two traffic-light events, both endpoints correctly report 1 changed
file (with expected line counts) and 4 unchanged files.

Also removes the unused html() helper from AppControllerTestBase.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
setupPrediction called predictOff() which persisted the value to the
server on every page load, even when nothing had changed. Split into
applyPredictOn/applyPredictOff (UI only) and keep predictOn/predictOff
for the user-interaction path (persist then apply). setupPrediction now
calls the apply-only variants so page load never triggers a write.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The runner's pull_image endpoint is async: calling it from inside the
test left the image still downloading when run_cyber_dojo_sh was called,
causing a timeout. Instead, pull the image synchronously on the host
before the test suite starts. The runner shares the host Docker socket,
so an image pulled on the host is immediately available to it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Suppresses the "image's platform does not match the detected host
platform" warning when running on arm64 hosts (Apple Silicon, Graviton).
Also pass --quiet to the pre-pull to silence Docker Scout output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The runner's config.ru runs docker image ls at startup and pre-loads
every present image into the in-memory @pulled set before forking Puma
workers. The previous fix called pull_runner_test_image inside
run_tests_in_container(), which runs after containers_up -- so the
runner had already forked with an empty @pulled for the kata image.
Every worker would see the image as unknown, kick off its own async
pull, and return 'pulling' immediately.

Moving the pull to before containers_up means the image is present when
the runner starts, picked up by docker image ls in config.ru, and
inherited by all workers before any test runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@JonJagger JonJagger marked this pull request as ready for review May 24, 2026 12:15
@JonJagger JonJagger merged commit d9ac74a into main May 24, 2026
9 checks passed
@JonJagger JonJagger deleted the route-diff-through-kata-improve-review-ux branch May 24, 2026 12:19
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