Skip to content

[anneal] Add playground frontend - #3541

Open
platonicsock wants to merge 1 commit into
Gzpgd7p6so5xn3tfstq45vnmycc7weotpfrom
Gbja7ynjo5n4gf6rek56jhkaclymvo22y
Open

[anneal] Add playground frontend#3541
platonicsock wants to merge 1 commit into
Gzpgd7p6so5xn3tfstq45vnmycc7weotpfrom
Gbja7ynjo5n4gf6rek56jhkaclymvo22y

Conversation

@platonicsock

@platonicsock platonicsock commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Latest Update: v12 — Compare vs v11

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v8 v7 v6 v5 v4 v3 v2 v1 Base
v7 v6 v5 v4 v3 v2 v1 Base
v6 v5 v4 v3 v2 v1 Base
v5 v4 v3 v2 v1 Base
v4 v3 v2 v1 Base
v3 v2 v1 Base
v2 v1 Base
v1 Base
⬇️ Download this PR

Branch

git fetch origin refs/heads/Gbja7ynjo5n4gf6rek56jhkaclymvo22y && git checkout -b pr-Gbja7ynjo5n4gf6rek56jhkaclymvo22y FETCH_HEAD

Checkout

git fetch origin refs/heads/Gbja7ynjo5n4gf6rek56jhkaclymvo22y && git checkout FETCH_HEAD

Cherry Pick

git fetch origin refs/heads/Gbja7ynjo5n4gf6rek56jhkaclymvo22y && git cherry-pick FETCH_HEAD

Pull

git pull origin refs/heads/Gbja7ynjo5n4gf6rek56jhkaclymvo22y

Stacked PRs enabled by GHerrit.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@codecov-commenter

codecov-commenter commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.85%. Comparing base (7250609) to head (7624240).

Additional details and impacted files
@@                        Coverage Diff                         @@
##           Gzpgd7p6so5xn3tfstq45vnmycc7weotp    #3541   +/-   ##
==================================================================
  Coverage                              91.85%   91.85%           
==================================================================
  Files                                     20       20           
  Lines                                   6093     6093           
==================================================================
  Hits                                    5597     5597           
  Misses                                   496      496           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@platonicsock
platonicsock force-pushed the Gzpgd7p6so5xn3tfstq45vnmycc7weotp branch from 0bfeaf4 to f10d929 Compare August 11, 2026 15:36
@platonicsock
platonicsock force-pushed the Gbja7ynjo5n4gf6rek56jhkaclymvo22y branch from ec5fa85 to 2794cad Compare August 11, 2026 15:36
@platonicsock
platonicsock force-pushed the Gzpgd7p6so5xn3tfstq45vnmycc7weotp branch from f10d929 to 7250609 Compare August 11, 2026 15:42
@platonicsock
platonicsock force-pushed the Gbja7ynjo5n4gf6rek56jhkaclymvo22y branch 7 times, most recently from 49a987a to 3abbf63 Compare August 11, 2026 18:16
gherrit-pr-id: Gbja7ynjo5n4gf6rek56jhkaclymvo22y
@platonicsock
platonicsock force-pushed the Gbja7ynjo5n4gf6rek56jhkaclymvo22y branch from 3abbf63 to 7624240 Compare August 11, 2026 18:30
@platonicsock

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7624240a23

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +92 to +94
const value = editor.getModel()?.getValue();
if (value) {
onEditCode(value);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate empty Monaco edits

When the Monaco editor is selected and the user deletes all code, getValue() returns "", which fails this truthiness check, so Redux never receives the empty edit. The stored code remains the previous non-empty text, causing Run/Share or a later prop sync to use/restore stale code instead of the empty editor contents; call onEditCode whenever the model exists, including for empty strings.

Useful? React with 👍 / 👎.

Comment on lines +227 to +230
websocketError,
sequenceNumberMatches((state, payload) => {
state.error = payload.error;
}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Finish WebSocket executions on server errors

When an execution sent over WebSocket fails before an wsExecuteEnd response, such as a bad execute request or a coordinator/Docker begin failure, the backend reports it as websocket/error with the request sequence number. This handler only stores the error and leaves requestsInProgress at 1, so the output pane continues to show an active run/stdin state indefinitely; handle this error as a terminal state by clearing the in-progress execution just like wsExecuteEnd.

Useful? React with 👍 / 👎.

Comment on lines +39 to +41
const killed = listenerApi
.delay(gracePeriod)
.then(() => listenerApi.dispatch(wsExecuteKill(undefined, sequenceNumber)));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Cancel the pending kill when long runs are allowed

For WebSocket executions that exceed the CPU-time threshold, choosing “Allow the process to continue” only wins the Promise.race; it does not cancel this delayed promise, so the .then() still dispatches wsExecuteKill after the grace period. This means long-running jobs such as Anneal verification are killed even after the user explicitly allowed them to continue; the scheduled kill needs to be abortable or gated after the allow/end path wins.

Useful? React with 👍 / 👎.

Comment on lines +36 to +38
export const reExecuteWithBacktrace = (): ThunkAction => (dispatch) => {
dispatch(changeBacktrace(Backtrace.Enabled));
dispatch(performExecuteOnly());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Rerun the selected action for backtraces

When the backtrace link appears after anything other than the plain Run action, this handler enables backtraces but then hard-codes performExecuteOnly(). For example, a panicking test run or Anneal verification that asks for RUST_BACKTRACE=1 will be retried as cargo run with a binary crate instead of rerunning tests or cargo anneal verify, often producing an unrelated “main function not found”/normal-run result; dispatch the current primary action after changing the backtrace setting.

Useful? React with 👍 / 👎.

Comment on lines +200 to +204
props.position,
useCallback((editor, _model, { line, column }) => {
editor.setPosition({ lineNumber: line, column });
editor.focus();
}, []),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor text selections in Monaco

The MIR/source-output links dispatch selectText(start, end), and both the simple and Ace editors consume props.selection, but the Monaco editor only reacts to props.position. With Monaco selected, clicking a MIR source span or any future range link updates Redux but never selects the requested range in the editor, so the navigation feature silently fails for that editor mode; add the same props.selection handling here.

Useful? React with 👍 / 👎.

editor,
props.onEditCode,
useCallback((editor, _model, onEditCode) => {
editor.onDidChangeModelContent(() => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Dispose Monaco change listeners

Because Editor passes a fresh onEditCode callback on each render, this effect is re-run after edits and other Redux updates, but the onDidChangeModelContent disposable is never returned. In Monaco mode, each edit accumulates another live listener, so later keystrokes dispatch duplicate editCode actions and repeated storage saves, causing progressively worse input latency; return the disposable/cleanup or stabilize the callback.

Useful? React with 👍 / 👎.

Comment on lines +116 to +118
socket.addEventListener('close', (event) => {
store.dispatch(websocketDisconnected());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge End active runs when the WebSocket closes

If the WebSocket closes while a run is in progress, the backend tears down that session and no wsExecuteEnd will arrive, but this close handler only flips the connection status. The execute slice keeps requestsInProgress set, leaving the loader/stdin UI stuck indefinitely after a network drop or server restart; dispatch a terminal execution error or otherwise clear the active sequence when the transport closes.

Useful? React with 👍 / 👎.

Comment on lines +58 to +59
.addCase(performFormat.rejected, (state) => {
state.requestsInProgress -= 1;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Show rejected format requests

When the format request itself is rejected, such as a network failure, malformed server error response, or /format returning a JSON error, this branch only decrements the counter and discards action.error. Since the format pane then has no stdout/stderr/error to render, the user gets no indication that formatting failed; preserve the rejection message in state like the execute/gist paths do.

Useful? React with 👍 / 👎.

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.

2 participants