Repository navigation
fix(web): preserve the node output scroll position on run updates - #1263
Draft
luoshuai990529 wants to merge 1 commit into
Draft
luoshuai990529 wants to merge 1 commit into
luoshuai990529 wants to merge 1 commit into
Conversation
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.
What changed
Fixes #1259.
When a downstream node finishes and the run changes from running to succeeded, the detail view rebuilds its DOM. A reader who has scrolled through a completed node’s inline output loses their place because the scrollable output element is replaced.
The detail view now restores the previous scroll offsets when the run ID, selected node ID, and displayed output text still match. Selecting another node starts at the top, even when both nodes produced identical text. Replacing the output also starts at the top.
Scope
Compatibility
This is a browser-side change to the inline node output. It requires no configuration, API, schema, or runner protocol migration.
Validation
main, the scroll offset went from 2902 px to 0. With this change it stayed at 2902 px. Switching nodes or replacing the output reset it to 0.webtest/, rannode --test tests/runs-detail.test.mjs tests/runs-actions.test.mjs tests/run-machine-label-race.test.mjs tests/run-machine-label.test.mjs. All 22 tests passed. The new regression test failed on the original implementation.git diff --check origin/main...HEADandpython3 scripts/check-public.pypassed. Gitleaks 8.30.1 found no leaks in an export of the committed tree using the repository’s configuration.bash scripts/build-chatbot.shpassed (484 tests and the production build).go vet ./...andTMPDIR=/tmp go test ./web -count=1 -timeout=180spassed.go test -p=2 ./... -count=1 -timeout=180srun on macOS reported a Unix socket bind failure and four runner PID failures in./deploy. Re-running withTMPDIR=/tmpcleared the socket failure. The short-path run still failed indeploy(four runner PID tests),internal/gitwork(checkout path), andinternal/runtime(checkout path and sandbox profile). I reproduced all seven failures separately on unmodifiedorigin/main(88255b7).internal/engineandinternal/httpapialso exceeded the 180-second package timeout on this machine; those two timeouts were not tested on the base commit.bash scripts/scan-secrets.shdownloads a Linux x64 executable and could not execute it on macOS. The native scan above used the same pinned Gitleaks version and config.Safety