Work as a senior product engineer and finish the application in this specification. This is a real application, not a mockup. Create the complete source tree, configuration, migrations or schemas, working UI, persistence, error handling, and tests. Do not leave stub handlers, simulated production data, TODO features, inert buttons, or invented successful test results.
Start by inspecting the workspace and available tools. Choose compatible maintained dependency versions and pin them in a lockfile. Write a short implementation plan and an acceptance checklist, then implement and run the work without stopping after planning. Use stages to manage complexity, but carry every required stage to completion. If context runs low, save progress and remaining acceptance checks in a local handoff document and resume from it. Ask only about decisions that cannot safely be inferred.
Keep modules small and put domain logic outside presentation components. Validate inputs at trust boundaries, handle cancellation and failures, preserve user data, and provide clear recovery actions. Include keyboard access, labelled controls, visible focus, useful empty/loading/error states, sensible contrast, and reduced-motion support. No advertising, subscriptions, analytics, hidden cloud dependencies, or remote executable loading.
Before finishing, run the compiler/type checker, linting, unit/integration tests, and a production build. Add real workflow tests for the acceptance checklist and run them against the built application where possible. Fix failures and repeat affected checks. Report exact commands, actual results, any environment-blocked checks, setup instructions, and remaining limitations. Never call an unfinished or untested feature complete. Include a README explaining architecture, development, packaging, data locations, permissions, and recovery. Use clean generated sample data only in explicit tests and previews.
Build {{app_name}}, a GNOME Shell extension inspired by Taskbar Folders. Target GNOME Shell 46 and the Zorin Taskbar integration observed in Zorin OS 18.1; do not claim universal dock or shell-version support without testing. Use modern GJS ES modules, GNOME Shell/St/Clutter, GTK4/libadwaita preferences and a GSettings schema. Keep the existing taskbar intact. Do not overwrite system extension files or mutate the user's favorites list just to hide grouped buttons.
Provide metadata.json with a unique developer-owned UUID, extension.js lifecycle, prefs.js, stylesheet.css, GSettings schema, hierarchy helper, README and appropriate source license. Compile the schema in setup/packaging. Use the user's shell version to select supported APIs and explain how to disable/recover the extension from a terminal if the UI fails.
Functionality: add configurable folder buttons to the primary Zorin taskbar. Hover/click opens vertical app menus; nested folders open alongside the parent and flip at screen edges. Stable unique IDs preserve actors while preferences change. Prevent cyclic parent relationships and duplicate membership. Only top-level folders occupy taskbar slots. Move children up one level if their parent is deleted. Keep one app in one folder. Maintain the original favorites data, hiding only the grouped taskbar actors and restoring them on removal/disable.
Activation uses Shell's normal application behavior: focus existing windows or launch if none. Show running indicators and bounded live window previews with focus/close actions. Support keyboard Enter/Right to enter and Left/Escape to leave menus. Pointer motion between parent/child/preview menus must not prematurely close them. Drag pinned apps onto folders with target highlight; reorder app items in menus/preferences and persist immediately. Right-click Remove from Folder restores its taskbar button, while Manage Folders opens preferences. Keep a subtle separator between folder group and normal buttons without breaking allocation.
Preferences: create/rename/delete/reparent folders, select apps from installed desktop files, and choose a themed or custom image icon. Theme changes and missing custom files must fall back to a standard folder icon. Use {{accent_colour}} only as an optional restrained preference preview, respecting desktop themes. Validate malformed settings, repeated IDs and missing apps. Initialize one empty Apps folder with an understandable next action.
Lifecycle/performance: disconnect every signal, remove actors/previews, cancel every GLib timeout and restore each runtime hook/property on disable. Avoid polling when change signals suffice; any unavoidable polling is bounded and removed. Handle the Zorin Taskbar starting late, replacing actors, changing monitors or being disabled. Do not leak a closure/actor or keep grouped icons hidden after disabling. The extension runs in the desktop session and must not run remote code or request network access.
Acceptance: unit-test hierarchy normalization/cycle rejection and settings migration with fixtures; validate metadata/schema and packaging; in a compatible Shell session test create, nested navigation, launch/focus, window previews, drag/reorder/remove and theme fallback. Enable/disable repeatedly and verify original favorites, buttons, taskbar layout and shortcuts are preserved. Test screen-edge menus, missing apps, late taskbar startup and invalid settings. Do not restart or log out the user's desktop automatically; offer exact instructions and obtain consent for disruptive live testing. Include one-command disable and uninstall instructions that preserve or explicitly reset only this extension's settings.
Paste this into your preferred AI assistant. Review its output before running it.