Skip to content

Editor UI tweaks: run feedback, panel strip redesign, self-view panels, persistence - #25

Merged
victor-hugo-dc merged 10 commits into
mainfrom
ui-tweaks
Jul 16, 2026
Merged

Editor UI tweaks: run feedback, panel strip redesign, self-view panels, persistence#25
victor-hugo-dc merged 10 commits into
mainfrom
ui-tweaks

Conversation

@ChrisMayfield

Copy link
Copy Markdown
Member

Summary

A set of editor UI polish items, mostly around the AddPanelStrip and run/console feedback:

  • Run feedback: clear the console immediately on Run/F5 (with a short delay before re-running) so re-running identical code gives a visible cue, and the "Run code to see execution results..." placeholder now only shows before the very first run instead of reappearing on every re-run.
  • AddPanelStrip redesign: replaced the "+" dropdown with 7 always-visible language toggle buttons (styled like the existing AI Assistant toggle), moved the Memory Diagram toggle out of Settings and onto the strip as a 9th button, and moved the whole strip to the left side of the editor.
  • Self-view panels: the button for the current source language is no longer disabled — toggling it now opens a panel showing the same code re-emitted through that language's own emitter (canonical/"linted" formatting). Panels stay open across a source-language switch instead of being force-closed.
  • Icon consistency: corrected the Java logo's colors (previously too dark to read) and replaced CSP's hotlinked/low-contrast stock photo with a proper acorn icon (the College Board AP Program mark), removing an external image dependency.
  • Tooltips: simplified AddPanelStrip tooltips to just the panel name (dropped "Open"/"Close"/"View" wording and the "(MemDia)" suffix).
  • Persistence: source code, language, and which AddPanelStrip toggles are open now persist to localStorage and restore on reload/return visit (deferring to ?code= embed links when present).
  • Also includes a small sampleCodes.ts cleanup (removed duplicate examples, added trailing newlines).

Test plan

  • npx tsc --noEmit passes
  • npm run test:run passes (515 tests)
  • Manually verified in a headless browser: run-twice console clearing, all 9 strip toggles (including self-view panel open/close and persistence across a source-language switch), tooltip text, icon contrast/legibility, and localStorage restore across reload and embed-link precedence

🤖 Generated with Claude Code

ChrisMayfield and others added 10 commits July 15, 2026 11:52
Running the same program twice gave no visual signal that it reran.
Blank the output immediately, then run after a 100ms delay so the
clear is visible before new output appears.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace the "+" dropdown with 7 always-visible toggle buttons matching
the Open AI Assistant button's on/off style, so opening a language view
is a single click instead of open-menu-then-click.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Memory Diagram was buried in the Settings dropdown, separate from the
other panel toggles. Move it to the panel strip as a 9th toggle button,
after a divider, alongside the Open AI Assistant button.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…alStorage

Reloading (or returning later) lost all editor state. Save code,
source language, and the AddPanelStrip toggle state (open language
views, AI Assistant, MemDia) to localStorage on a short debounce, and
restore on mount. Skipped when opened via an embed link (?code=...),
since that's an explicit one-off share rather than a session to save
or overwrite.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…hat storage key

- Suppress the "Run code to see execution results..." placeholder after
  the first run instead of showing it every time output is cleared.
- Move AddPanelStrip to the left side of the editor.
- Rename showAiSidePanel to showAiChat in the persisted editor state.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Java's cup was too muted to read against the dark UI; brighten it to
proper Java blue/red. Replace CSP's hotlinked (and equally muted)
raster photo with a hand-drawn acorn — the actual College Board AP
Program mark — rendered in the theme color, removing the external
image dependency.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Drop "Open"/"Close"/"view" wording and the "(MemDia)" suffix — each
tooltip is now just the panel's name.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Opening a panel for the language already shown in the source pane now
works instead of being disabled — it shows the same program re-emitted
through that language's own emitter, i.e. canonical/"linted"
formatting, useful for showing how a formatter would clean up the
source. Switching the source language no longer closes matching
panels, so a self-view panel simply becomes (or stops being) a normal
cross-language translation panel as the source language changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@victor-hugo-dc
victor-hugo-dc merged commit 51efeff into main Jul 16, 2026
1 check passed
@victor-hugo-dc
victor-hugo-dc deleted the ui-tweaks branch July 16, 2026 15:10
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