Repository navigation
Conversation
The Workspaces scope only exposes raw window handles per workspace (DesktopWorkspace.windows), while AppIcon() requires an exe path or umid, so plugins cannot render per-workspace application icons. - add a `Windows` scope injecting the full UserAppWindow[] from GetUserAppWindows (same LazyScope pattern as the other scopes; the toolbar already tracks this data internally for overlap detection) - add bundled `@default/workspaces-icons` toolbar module: workspaces as pills with up to 5 real app icons each (joined by hwnd), window titles in the tooltip, dotted-style fallback for empty workspaces, click-to-switch preserved - document the new scope Screenshots and a sandbox-level simulation of the module template are described in the PR.
[Medium impact] The changes extend plugin data access and add a toolbar workspace option. Satisfy the repository's theme and translation requirements before merging. SummaryAdds a shared
Reviews (1) · Last reviewed commit: "feat(toolbar): add Windows plugin scope ..." · Reviewed by Greptile |
| if (isActive) { | ||
| pillStyle.backgroundColor = "color-mix(in srgb, var(--system-accent-color) 22%, transparent)"; | ||
| pillStyle.boxShadow = "0 0 0 1.5px var(--system-accent-color)"; |
There was a problem hiding this comment.
Plugin breaks theme and translation rules
The new module violates requirements in AGENTS.md:
- Widget visuals must live in the default theme. Move the pill decoration out of the template and replace the 22% color mix with
--slu-std-ui-selected-overlay. - User-facing text must use i18n. Localize
Workspaceandmorein the tooltips. - Only English translation entries may be edited directly. Leave the non-English entries in
display_name.ymlto the translation workflow.
These repository requirements must be satisfied before merging.
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
…ions Review feedback on this PR: - move static pill styling out of the template into the default theme (themes/default/styles/fancy-toolbar.scss, scoped by data-plugin-id); templates now carry state styles only (selected overlay token, dotted fallback for empty workspaces) - replace the ad-hoc `color-mix(... 22%, transparent)` with the `--slu-std-ui-selected-overlay` token and drop the decorative box-shadow ring - localize user-facing strings (`Workspace`, `+N more`) through `t()` with new `workspaces_icons` keys in the toolbar en.yml - keep display_name.yml to its `en` entry; other locales belong to the translation workflow
|
Thanks for the review @greptile-apps — all three points are addressed in 8cc6756:
Verified with a sandbox-level simulation of the template (20 assertions: scope join, caps, tokens, i18n fallbacks), the repo test suite, and the full |
|
Perfect! All three concerns are now fully addressed: ✅ Theme rule: The static pill styling is properly extracted to ✅ i18n: User-facing strings now use ✅ Translations: The implementation looks solid. The scope addition follows the established Tip: You can customize Greptile's behavior for this repo with |
eythaann
left a comment
There was a problem hiding this comment.
keep the new scope, but the changed done in the src folder remove them, keep the module for yourself in the fork or make it a external plugin so you could share it in the website.
… scope Per review, the PR keeps only the new Windows scope and its docs row. The module, its default-theme styles and its toolbar i18n keys are removed from the app; the module will live on as an external plugin.
|
Addressed in 29a7a25 — the module, its default-theme styles and its toolbar i18n keys are removed, so I'm keeping the module for myself as a local plugin for now. |
Motivation
Toolbar plugins that render workspaces (the bundled
@default/workspaces-*family) can only enumerate windows as raw handles: theWorkspacesscope exposesDesktopWorkspace.windows: number[](hwnds), while theAppIcon()helper needs an exe path or umid to resolve an icon. There is currently no way for a plugin script to map a window handle to its application, so per-workspace app icons (i3/polybar-style) are impossible to implement as a plugin — to get them today I have to run a local HTTP daemon that serveshwnd → PNGto the toolbar (see "Workaround this replaces" below). This scope removes the need for such hacks.What this PR does
Windowsscope — injects the fullUserAppWindow[](hwnd,title,umid,process.path, …) backed byGetUserAppWindows. Implemented with the sameLazyScopepattern as the other scopes inscopes.svelte.ts; the resolver is shared with dock plugins, so the dock gets it for free. The toolbar already subscribes to this exact command/event internally (getters.svelte.ts→interactables), this change just exposes the data to plugin scripts as well.documentation/toolbar-plugins.md.An earlier revision of this PR also bundled a
@default/workspaces-iconstoolbar module as a showcase for the scope. Per review it was removed in 29a7a25 — the module lives on as an external plugin, so nothing undersrc/is touched anymore.Testing
type-checkscript (tsc --noEmit,svelte-check,deno check) passes locally on the trimmed tree.focusedAppscope pattern verbatim.Workaround this replaces (context)
With Seelen UI 2.8.10 I run the bundled-style module deployed locally against a small daemon: the toolbar template builds
Image({ url: "http://127.0.0.1:6129/icon/<hwnd>.png" })and a helper extractsSHDefExtractIconPNGs per hwnd. It works, but it is an external process, misses UWP umid resolution and can't provide window titles. The scope in this PR makes all of that native and removes the daemon.Related
The
remoteDataproblem mentioned in the original description (state_unsafe_mutationon flush) was fixed in #2017.