Skip to content

feat(log-viewer): say what each debug level adds in the header dropdowns - #1198

Open
lukecotter wants to merge 7 commits into
certinia:mainfrom
lukecotter:feat-level-dropdown-descriptions
Open

lukecotter wants to merge 7 commits into
certinia:mainfrom
lukecotter:feat-level-dropdown-descriptions

Conversation

@lukecotter

@lukecotter lukecotter commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

📝 PR Overview

Each debug level in the header dropdowns now says what it adds to the log, e.g. APEX_CODE FINE says Methods. Before, a user had to know the Salesforce event table to pick a level.

🛠️ Changes made

  • The highlighted level shows what it adds at the foot of the dropdown.
  • A level that adds nothing, e.g. DB ERROR, shows no text.
  • Long text wraps to the dropdown width.
  • The labels follow the level the parser gives each event, which is the level the filter hides by. A test fails when the labelled levels and the parser's levels differ. Begin and end lines count as one event.
  • In every dropdown, the highlight follows the pointer over an option's text, and a disabled option ignores hover. Before, hovering a level the log was not captured at showed its text, and Enter picked it.
  • A screen reader reads each option's description.

🧩 Type of change (check all applicable)

  • 🐛 Bug fix - something not working as expected
  • ✨ New feature – adds new functionality
  • ♻️ Refactor - internal changes with no user impact
  • ⚡ Performance Improvement
  • 📝 Documentation - README or documentation site changes
  • 🔧 Chore - dev tooling, CI, config
  • 💥 Breaking change

📷 Screenshots / gifs / video [optional]

APEX_CODE FINE says Methods

A long label wraps to the dropdown width

Dark theme:

APEX_CODE FINE says Methods, dark theme

A long label wraps to the dropdown width, dark theme

🔗 Related Issues

relates to #530

✅ Tests added?

  • 👍 yes
  • 🙅 no, not needed
  • 🙋 no, I need help

📚 Docs updated?

  • 🔖 README.md
  • 🔖 CHANGELOG.md
  • 📖 help site
  • 🧪 Marked any pre-release-only features (README 🧪 badge — see RELEASING.md)
  • 🙅 not needed

Anything else we need to know? [optional]

Done before review:

  • Bump to the new parser and check that its event levels match these labels. main is on parser 0.5.0. Ten levels with events had no label, and now have one.
  • Data Access: parser 0.5.0 gives DATA_ACCESS_EVALUATION and POLICY_RULE_* the DATA_ACCESS category, at FINE and FINER.
  • VF_APEX_CALL_START: the filter hides by the parser's level, VISUALFORCE FINE, so the label follows the parser: Apex calls.
  • LIMIT_USAGE_FOR_NS: Governor limits at INFO still holds. The parser puts the line at APEX_PROFILING FINEST, but real logs write it inside the INFO limit block, so FINEST now says Per-statement limit usage, referenced objects. The parser's level for this line is a separate issue.
  • Add a test that holds the labels table to the parser's event levels.
  • Check a dropdown in a dark theme. Checked in VS Code Web, light and dark.

The labels came from the Salesforce event table, but the level filter
hides events by the level the parser gives them. Ten levels with events
had no label, among them APEX_CODE WARN and every WAVE level.

Add the ten labels, and a test that fails when the labelled levels and
the parser's levels differ, or a label is empty. The dropdown test now
checks which levels are described, not their wording, plus the
APEX_CODE FINE example.
APEX_PROFILING FINEST said 'Limit usage', which read as if a log needs
FINEST to show limit usage. An INFO log already shows it in the
governor limits block. FINE said 'variables', the word APEX_CODE FINEST
uses for variable assignments.

FINEST now names per-statement limit usage and referenced objects, and
FINE names variable lists.
The base select moves the highlight only when the row itself is the
event target, and the row's text spans covered most of it, so the
highlight moved only at a row's edge. A disabled row, such as a level
the log was not captured at, became active on hover with no highlight:
the dropdown foot showed its description, and Enter picked it.

The text spans now pass the pointer to the row, and a disabled row is
ignored.
The dropdown draws the active option's description as plain text at
its foot, which a screen reader does not announce. Each option row now
carries its description as aria-description.
Log levels shipped in 1.24.0, so the level descriptions get a new entry
under Unreleased. The highlight and Enter fixes are bugs users of 1.24
can hit.
@lukecotter
lukecotter marked this pull request as ready for review November 28, 2026 01:37

This branch has not been deployed

No deployments
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