Env JK_SOURCE_REPO "/home/runner/work/jk/jk"
Env JK_BIN "/home/runner/work/jk/jk/target/manual-build/jk"
Env JK_MANUAL_ARTIFACT_DIR "/home/runner/work/jk/jk/target/manual-ci/manual-run-options"
Env JK_MANUAL_SCENARIO "manual-run-options"
Require jj
Set Shell "bash"
Set Theme "Aardvark Ink"
Set FontSize 20
Set Width 1400
Set Height 900
Set Padding 0
Set Margin 20
Set WindowBar Colorful
Set CursorBlink false
Set Framerate 15
Set KeyboardOverlay Input
Set TypingSpeed 80ms
Set WaitTimeout 30s

Hide
Type@0ms "source \"${JK_SOURCE_REPO:-$PWD}/scripts/manual-fixture.sh\" run-options"
Enter
Wait+Screen "JK_MANUAL_FIXTURE_READY"
Type@0ms "initial_commit=$(jj -R \"$rebase_repo\" --ignore-working-copy log --no-graph -r @ -T commit_id) && printf \"JK_%s\\n\" BASELINE_READY"
Enter
Wait+Screen "JK_BASELINE_READY"
Type@0ms "cd \"$rebase_repo\" && clear; \"$bin\" -R \"$rebase_repo\" -n 5"
Enter
Wait+Screen "Rebase source"
Space
Type "j"
Type "R"
Wait+Screen "Choose rebase destination"
Type "/destination"
Enter
Wait+Screen "Source role:"
Show
Caption "Run options apply to this exact command and its fixed repository."
Sleep 1s
Screenshot "/home/runner/work/jk/jk/target/manual-ci/manual-run-options/manual-run-options-initial-preview.png"
State "/home/runner/work/jk/jk/target/manual-ci/manual-run-options/manual-run-options-initial-preview.json"
Sleep 2s
Type "o"
Wait+Screen "Run options"
Wait+Screen "snapshot/update"
Sleep 1s
Screenshot "/home/runner/work/jk/jk/target/manual-ci/manual-run-options/manual-run-options-drawer.png"
State "/home/runner/work/jk/jk/target/manual-ci/manual-run-options/manual-run-options-drawer.json"
Sleep 2s
Enter
Wait+Screen "ignore"
Caption "Escape discards the draft working-copy policy."
Escape
Wait+Screen "Source role:"
Sleep 1s
Screenshot "/home/runner/work/jk/jk/target/manual-ci/manual-run-options/manual-run-options-cancelled-preview.png"
State "/home/runner/work/jk/jk/target/manual-ci/manual-run-options/manual-run-options-cancelled-preview.json"
Sleep 2s
Type "o"
Wait+Screen "snapshot/update"
Enter
Wait+Screen "ignore"
Type "a"
Wait+Screen "Source role:"
Wait+Screen "--ignore-working-copy"
Caption "Apply changes the exact command; Enter is still required to execute it."
Sleep 1s
Screenshot "/home/runner/work/jk/jk/target/manual-ci/manual-run-options/manual-run-options-applied-preview.png"
State "/home/runner/work/jk/jk/target/manual-ci/manual-run-options/manual-run-options-applied-preview.json"
Sleep 2s
Type "o"
Wait+Screen "Run options"
Type "j"
Enter
Type "bad"
Enter
Type "a"
Wait+Screen "at least 12 hexadecimal digits"
Caption "Historical execution requires an explicit operation ID. Invalid IDs stay editable."
Sleep 1s
Screenshot "/home/runner/work/jk/jk/target/manual-ci/manual-run-options/manual-run-options-invalid-operation.png"
State "/home/runner/work/jk/jk/target/manual-ci/manual-run-options/manual-run-options-invalid-operation.json"
Sleep 2s
Enter
Ctrl+u
Type "012345abcdef"
Enter
Type "j"
Enter
Type "a"
Wait+Screen "--at-operation"
Wait+Screen "--ignore-immutable"
Caption "Historical operation and immutable overrides are visible in the exact command before execution."
Sleep 1s
Screenshot "/home/runner/work/jk/jk/target/manual-ci/manual-run-options/manual-run-options-historical-preview.png"
State "/home/runner/work/jk/jk/target/manual-ci/manual-run-options/manual-run-options-historical-preview.json"
Sleep 2s
Escape
Wait+Screen "1 marked"
Wait+Screen "Rebase destination"
Hide
Caption ""
Type "q"
Wait
Type@0ms "source \"$source_repo/scripts/manual-assert.sh\" manual-run-options"
Enter
Wait+Screen "MANUAL_ASSERT_OK manual-run-options"
Type "exit"
Enter
