Skip to content

fix(renderer): print quotes, Save As recipe binding, tour console - #255

Merged
johnny4young merged 6 commits into
mainfrom
fix/renderer-review-followups
Oct 15, 2026
Merged

johnny4young merged 6 commits into
mainfrom
fix/renderer-review-followups

Conversation

@johnny4young

Copy link
Copy Markdown
Owner

Summary

Three renderer follow-ups from the October review:

  1. Python print showed repr quotes. print("sum =", 55) appeared in the console as 'sum =' 55: the print hook serialized each argument with the scratchpad value serializer, which uses repr. Top-level string arguments now become primitive string payloads holding the printed text (no Details chip, same as before), while strings inside containers keep repr, matching print. The captured text was already correct.
  2. Language-changing Save As left a recipe bound. A binding made while the write was in flight was dropped from the tab by withLiveTabState, but the recipe store kept it. saveTab now detects a dropped live binding and unbinds it.
  3. Interrupted tour start opened the console anyway. startTour opened the bottom console before awaiting editor readiness. It now opens in the branch that activates step one; the console step still calls ensureConsoleVisible.

Validation

  • New/extended tests, each failing without its fix:
    • tests/workers/pythonPrintPayloads.test.ts: runs the real bootstrap under CPython; skipped if python3 is absent.
    • Cross-language Save As case in editorSaveInputRetention.test.ts.
    • Interrupted-start assertions in GuidedTourFocus.test.tsx.
  • Full suite 9314 passed; tsc --noEmit, typecheck:tests, lint, check:i18n, check:i18n:copy, changelog:check green.
  • Live (production build:web + preview:web, Playwright):
    • a Python Run printing "sum =", 55 and ["a"], "b" shows sum = 55 and ['a'] b (the list keeps its Details chip);
    • a fresh start shows the tour with the bottom panel open;
    • Spanish pass (suma = 55, Spanish tour copy);
    • zero console errors in both.
  • The Save As and interrupted-tour paths are covered by tests only: the first needs a native save dialog and a mid-write binding, the second an overlay opening during the editor-readiness wait.

- The print hook serialized each argument with the scratchpad value serializer, which uses repr, so print("sum =", 55) appeared in the console as 'sum =' 55.
- Top-level string arguments are now primitive string payloads holding the printed text; strings nested in containers keep repr, as print itself does.
- Run the real bootstrap under CPython in a new test of both cases.

Changelog: none
- A recipe bound while a language-changing Save As was writing was dropped from the tab by the live-state merge but stayed in the recipe store.
- Track whether the merge dropped a live binding and unbind it alongside the existing original-binding case.

Changelog: none
- startTour opened the bottom console before awaiting editor readiness, so a start interrupted by another dialog still changed the layout.
- Open it in the same branch that activates the first step; the empty-workspace sample tab is still created up front because the tour waits for an editor.

Changelog: none
- The website tour spec told the console row from the inline pill by the repr quote that print used to add; printed strings now match print, so scope the assertion to the console row instead.

Changelog: none
@johnny4young
johnny4young merged commit 71db6cc into main Oct 15, 2026
24 of 25 checks passed
@johnny4young
johnny4young deleted the fix/renderer-review-followups branch October 15, 2026 04:28
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.

1 participant