Skip to content

Browser wizard: a step renderer that throws leaves an empty step with no message #955

Open

Description

@cemililik

Found while verifying #954. #879 was one instance of a wider gap: render() in site/js/wizard.js calls the step renderer without a guard, so when a renderer throws, the exception leaves render() before it updates the step counter, the Previous/Next buttons, the detail toggle and the YAML preview, and before it saves the state. The step stays empty and the operator sees no message; only the browser console shows the error.

What happens

  1. Make any step renderer throw (in Browser wizard: the Compliance step throws ReferenceError (appendDetail is not in scope), so risk-assessment, benchmark and judge controls never render (F-W1-SITE-01) #879 the Compliance renderer called an undefined helper).
  2. Open that step: the pane is blank, the counter and buttons still describe the previous step, and nothing tells the operator what went wrong.

Acceptance criteria

  • When a step renderer throws, the pane shows a short message saying the step could not be shown, the error is logged with console.error, and the counter, buttons, detail toggle and YAML preview still describe the current step, so the operator can go back or close the dialog.
  • The message is translated in English and Turkish; the deferred locales fall back to English as other new keys do, and the locale fallback test lists the key.
  • A controller test under tests/site/ makes a renderer throw and checks the message and the step chrome. The existing render tests still fail when a real renderer throws: the boundary must not turn a broken step into a passing test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: siteCode area: sitebugSomething isn't workingseverity: lowMinor defect, inaccuracy or rough edge

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions