Skip to content

Exercise description never loads in the fullscreen exercise view #358

Description

@Predixx

Summary

Opening an exercise in fullscreen (the expand icon in the sidebar exercise view, which opens a full editor tab Exercise: <title>) never loads the Exercise Description. It stays on the skeleton loader and, after the internal 10s timeout (e.g. after a window reload), shows Failed to load the exercise description. The server may be unavailable. The sidebar exercise view renders the same description without any problem.

Steps to reproduce

  1. Open an exercise in the sidebar exercise-detail view (description renders fine).
  2. Click the expand / fullscreen icon to open it as a full editor tab.
  3. Look at the "Exercise Description" section.

Expected

The description renders in fullscreen exactly as it does in the sidebar.

Actual

  • Right after opening: the "Exercise Description" section sits on the skeleton placeholders and never resolves.
  • After ~10s / a window reload: it flips to Failed to load the exercise description. The server may be unavailable.
  • Everything else on the page (title, repository status, test results, Ask Iris, developer tools) renders correctly.

Root cause (investigated)

The problem statement is server-side rendered (SSR, introduced in #146). The SSR pipeline is bound entirely to the sidebar provider:

  • WebviewSSRCoordinator (extension/src/extension/provider/webviewSSRCoordinator.ts) posts the rendered HTML via the sidebar's transport (ProblemStatementRendered) and its scheduleRender() / refreshFromServer() only run while appStateManager.currentState === 'exercise-detail', targeting the sidebar webview.
  • The sidebar init (viewInitDataService.sendExerciseDetailInit, lines ~213/224/234) also includes serverRenderedProblemStatement in the ExerciseDetailInit message.

The fullscreen panel is an independent WebviewPanel (fullscreenPanelManager.openExerciseFullscreen, line 26). Its ExerciseDetailInit (lines 46-66) posts only the raw exerciseData. It does not:

  • include serverRenderedProblemStatement in the init, and
  • have any SSR coordinator / render trigger bound to its own transport, so no ProblemStatementRendered message ever reaches it.

Consequently the panel's ProblemStatement component (extension/src/webview/views/ExerciseDetail/components/ProblemStatement.tsx) never receives serverRenderedHtml, keeps bodyHtml undefined (skeleton), and after SSR_TIMEOUT_MS = 10_000 shows the "Failed to load" branch. The client-side markdown fallback was removed when the PS moved to SSR, so the panel has no alternative render path.

Fix direction (not decided)

Give the fullscreen panel the SSR result. Options:

  • Forward the already-cached appStateManager.serverRenderedProblemStatement in the fullscreen ExerciseDetailInit (covers the common case where the sidebar already rendered it), and/or
  • Trigger an SSR render bound to the panel's transport when the panel opens, and forward later ProblemStatementRendered refreshes (e.g. after a new build result) to the panel as well.

Relevant files

  • extension/src/extension/services/ui/fullscreenPanelManager.ts:26 (openExerciseFullscreen: init without SSR)
  • extension/src/extension/provider/webviewSSRCoordinator.ts (SSR bound to the sidebar)
  • extension/src/extension/services/ui/viewInitDataService.ts:182 (sidebar init that does include the SSR result)
  • extension/src/webview/views/ExerciseDetail/components/ProblemStatement.tsx (skeleton -> 10s timeout -> "Failed to load")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions