Repository navigation
fix(ui): the Script pane marks a stop at the start of a wrapped row on that row, and tidy its run queue (#2940) - #2985
Conversation
…n that row, and tidy its run queue (opengeos#2940) The cursor of a stop's column prefers the next row at a wrap break, so the underline, the caret and the scroll sit on the row it starts. The mark and the error's click are off in the frame a key is typed, a click on the error asks for a repaint, script_started holds a ScriptStart, and json_error_column shares script_line's trimming.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI read the full diff (4 files, +145/−28), BugsNone found. I checked:
Confidence: high. SecurityNone found. The change only touches cursor placement, mark painting, and error column computation. PerformanceNone found. Quality
AGENTS.md
Nothing was left alone from earlier reviews: Change sizeCompared with the base branch: the whole PR against main (merge base 4a40b74 to PR head f96f8ae).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Code reviewI found no bugs, security problems, or AGENTS.md violations. I left no inline comments, since I had no finding worth a thread. No earlier review threads exist on this PR, so there were no concerns to leave alone. BugsNone found. I checked:
Confidence: high. SecurityNone found. The change only affects how a mark is drawn and where the cursor lands. It adds no input path, command, or parsing of new data. PerformanceNone found. The additions are O(1) per frame, plus one Quality
AGENTS.mdNone found. I checked the no-panic rule (no Not verified: I have no build or test tool here. I could not confirm that Change sizeCompared with main (merge base 4a40b74 to PR head f96f8ae).
|
Fixes #2940
What changed
When a Script run stops at a JSON error whose column is the first character of a wrapped row, the underline, the caret a click on the error sets, and the scroll target now sit on that row (the cursor prefers the next row at the break), not at the end of the row above.
Also, from #2820's "Not in this PR", without a visible change I could reproduce:
script_startedholds aScriptStartstruct instead of a four-field tuple.json_error_columnshares the id split and trimming ofscript_linethroughparameters::script_parts.Reach
Desktop app and browser: the Script pane is the same egui code on both. No new command, parameter, setting or saved data, so the CLI, Python, the Assistant, MCP, plugins and the phone interface are unaffected;
json_error_columnonly feeds the pane's mark. Nothing to undo: it changes how a mark is drawn and where a cursor lands.Testing
a_key_typed_over_a_stop_takes_its_error_click_off_that_framefails without the change (the error was still clickable in the key's frame). The mark is drawn by the same check; it has no assertion of its own.a_stop_at_the_start_of_a_wrapped_row_is_on_that_rowlays out a wrapped line and checks the stop's cursor lands on the second row where a plain one lands on the first.a_scroll_asked_for_a_stop_is_dropped_by_a_key_typed_nextfails without that change (the request stayed set).a_scripts_error_says_where_it_stoppedgains a multibyte case forjson_error_column.checks.sh: fmt, clippy, nextest (9621 passed), doctests, layers and schema check pass.Manual: narrow the Script pane so
layer.rename={"layer":"CCCCCCCCC","n":@}wraps right before the@(adjust theCs to the pane's width), Run, then click the error. Onmainthe caret sits at the end of the first row, after the:; with this change it sits at the start of the second row, on the@.Summary by CodeRabbit