Skip to content

Fix "Show Traceback" link not changing to "Hide Traceback" - #19669

Merged
gtritchie merged 7 commits into
mainfrom
bugfix/hide-traceback-label
Nov 17, 2026
Merged

gtritchie merged 7 commits into
mainfrom
bugfix/hide-traceback-label

Conversation

@gtritchie

Copy link
Copy Markdown
Member

Fixes #19645.

ConsoleError.setTracebackVisible() only looked at the error box's direct children. That reached the traceback but not the label, which sits inside the commands panel. The traceback showed and hid, but the link always said "Show Traceback", including when auto_expand_error_tracebacks opened the traceback up front.

setTracebackVisible() now updates the showTracebackText and framePanel UiBinder fields directly. The DOM walk had been added for the virtual scroller, which #16105 removed.

Also in this PR:

  • Both links ("Show Traceback" and "Rerun with Debug") get their initial text from StudioClientCommonConstants instead of English hard-coded in ConsoleError.ui.xml. Without this, the French UI would show "Show Traceback" until the first click and then switch to French.
  • New translation string rerunWithDebugText, with French "Ré-exécuter en mode débogage".

Tests: console_pane.test.ts now checks that the label toggles in both directions, and adds a case for the auto-expanded traceback. The French labels were checked manually against a desktop dev build.

setTracebackVisible() only scanned the error box's direct children, so
it never reached the label nested inside the commands panel. Search the
subtree for both the label and the stack trace instead.

Addresses #19645.
The DOM walk existed for the virtual scroller, removed in #16105. A
subtree query could match a nested ConsoleError's elements, as when a
chunk's errorEl is an earlier error widget; the fields cannot.

Addresses #19645.
The label started as hard-coded English in the UiBinder template and
switched to the translated text on first toggle (e.g. French).

Addresses #19645.
The label was hard-coded English in the UiBinder template. It now comes
from StudioClientCommonConstants, with a French translation.

Addresses #19645.
@gtritchie gtritchie added this to the 2026.12 (Parrot Balsam) milestone Nov 17, 2026
@gtritchie
gtritchie requested a review from kevinushey November 17, 2026 18:11
@gtritchie

Copy link
Copy Markdown
Member Author

Code review findings not addressed in this PR:

Every roborev review of this branch passed.

@kevinushey kevinushey left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Agree with both deferrals -- aria-expanded on an href-less <a> would be an ARIA violation on its own, and the shared locators fail loudly under strict mode rather than passing on the wrong box.

Nit: the comment at ConsoleError.java:58-59 about VirtualScroller bindings being lost is stale now that the DOM walk is gone and setTracebackVisible() uses the UiFields -- worth dropping.

The comment described the DOM walk that setTracebackVisible() no longer
uses. Note instead why clicks are handled by a listener on the root.

Addresses #19645.
@github-actions

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
5680 0 256 3
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 4 0 16 0
✅ desktop-linux 1425 0 46 0
✅ desktop-macos 1419 0 51 2
✅ desktop-windows 1419 0 57 1
✅ server-linux 1365 0 54 0
✅ setup 48 0 32 0

View report online


All platforms - commit effa00a4b928eda12ef95dd792ad9a900f7dd685 - Run #2326

@gtritchie
gtritchie merged commit c546b3d into main Nov 17, 2026
45 checks passed
@gtritchie
gtritchie deleted the bugfix/hide-traceback-label branch November 17, 2026 20:24
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.

Console error "Show Traceback" link does not change to "Hide Traceback"

2 participants