Skip to content

feat(osd): add workspace switch OSD for niri (#1756) - #3337

Merged
purian23 merged 3 commits into
duxlabs-dev:masterfrom
hthienloc:feat/niri-workspace-osd
Sep 6, 2026
Merged

purian23 merged 3 commits into
duxlabs-dev:masterfrom
hthienloc:feat/niri-workspace-osd

Conversation

@hthienloc

@hthienloc hthienloc commented Sep 6, 2026 •

Copy link
Copy Markdown
Member

Ref #1756

recording_2026-09-06_11-24-40.mp4

@hthienloc

Copy link
Copy Markdown
Member Author

/claude review

Comment thread quickshell/Modules/OSD/WorkspaceOSD.qml Resolved
Comment thread quickshell/Modules/OSD/WorkspaceOSD.qml Resolved
Comment thread quickshell/Modules/Settings/OSDTab.qml Resolved
@claude

claude Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Claude review

Solid, mirrors the existing OSD patterns; one real state-tracking bug plus two small cleanups.

  • Overview guard runs before lastActiveWorkspaceId is updated, so a workspace switched inside the niri overview leaves stale state and swallows the next OSD, quickshell/Modules/OSD/WorkspaceOSD.qml:68
  • New user-facing strings lack translator context, quickshell/Modules/OSD/WorkspaceOSD.qml:43
  • Stray no-op visible: true on the SettingsCard, quickshell/Modules/Settings/OSDTab.qml:25

Checked: NiriService signal emission and workspace map ordering, per-screen output filtering and init, DankOSD/Variants wiring in DMSShell, settings spec + search index entry (matches the generator conditionKey), imports and i18n rules. Model: claude-opus-5.

@hthienloc

Copy link
Copy Markdown
Member Author

/claude review

@claude

claude Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.

Previous run's three findings are all resolved: the overview guard now updates lastActiveWorkspaceId before deciding whether to show, the new strings carry translator context, and the visible: true on the SettingsCard is justified — I confirmed extract_property() regex-scans the whole card block, so without it the osd card entry would inherit the child row's isNiri conditionKey (the committed index has osd with no conditionKey and osdWorkspaceEnabled with isNiri, which is correct).

Checked: NiriService workspaceActivated emission order relative to setWorkspaces/updateCurrentOutputWorkspaces, per-output filtering and first-run init, inOverview gating (event-driven, no stale state), Variants gating so nothing is instantiated when disabled or off-niri, DankOSD contract (content, show(), screen/modelData, screenWidth), SettingsData/SettingsSpec default parity, generated search-index entry (ordering, keywords, and conditionKey all match what the extractor produces), i18n rules (en.json/template.json untouched, term freeze inactive, no near-variant term collisions). Model: claude-opus-5.

@purian23

purian23 commented Sep 6, 2026

Copy link
Copy Markdown
Member

Cool feature! One thing I'd like to see is full parity support for all 3 first party compositors. Niri, Hyprland and Mango. Doing it initially is much easier than back-porting later on when someone notices it's on one, but not the other.

Niri will naturally have that bit of extra as our comp of choice, but for the most part keeping each in mind as we go is less work in the future. Totally understandable if you don't have each of them installed, we can get these added after the merge, but again, this is mostly for awareness.

@hthienloc

Copy link
Copy Markdown
Member Author

I've never used Mango or Hyprland before, so I can't test them as thoroughly as I can with Niri. I'd prefer someone with experience using those two compositors to handle the backporting and make sure everything works as expected.

@purian23
purian23 merged commit f3d9d73 into duxlabs-dev:master Sep 6, 2026
1 check passed
@hthienloc
hthienloc deleted the feat/niri-workspace-osd branch November 15, 2026 15:38
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.

2 participants