Skip to content

ui: {"env": "widthClass"} is never set, so no screen can reach a compact layout #1046

Open

Description

@Yaraslaut

Summary

{"env": "widthClass"} is documented as the window's width class (compact < 600, medium < 1200, expanded), but nothing ever sets it, so a document cannot reach a compact layout through it.

  • Session::setEnvironment holds the value (include/morph/ui/interpreter.hpp:962), but nothing calls it: grep -rn setEnvironment include src finds only that definition.
  • The Qt Quick frontend computes the class and hands it to FrontendConfig::onWidthClass, whose documentation says "The shell sets it as {"env": "widthClass"}" (include/morph/qt_quick/frontend.hpp:50-52, docs/spec/qt_quick/backend.md:44-45).
  • morph::client::ShellOptions (include/morph/client/shell.hpp:131-157) has no way to reach the mounted session's environment, and the generic client passes .onWidthClass = {} (examples/client/main.cpp:234).
  • The testkit's ScreenHarness and render smoke can't set it either.

Verification status

  • Read in the code at master 842701f0d, by grep. That the value reads null at run time is inferred, not observed.
  • Found by the LIMS gallery (LIMS gallery: ten LIMS screens in ui/1, and the declarative UI gaps they expose #1045). Every one of its screens has a compact layout, and none of them can reach it from the window width. The gallery works around this with a screen parameter.
  • Not checked: the terminal frontend, which has no width class at all.

What would change the verdict

Close when a screen mounted by morph::client under Qt Quick reads env.widthClass as compact in a window narrower than 600 px, and follows a resize across the boundary. A test that resizes the window should show it. Reopen if the terminal frontend is expected to report a class and doesn't.

Activity

  1. added a commit that references this issue on Oct 25, 2026
    8613655
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: coreSubsystem: corearea: qtSubsystem: qtbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions