Skip to content

config-profiles: reorder profiles and reset to when applied - #4385

Open
Conava wants to merge 5 commits into
duxlabs-dev:masterfrom
Conava:profile-reorder-reset
Open

Conava wants to merge 5 commits into
duxlabs-dev:masterfrom
Conava:profile-reorder-reset

Conversation

@Conava

@Conava Conava commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

This adds two things to config profiles: changing their order and resetting the active profile to how it was when it was applied.

Profiles can be dragged to a new place in the profile grid (on the Profiles page and in the profiles card in Wallpaper & colors), or moved with Ctrl+Left/Right on a focused card. In the one-column layout of a narrow Settings window these become Move up and Move down. The order is used everywhere profiles are listed: next and previous profile, the Control Center tile, IPC list and dms profile list. Until now the order was the creation date, which matters more once profiles are switched with a keybind. There is also a new IPC call to move a profile: dms ipc call config-profile move <profile> <position>.

Reset to when applied is in the right-click menu of the active profile and is enabled once something in the profile's groups changed. It puts those settings back to how they were when the profile was applied, also after a restart. With sync on the profile file gets the old values again, with sync off it stays untouched. I mostly wanted this as an undo for sync, because with sync on a quick experiment overwrites the profile a few seconds later.

This is the first of three PRs for profiles, a profile picker on a keybind and a transition when switching profiles follow.

Notes

The drag grid is a new grid mode of DReorderList in dux-qml-common (duxlabs-dev/dux-qml-common/pull/62 merged so this one is ready to be merged).

The order is one list of profile ids in session.json, so it isn't part of any profile, export or import. Imported and new profiles are added at the end.

1 new term to translate: Reset to when applied.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Screenshots / video

recording_2026-11-22_17-51-16.mp4

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dux-docs to document any new behaviors: docs(dms): document reordering profiles and reset to when applied dux-docs#222

Profiles were always listed by creation date. They can now be dragged
to a new place in the Settings profile grids (a new grid mode of
dux-qml-common's DReorderList), moved with Move left/right in the card
menu or Ctrl+arrows (up/down in the one-column layout), and moved over
IPC with `config-profile move <profile> <position>`. The order is one
list of ids in session.json, so profiles, exports and imports don't
carry it; profiles missing from it follow by creation date. Next/prev,
the Control Center tile, IPC list and `dms profile list` follow it.

Reset to when applied restores the active profile's groups to the
values they had when it was applied. The snapshot is written to the
cache dir, read back with the same checks as a profile file and
migrated like one, so it survives restarts. With sync on the restored
values are saved into the profile; with sync off the file is left
alone.
@github-actions github-actions Bot added core Go daemon and CLI under core/ feature ui Quickshell UI under quickshell/ labels Nov 22, 2026
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found. As the description says, dux-qml-common still points at the commit from duxlabs-dev/dux-qml-common#62 and has to be re-pinned before merge.
Checked: Go List order vs the QML _refresh order (session ids first with duplicates and non-strings dropped, the rest by created then id), the setOrder/moveProfile/IPC move clamping, how the snapshot is read, migrated, kept and written for sync on and off and across restarts, resetToApplied sync and _applying handling, the DReorderList grid API used by ProfileGrid/ProfileCard (begin/dragTo/finish/cancel/move/layout), relayout and cancel while dragging, RTL key direction, Theme tokens, I18n terms, deprecated shims and the SESSION_MAP entry. Model: claude-opus-5-5.

@Conava Conava mentioned this pull request Nov 22, 2026
6 of 12 tasks
@bbedward

Copy link
Copy Markdown
Member

Please rebase

…eset

# Conflicts:
#	dux-qml-common
#	quickshell/Common/settings/ConfigProfiles.js
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found. The upstream merge resolved cleanly. The dux-qml-common pin (8ed9e0d) is the head of duxlabs-dev/dux-qml-common#62 and merges master's 73bd713, so nothing on master is rolled back. It still needs re-pinning once that PR lands.
Checked: the merge result against master for ConfigProfileService, SessionData/SessionSpec, the ConfigProfiles.js never-lists (configProfileOrder kept alongside master's deviceBalances/wallpaperHideMismatched/configProfilePickerView), the new profile picker from master (it reads ConfigProfileService.profiles, so it follows the saved order; it does not use ProfileCard, so the new required properties don't affect it), the Go List order against the QML _refresh order, the setOrder/moveProfile/IPC move clamping, the snapshot and resetToApplied sync handling, and the DReorderList grid use in ProfileGrid/ProfileCard. Model: claude-opus-5-5.

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found. The latest upstream merge moved dux-qml-common to master's 440a066, which already has the DReorderList grid mode from duxlabs-dev/dux-qml-common#62, so the re-pin noted in earlier reviews is done.
Checked: the merge result against master (ConfigProfiles.js never-list, SessionData/SessionSpec, the submodule pin), the DReorderList API on 440a066 used by ProfileGrid/ProfileCard (begin/dragTo/finish/cancel/move/layout/animateLayout/dragStarted/focusHandle, DCard.focusTarget), the Ctrl+arrow direction in LTR/RTL and one-column layouts, the Go List order against the QML _refresh order, setOrder/moveProfile/IPC move clamping, and snapshot/resetToApplied sync handling. Model: claude-opus-5-5.

…eset

# Conflicts:
#	quickshell/Services/ConfigProfileService.qml
#	quickshell/tests/config-profile-service.test.mjs
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found. The latest upstream merge brings in the profile switch transition (_request/_run/applySwitch/endSwitch) and the PR code still fits it.
Checked: the merged ConfigProfileService (resetToApplied holding _applying and stopping syncTimer next to the new _run; cycle/_newest using the saved profiles order; the snapshot following activeProfileId after a deferred switch), the ConfigProfiles.js never-list and SessionSpec/SessionData entries for configProfileOrder after the merge, the ProfilePicker following the saved order, ProfileCard having ProfileGrid as its only user, the Go List order against the QML _refresh order, the setOrder/moveProfile/IPC move clamping, the DReorderList grid use, I18n terms and deprecated shims. The IPC move docs are in duxlabs-dev/dux-docs#222. Model: claude-opus-5-5.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Go daemon and CLI under core/ feature ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants