Skip to content

Replace deprecated Quake console launch rule with a workspace event - #16979

Closed
ekollof wants to merge 2 commits into
omacom:quattrofrom
ekollof:fix/qconsole-workspace-created
Closed

ekollof wants to merge 2 commits into
omacom:quattrofrom
ekollof:fix/qconsole-workspace-created

Conversation

@ekollof

@ekollof ekollof commented Oct 29, 2026

Copy link
Copy Markdown

Hyprland 0.57 reports an on_created_empty deprecation through hyprctl deprecated-config whenever the Quake console's workspace rule is registered. Refitting the console repeats the warning.

Seed the console from workspace.created instead, checking that the workspace is special:qconsole and empty before launching the default agent. Keep the explicit workspace pin, lazy launch and recreation behavior; geometry changes no longer register a launch rule.

Validation: the existing hyprland-qconsole-test.sh suite passes with coverage for unrelated workspaces, populated consoles, empty-console creation/recreation and refitting without another launch. The updated regression fails against the original implementation. Lua syntax and git diff --check pass. Hyprland 0.57 --verify-config accepts the console module with its required animation curve. No live console launch or full dev-sync run was performed; the running checkout is unchanged.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no blocking issues were found.

Summary

The PR replaces the deprecated console launch rule with a workspace.created handler.

  • The empty Quake console starts its agent from a workspace event.

Reviews (2) · Last reviewed commit: "Guard missing workspace in console creat..." · Reviewed by Greptile

@robertcgonzalez robertcgonzalez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verified this on a live Hyprland 0.57.0 session (the same version that started reporting the deprecation), since the automated review noted no tests or console launch were run. Three independent checks:

Reproduced the regression coverage. test/shell.d/hyprland-qconsole-test.sh passes on the PR (exit 0) and fails against the pre-PR qconsole.lua (exit 1, attempt to call a nil value (field 'workspace.created')). The test is genuine, not tautological.

Confirmed the deprecation actually clears. On the unpatched install, hyprctl deprecated-config reports the on_created_empty notice twice — once at config load and again on the console's first refit, because cover() re-registers the rule whenever the monitor, layout or window count changes. With this change applied, it reports all good! and stays clear across hyprctl reload plus repeated refits. hyprctl configerrors is empty either way.

Confirmed the live launch path works. Loaded the PR's handler into the running session and opened the console: the spawned window lands on special:qconsole, not on whatever workspace was focused. Worth recording why it does, because it is easy to break: hl.exec_cmd parses the seed's [workspace special:qconsole silent] prefix as an exec rule, but hl.dsp.exec_raw silently drops a bracketed prefix and would land the window on the focused workspace instead. Anyone refactoring the seed to exec_raw (or to exec_cmd with a rules table) will lose the pin without any error.

Two smaller notes:

  • Reopening an already-populated console does not re-fire workspace.created, only an empty one does, so the seed cannot multiply windows. Handlers also do not accumulate across hyprctl reload — one open after four reloads fires the handler once.
  • The is_empty guard is load-bearing for exactly the refit path this bug came from. Dropping it would spawn an agent on every geometry change.

Not blocking; this is a straight improvement over the current default. Approved from the testing side — no code changes requested.

@scottjones

Copy link
Copy Markdown
Contributor

Tested this live on Hyprland 0.57.0 (aarch64): deprecated-config goes from 2 warnings to "all good!", Super+Grave seeds the default agent into the console as the centered panel, and closing the agent then reopening the console seeds exactly one new agent. Also confirmed hl.exec_cmd still honors the [workspace special:… silent] prefix in Lua, so the pin works.

Small nit: the other workspace.created handler (monitor-workspaces.lua) guards with if workspace and …, and it might be worth matching here.

@ekollof

ekollof commented Oct 30, 2026

Copy link
Copy Markdown
Author

Thanks for testing this on aarch64 and confirming the workspace pin and recreation behavior. Added the suggested workspace nil guard in 56f28be to match the other creation handler, and extended the existing console fixture to invoke the callback with a missing workspace. The console suite, Lua syntax check and whitespace checks pass.

@ekollof

ekollof commented Oct 30, 2026

Copy link
Copy Markdown
Author

Superseded by #17077, now merged. It implements the same workspace.created migration, empty-console check and nil guard, with workspace placement passed through the explicit exec_cmd rules table. No distinct production fix remains in this PR. Closing to avoid duplicating the upstream change in integration builds.

@ekollof ekollof closed this Oct 30, 2026
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.

3 participants