Route diff calls through kata, improve review navigation UX#349
Merged
Conversation
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>
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>
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.
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.