@thanhnguyxn/pixelcraft 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +20 -0
- package/.antigravity-plugin/plugin.json +32 -0
- package/.claude-plugin/marketplace.json +20 -0
- package/.claude-plugin/plugin.json +22 -0
- package/.codex-plugin/plugin.json +45 -0
- package/.cursor-plugin/marketplace.json +17 -0
- package/.cursor-plugin/plugin.json +27 -0
- package/.devin-plugin/plugin.json +21 -0
- package/.github/plugin/marketplace.json +34 -0
- package/CHANGELOG.md +159 -0
- package/GEMINI.md +1 -0
- package/LICENSE +21 -0
- package/README.md +264 -2
- package/SECURITY.md +28 -0
- package/assets/README.md +28 -0
- package/assets/pixelcraft-logo-128.png +0 -0
- package/assets/pixelcraft-logo-256.png +0 -0
- package/assets/pixelcraft-logo-512.png +0 -0
- package/bin/pixelcraft.mjs +852 -0
- package/docs/ARCHITECTURE.md +105 -0
- package/docs/DESIGN-RATIONALE.md +191 -0
- package/docs/INSTALL.md +221 -0
- package/evals/README.md +37 -0
- package/evals/fixtures/3d-web-engineering.json +69 -0
- package/evals/fixtures/README.md +36 -0
- package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
- package/evals/fixtures/ai-ui-libraries.json +53 -0
- package/evals/fixtures/audio-visual-accessibility.json +69 -0
- package/evals/fixtures/auth-and-checkout-ui.json +53 -0
- package/evals/fixtures/brandkit-identity-governance.json +48 -0
- package/evals/fixtures/build-and-architecture.json +53 -0
- package/evals/fixtures/canvas-and-node-editors.json +53 -0
- package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
- package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
- package/evals/fixtures/component-systems.json +53 -0
- package/evals/fixtures/component-testing.json +53 -0
- package/evals/fixtures/constrained-voice-and-tv.json +43 -0
- package/evals/fixtures/creative-code-rendering.json +69 -0
- package/evals/fixtures/creative-reference-evidence.json +67 -0
- package/evals/fixtures/data-app-python-marimo.json +49 -0
- package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
- package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
- package/evals/fixtures/desktop-native-workspace.json +48 -0
- package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
- package/evals/fixtures/direction-prototype-complexity.json +29 -0
- package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
- package/evals/fixtures/document-rust-typst-invoice.json +49 -0
- package/evals/fixtures/document-typst-and-print-css.json +43 -0
- package/evals/fixtures/email-mjml-dark-mode.json +49 -0
- package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
- package/evals/fixtures/enterprise-data-ui.json +53 -0
- package/evals/fixtures/extended-tui-toolkits.json +53 -0
- package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
- package/evals/fixtures/file-upload-media-ui.json +53 -0
- package/evals/fixtures/finish-gate-anti-slop.json +30 -0
- package/evals/fixtures/forms-accessibility-negative.json +29 -0
- package/evals/fixtures/forms-validation.json +53 -0
- package/evals/fixtures/game-go-ebitengine.json +49 -0
- package/evals/fixtures/game-godot-gdscript.json +49 -0
- package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
- package/evals/fixtures/handoff-fidelity-tolerance.json +29 -0
- package/evals/fixtures/i18n-engineering.json +53 -0
- package/evals/fixtures/local-first-sync.json +53 -0
- package/evals/fixtures/lynxjs.json +53 -0
- package/evals/fixtures/maizzle-email.json +53 -0
- package/evals/fixtures/maps-geospatial.json +53 -0
- package/evals/fixtures/media-og-and-video-export.json +43 -0
- package/evals/fixtures/media-players.json +53 -0
- package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
- package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
- package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
- package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
- package/evals/fixtures/mobile-jetpack-compose.json +49 -0
- package/evals/fixtures/mobile-swiftui-ios.json +49 -0
- package/evals/fixtures/motion-engineering.json +69 -0
- package/evals/fixtures/pdfjs-and-pptx.json +53 -0
- package/evals/fixtures/plan-brownfield-evidence.json +28 -0
- package/evals/fixtures/plan-discovery-interview.json +31 -0
- package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
- package/evals/fixtures/reactive-data-apps.json +53 -0
- package/evals/fixtures/review-evidence-audit.json +43 -0
- package/evals/fixtures/rich-text-and-code-editors.json +53 -0
- package/evals/fixtures/scrollytelling-resilience.json +70 -0
- package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
- package/evals/fixtures/state-architecture.json +53 -0
- package/evals/fixtures/styling-ecosystem.json +53 -0
- package/evals/fixtures/token-tooling.json +53 -0
- package/evals/fixtures/tui-go-bubbletea.json +49 -0
- package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
- package/evals/fixtures/tui-rust-ratatui.json +49 -0
- package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
- package/evals/fixtures/visual-qa-task-evidence.json +29 -0
- package/evals/fixtures/web-3d-engines.json +53 -0
- package/evals/fixtures/web-php-laravel-filament.json +49 -0
- package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
- package/evals/fixtures/workflow-checkpoints.json +30 -0
- package/evals/pixelcraft-accessibility.md +74 -0
- package/evals/pixelcraft-brandkit.md +58 -0
- package/evals/pixelcraft-chat-ui.md +55 -0
- package/evals/pixelcraft-constrained.md +55 -0
- package/evals/pixelcraft-craft.md +76 -0
- package/evals/pixelcraft-data-apps.md +55 -0
- package/evals/pixelcraft-dataviz.md +59 -0
- package/evals/pixelcraft-desktop.md +55 -0
- package/evals/pixelcraft-direction.md +77 -0
- package/evals/pixelcraft-document.md +55 -0
- package/evals/pixelcraft-email.md +55 -0
- package/evals/pixelcraft-extensions.md +55 -0
- package/evals/pixelcraft-game-ui.md +59 -0
- package/evals/pixelcraft-handoff.md +57 -0
- package/evals/pixelcraft-media.md +55 -0
- package/evals/pixelcraft-mobile.md +59 -0
- package/evals/pixelcraft-patterns.md +73 -0
- package/evals/pixelcraft-plan.md +127 -0
- package/evals/pixelcraft-review.md +63 -0
- package/evals/pixelcraft-spatial.md +55 -0
- package/evals/pixelcraft-tokens.md +57 -0
- package/evals/pixelcraft-tui.md +55 -0
- package/evals/pixelcraft-ux.md +59 -0
- package/evals/pixelcraft-visual-qa.md +86 -0
- package/evals/pixelcraft-web.md +89 -0
- package/evals/pixelcraft.md +70 -0
- package/gemini-extension.json +6 -0
- package/install.ps1 +341 -0
- package/install.sh +512 -0
- package/package.json +91 -4
- package/plugin.json +29 -0
- package/scripts/build-adapters.mjs +288 -0
- package/scripts/build-release-archives.mjs +61 -0
- package/scripts/build-skill-zips.mjs +94 -0
- package/scripts/run-evals.mjs +397 -0
- package/scripts/sync-docs.mjs +381 -0
- package/scripts/test-build-adapters.mjs +61 -0
- package/scripts/test-cross-platform-qa.mjs +359 -0
- package/scripts/test-distribution.mjs +203 -0
- package/scripts/test-export-tokens.mjs +361 -0
- package/scripts/test-finish-gate.mjs +271 -0
- package/scripts/test-installers.mjs +216 -0
- package/scripts/test-release-archives.mjs +42 -0
- package/scripts/test-shoot.mjs +87 -0
- package/scripts/test-slop-scan.mjs +416 -0
- package/scripts/test-style-inventory.mjs +234 -0
- package/scripts/test-sync-docs.mjs +140 -0
- package/scripts/test-validate-skills.mjs +195 -0
- package/scripts/validate-skills.mjs +658 -0
- package/skills/pixelcraft/SKILL.md +155 -0
- package/skills/pixelcraft/references/design-brief.md +75 -0
- package/skills/pixelcraft/references/floor.md +90 -0
- package/skills/pixelcraft/references/report-template.md +49 -0
- package/skills/pixelcraft/references/stack-detection.md +226 -0
- package/skills/pixelcraft/references/surface-acceptance.md +52 -0
- package/skills/pixelcraft/references/workflow-checkpoints.md +71 -0
- package/skills/pixelcraft-accessibility/SKILL.md +54 -0
- package/skills/pixelcraft-accessibility/references/apg-patterns.md +64 -0
- package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
- package/skills/pixelcraft-accessibility/references/platforms.md +86 -0
- package/skills/pixelcraft-accessibility/references/verification.md +64 -0
- package/skills/pixelcraft-accessibility/references/wcag22-checks.md +99 -0
- package/skills/pixelcraft-brandkit/SKILL.md +127 -0
- package/skills/pixelcraft-brandkit/references/asset-pipeline.md +165 -0
- package/skills/pixelcraft-brandkit/references/brand-governance.md +82 -0
- package/skills/pixelcraft-brandkit/references/layouts.md +88 -0
- package/skills/pixelcraft-brandkit/references/logo-concepting.md +83 -0
- package/skills/pixelcraft-brandkit/references/logo-methods.md +97 -0
- package/skills/pixelcraft-brandkit/references/pixel-art-logos.md +82 -0
- package/skills/pixelcraft-brandkit/references/prompt-template.md +87 -0
- package/skills/pixelcraft-brandkit/references/qa-checklist.md +93 -0
- package/skills/pixelcraft-brandkit/references/visual-modes.md +123 -0
- package/skills/pixelcraft-chat-ui/SKILL.md +57 -0
- package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
- package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
- package/skills/pixelcraft-chat-ui/references/conversation-design.md +84 -0
- package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +77 -0
- package/skills/pixelcraft-chat-ui/references/slack-discord.md +80 -0
- package/skills/pixelcraft-constrained/SKILL.md +52 -0
- package/skills/pixelcraft-constrained/references/specialized-hardware.md +90 -0
- package/skills/pixelcraft-constrained/references/tv-wearables.md +134 -0
- package/skills/pixelcraft-constrained/references/voice-ui.md +104 -0
- package/skills/pixelcraft-craft/SKILL.md +58 -0
- package/skills/pixelcraft-craft/references/color.md +125 -0
- package/skills/pixelcraft-craft/references/imagery-icons.md +37 -0
- package/skills/pixelcraft-craft/references/layout-quality.md +65 -0
- package/skills/pixelcraft-craft/references/layout.md +73 -0
- package/skills/pixelcraft-craft/references/motion.md +163 -0
- package/skills/pixelcraft-craft/references/typography.md +110 -0
- package/skills/pixelcraft-data-apps/SKILL.md +86 -0
- package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
- package/skills/pixelcraft-data-apps/references/dash.md +109 -0
- package/skills/pixelcraft-data-apps/references/evidence.md +90 -0
- package/skills/pixelcraft-data-apps/references/gradio.md +103 -0
- package/skills/pixelcraft-data-apps/references/julia-genie.md +89 -0
- package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +91 -0
- package/skills/pixelcraft-data-apps/references/nicegui.md +102 -0
- package/skills/pixelcraft-data-apps/references/observable-framework.md +105 -0
- package/skills/pixelcraft-data-apps/references/panel.md +99 -0
- package/skills/pixelcraft-data-apps/references/r-shiny.md +124 -0
- package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
- package/skills/pixelcraft-data-apps/references/reflex.md +116 -0
- package/skills/pixelcraft-data-apps/references/shiny.md +110 -0
- package/skills/pixelcraft-data-apps/references/streamlit.md +113 -0
- package/skills/pixelcraft-dataviz/SKILL.md +60 -0
- package/skills/pixelcraft-dataviz/references/chart-choice.md +55 -0
- package/skills/pixelcraft-dataviz/references/color-accessibility.md +112 -0
- package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +107 -0
- package/skills/pixelcraft-dataviz/references/libraries.md +176 -0
- package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
- package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +92 -0
- package/skills/pixelcraft-desktop/SKILL.md +93 -0
- package/skills/pixelcraft-desktop/references/appkit.md +92 -0
- package/skills/pixelcraft-desktop/references/avalonia.md +95 -0
- package/skills/pixelcraft-desktop/references/cpp-gui.md +129 -0
- package/skills/pixelcraft-desktop/references/electron.md +96 -0
- package/skills/pixelcraft-desktop/references/go-gui.md +83 -0
- package/skills/pixelcraft-desktop/references/gtk.md +97 -0
- package/skills/pixelcraft-desktop/references/javafx-swing.md +81 -0
- package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +88 -0
- package/skills/pixelcraft-desktop/references/rust-gui.md +83 -0
- package/skills/pixelcraft-desktop/references/tauri.md +110 -0
- package/skills/pixelcraft-desktop/references/uno-platform.md +71 -0
- package/skills/pixelcraft-desktop/references/winui-wpf.md +98 -0
- package/skills/pixelcraft-desktop/references/working-context.md +84 -0
- package/skills/pixelcraft-direction/SKILL.md +120 -0
- package/skills/pixelcraft-direction/references/composition-library.md +84 -0
- package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
- package/skills/pixelcraft-direction/references/direction-card.md +64 -0
- package/skills/pixelcraft-direction/references/direction-scoring.md +76 -0
- package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
- package/skills/pixelcraft-direction/references/movements.md +71 -0
- package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
- package/skills/pixelcraft-direction/references/repetition-history.md +75 -0
- package/skills/pixelcraft-direction/references/slop-fingerprints.md +83 -0
- package/skills/pixelcraft-direction/references/wildcards.md +47 -0
- package/skills/pixelcraft-document/SKILL.md +58 -0
- package/skills/pixelcraft-document/references/archetypes.md +106 -0
- package/skills/pixelcraft-document/references/pdf-tools.md +314 -0
- package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
- package/skills/pixelcraft-document/references/print-css.md +187 -0
- package/skills/pixelcraft-document/references/slides.md +198 -0
- package/skills/pixelcraft-email/SKILL.md +80 -0
- package/skills/pixelcraft-email/references/client-quirks.md +113 -0
- package/skills/pixelcraft-email/references/html-tables.md +114 -0
- package/skills/pixelcraft-email/references/maizzle.md +54 -0
- package/skills/pixelcraft-email/references/mjml.md +54 -0
- package/skills/pixelcraft-email/references/react-email.md +95 -0
- package/skills/pixelcraft-extensions/SKILL.md +56 -0
- package/skills/pixelcraft-extensions/references/browser-extensions.md +105 -0
- package/skills/pixelcraft-extensions/references/figma-office.md +106 -0
- package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
- package/skills/pixelcraft-extensions/references/raycast.md +98 -0
- package/skills/pixelcraft-extensions/references/vscode-webviews.md +100 -0
- package/skills/pixelcraft-game-ui/SKILL.md +80 -0
- package/skills/pixelcraft-game-ui/references/bevy.md +90 -0
- package/skills/pixelcraft-game-ui/references/godot.md +130 -0
- package/skills/pixelcraft-game-ui/references/hud-principles.md +67 -0
- package/skills/pixelcraft-game-ui/references/love2d.md +77 -0
- package/skills/pixelcraft-game-ui/references/monogame.md +68 -0
- package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
- package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +107 -0
- package/skills/pixelcraft-game-ui/references/unreal-umg.md +80 -0
- package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
- package/skills/pixelcraft-handoff/SKILL.md +50 -0
- package/skills/pixelcraft-handoff/references/design-translation.md +134 -0
- package/skills/pixelcraft-handoff/references/fidelity-tolerance.md +78 -0
- package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
- package/skills/pixelcraft-media/SKILL.md +49 -0
- package/skills/pixelcraft-media/references/banners-video.md +130 -0
- package/skills/pixelcraft-media/references/og-generation.md +154 -0
- package/skills/pixelcraft-media/references/social-cards.md +71 -0
- package/skills/pixelcraft-mobile/SKILL.md +86 -0
- package/skills/pixelcraft-mobile/references/dotnet-maui.md +91 -0
- package/skills/pixelcraft-mobile/references/flet.md +80 -0
- package/skills/pixelcraft-mobile/references/flutter.md +113 -0
- package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
- package/skills/pixelcraft-mobile/references/ionic-capacitor.md +87 -0
- package/skills/pixelcraft-mobile/references/jetpack-compose.md +129 -0
- package/skills/pixelcraft-mobile/references/kivy.md +82 -0
- package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +86 -0
- package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
- package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
- package/skills/pixelcraft-mobile/references/react-native-expo.md +106 -0
- package/skills/pixelcraft-mobile/references/swiftui.md +200 -0
- package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
- package/skills/pixelcraft-mobile/references/task-state-composition.md +85 -0
- package/skills/pixelcraft-mobile/references/uikit.md +92 -0
- package/skills/pixelcraft-patterns/SKILL.md +75 -0
- package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
- package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
- package/skills/pixelcraft-patterns/references/auth-onboarding.md +44 -0
- package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
- package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
- package/skills/pixelcraft-patterns/references/commerce.md +47 -0
- package/skills/pixelcraft-patterns/references/communication.md +45 -0
- package/skills/pixelcraft-patterns/references/creative-tools.md +42 -0
- package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
- package/skills/pixelcraft-patterns/references/dashboard-admin.md +35 -0
- package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
- package/skills/pixelcraft-patterns/references/marketing.md +44 -0
- package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
- package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
- package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
- package/skills/pixelcraft-patterns/references/pattern-selection.md +80 -0
- package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
- package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
- package/skills/pixelcraft-patterns/references/search-filtering.md +42 -0
- package/skills/pixelcraft-patterns/references/settings.md +51 -0
- package/skills/pixelcraft-patterns/references/tables-crud.md +43 -0
- package/skills/pixelcraft-plan/SKILL.md +103 -0
- package/skills/pixelcraft-plan/references/design-input.md +69 -0
- package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
- package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
- package/skills/pixelcraft-plan/references/plan-template.md +134 -0
- package/skills/pixelcraft-plan/references/repo-discovery.md +49 -0
- package/skills/pixelcraft-plan/references/stack-freshness.md +67 -0
- package/skills/pixelcraft-plan/references/stack-selection.md +98 -0
- package/skills/pixelcraft-review/SKILL.md +86 -0
- package/skills/pixelcraft-review/references/audit-report.md +69 -0
- package/skills/pixelcraft-review/references/critique-protocol.md +89 -0
- package/skills/pixelcraft-review/references/heuristics.md +63 -0
- package/skills/pixelcraft-review/references/personas.md +53 -0
- package/skills/pixelcraft-review/references/polish.md +78 -0
- package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
- package/skills/pixelcraft-review/scripts/fixtures/brand-critique-waivers.json +14 -0
- package/skills/pixelcraft-review/scripts/fixtures/brand-critique.css +18 -0
- package/skills/pixelcraft-review/scripts/fixtures/clean.html +43 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-after-block.css +4 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-at-rules.css +17 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-comments.css +10 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-html-quote-leak.html +12 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-invalid-replacements.css +27 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-nested-rules.css +19 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-not-visible-skip.css +8 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-outline-shorthands.css +11 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-and-border.css +15 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-last-wins.css +19 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-valid-replacements-extended.css +29 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-visible-no-replacement.css +3 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-visible-valid-replacements.css +9 -0
- package/skills/pixelcraft-review/scripts/fixtures/slop.html +28 -0
- package/skills/pixelcraft-review/scripts/slop-scan.mjs +1233 -0
- package/skills/pixelcraft-spatial/SKILL.md +51 -0
- package/skills/pixelcraft-spatial/references/comfort-accessibility.md +39 -0
- package/skills/pixelcraft-spatial/references/platforms.md +147 -0
- package/skills/pixelcraft-tokens/SKILL.md +60 -0
- package/skills/pixelcraft-tokens/assets/tokens.example.json +71 -0
- package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +47 -0
- package/skills/pixelcraft-tokens/references/adoption.md +55 -0
- package/skills/pixelcraft-tokens/references/format.md +84 -0
- package/skills/pixelcraft-tokens/references/governance.md +80 -0
- package/skills/pixelcraft-tokens/references/state-tokens.md +62 -0
- package/skills/pixelcraft-tokens/references/theme-presets.md +122 -0
- package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
- package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +847 -0
- package/skills/pixelcraft-tui/SKILL.md +76 -0
- package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +79 -0
- package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
- package/skills/pixelcraft-tui/references/ink.md +109 -0
- package/skills/pixelcraft-tui/references/ratatui.md +102 -0
- package/skills/pixelcraft-tui/references/rich.md +82 -0
- package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
- package/skills/pixelcraft-tui/references/textual.md +108 -0
- package/skills/pixelcraft-ux/SKILL.md +56 -0
- package/skills/pixelcraft-ux/references/cognitive-walkthrough.md +70 -0
- package/skills/pixelcraft-ux/references/feedback-performance.md +50 -0
- package/skills/pixelcraft-ux/references/flows-ia.md +44 -0
- package/skills/pixelcraft-ux/references/forms.md +151 -0
- package/skills/pixelcraft-ux/references/i18n.md +221 -0
- package/skills/pixelcraft-ux/references/laws.md +39 -0
- package/skills/pixelcraft-ux/references/locale-test-matrix.md +60 -0
- package/skills/pixelcraft-ux/references/state-matrix.md +53 -0
- package/skills/pixelcraft-ux/references/usability-testing.md +84 -0
- package/skills/pixelcraft-ux/references/ux-writing.md +44 -0
- package/skills/pixelcraft-visual-qa/SKILL.md +96 -0
- package/skills/pixelcraft-visual-qa/references/baseline-governance.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +59 -0
- package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-email.md +38 -0
- package/skills/pixelcraft-visual-qa/references/capture-mobile.md +50 -0
- package/skills/pixelcraft-visual-qa/references/capture-terminal.md +35 -0
- package/skills/pixelcraft-visual-qa/references/critique-rubric.md +71 -0
- package/skills/pixelcraft-visual-qa/references/finish-gate.md +35 -0
- package/skills/pixelcraft-visual-qa/references/measured-craft.md +30 -0
- package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
- package/skills/pixelcraft-visual-qa/references/performance-budgets.md +78 -0
- package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
- package/skills/pixelcraft-visual-qa/references/task-verification.md +81 -0
- package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
- package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
- package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
- package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
- package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +174 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-aria-modal.html +19 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-audit.html +34 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-modal.html +17 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-deferred.js +1 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-edge.html +52 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.html +80 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.js +8 -0
- package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +668 -0
- package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +1226 -0
- package/skills/pixelcraft-web/SKILL.md +132 -0
- package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
- package/skills/pixelcraft-web/references/adaptive-layout.md +69 -0
- package/skills/pixelcraft-web/references/angular.md +108 -0
- package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
- package/skills/pixelcraft-web/references/astro.md +113 -0
- package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
- package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
- package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
- package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
- package/skills/pixelcraft-web/references/clojurescript.md +88 -0
- package/skills/pixelcraft-web/references/component-systems.md +102 -0
- package/skills/pixelcraft-web/references/component-testing.md +170 -0
- package/skills/pixelcraft-web/references/creative-effects.md +59 -0
- package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
- package/skills/pixelcraft-web/references/elm.md +53 -0
- package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
- package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
- package/skills/pixelcraft-web/references/forms-validation.md +123 -0
- package/skills/pixelcraft-web/references/fsharp-fable.md +54 -0
- package/skills/pixelcraft-web/references/gsap.md +102 -0
- package/skills/pixelcraft-web/references/html-css.md +220 -0
- package/skills/pixelcraft-web/references/htmx-alpine.md +103 -0
- package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
- package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
- package/skills/pixelcraft-web/references/java-web.md +61 -0
- package/skills/pixelcraft-web/references/kotlin-web.md +57 -0
- package/skills/pixelcraft-web/references/leptos-yew.md +97 -0
- package/skills/pixelcraft-web/references/lit-web-components.md +63 -0
- package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
- package/skills/pixelcraft-web/references/media-players.md +104 -0
- package/skills/pixelcraft-web/references/motion-react.md +96 -0
- package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
- package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
- package/skills/pixelcraft-web/references/pwa.md +230 -0
- package/skills/pixelcraft-web/references/qwik.md +94 -0
- package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
- package/skills/pixelcraft-web/references/react-next.md +168 -0
- package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
- package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
- package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
- package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
- package/skills/pixelcraft-web/references/scala-laminar.md +53 -0
- package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
- package/skills/pixelcraft-web/references/server-rendered.md +114 -0
- package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
- package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
- package/skills/pixelcraft-web/references/solid.md +111 -0
- package/skills/pixelcraft-web/references/state-architecture.md +107 -0
- package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
- package/skills/pixelcraft-web/references/svelte.md +111 -0
- package/skills/pixelcraft-web/references/tailwind.md +99 -0
- package/skills/pixelcraft-web/references/video-media.md +69 -0
- package/skills/pixelcraft-web/references/vue-nuxt.md +86 -0
- package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# C++, C, & Zig desktop GUIs: Qt C++, JUCE, GTKmm, wxWidgets, FLTK 1.4, Dear ImGui, Nuklear, Ultralight, & Zig toolkits
|
|
2
|
+
|
|
3
|
+
**Boundary note**: use this reference for **C++ / C / Zig native toolchains** (CMake + Qt C++, JUCE, GTKmm, wxWidgets, FLTK 1.4, Dear ImGui, Nuklear, Ultralight, DVUI, Clay, raygui). For **Qt 6 / PySide6 / QML** styling rules, `styleHints.colorScheme`, Qt Quick Controls 2 (`FluentWinUI3`/`macOS`), `qmltc`, Kirigami, and the QSS native-style warning, read `references/qt-pyside-qml.md` alongside this file.
|
|
4
|
+
|
|
5
|
+
## Toolkit decision matrix
|
|
6
|
+
|
|
7
|
+
| Toolkit | Language | UI model | Strengths | Accessibility / IME reality |
|
|
8
|
+
|---|---|---|---|---|
|
|
9
|
+
| **Qt 6 (C++ / QML)** | C++ | Retained native/QML (`cmake`, `qmltc`) | Full enterprise desktop maturity, native styles, i18n, HiDPI | Mature `QAccessible` / UIA / NSAccessibility / AT-SPI + full IME |
|
|
10
|
+
| **JUCE** | C++ | Retained vector/GPU component tree for VST3/AU/CLAP/standalone audio | Realtime audio plugin & DAW industry standard, `APVTS`, `LookAndFeel`, scalable vector paths | Built-in `juce::AccessibilityHandler` (VoiceOver/Narrator/UIA)—must populate titles, descriptions, and focus order |
|
|
11
|
+
| **GTKmm (`gtkmm-4.0`)** | C++20 | Idiomatic RAII C++ bindings over GTK4 / `libadwaita` | Native Linux/Wayland craft, `Gtk::Builder`/Blueprint, zero raw GObject boilerplate | Full native AT-SPI screen-reader & IME parity (follow `references/gtk.md`) |
|
|
12
|
+
| **wxWidgets** | C++ | Native OS control wrapper (`wxSizer`) | True native Windows/macOS/GTK controls, small footprint | Strong via OS native controls; custom `wxPanel` drawing needs manual bridges |
|
|
13
|
+
| **FLTK 1.4** | C++ | Lightweight retained (`Fl_Flex`, `Fl_Grid`) | Tiny static binary, native **Wayland** backend, per-monitor **HiDPI** scaling | Basic keyboard nav; limited screen-reader exposure—verify before accessibility claims |
|
|
14
|
+
| **Dear ImGui** | C++ | Immediate-mode GPU (`ImGui::Begin`) | Unmatched speed for game/engine/DSP debuggers and in-app tools | No built-in screen-reader tree; low-level IME—not for screen-reader-mandated apps |
|
|
15
|
+
| **Nuklear** | ANSI C (single-header) | Immediate-mode renderer-agnostic (`nk_begin`) | Tiny zero-dep C footprint for embedded tools and custom GPU engines | No built-in screen-reader tree or complex IME; dev/embedded scope only |
|
|
16
|
+
| **Ultralight** | C++ + HTML/CSS/JS | Lightweight commercial WebKit-derived renderer | Smaller footprint than Chromium/Electron for custom C++ apps & game UI | Commercial license; verify IME/screen-reader support per target OS before productivity use |
|
|
17
|
+
| **DVUI** | Zig | Immediate-mode native (`dvui` over SDL/Raylib/Web) | Zero-bloat Zig ergonomics, retained scroll/text state, HiDPI, single binary | Basic keyboard focus; limited native screen-reader bridge (verify/label `not-checked`) |
|
|
18
|
+
| **Clay** | C (single-header) | Zero-allocation Flexbox layout engine (renderer-agnostic) | Microsecond deterministic layout for C/C++/Zig/WASM custom renderers | Layout only—you own widget semantics, text shaping, focus, and accessibility |
|
|
19
|
+
| **raygui** | C | Immediate-mode UI over Raylib | Rapid prototyping of Raylib level editors, audio tools, dev overlays | Dev-tool focus; no native OS accessibility or complex IME |
|
|
20
|
+
|
|
21
|
+
## JUCE (VST3 / AU / CLAP audio plugins & DAW UI)
|
|
22
|
+
|
|
23
|
+
Audio UIs have a hard real-time constraint: glitches on the audio thread ruin recordings.
|
|
24
|
+
|
|
25
|
+
- **Strict audio-thread vs message-thread separation**: NEVER allocate heap memory, acquire a `std::mutex`, lock the `MessageManager`, or call `repaint()` inside `processBlock()`. Bind controls via **`juce::AudioProcessorValueTreeState` (`APVTS`)** attachments (`SliderAttachment`, `ButtonAttachment`, `ComboBoxAttachment`), exchange meter levels via `std::atomic<float>` polled on a `juce::Timer` (30–60 Hz), and stream waveforms/spectra across lock-free `juce::AbstractFifo` ring buffers.
|
|
26
|
+
- **Custom `LookAndFeel` & cleanup**: centralize semantic palette tokens in a `juce::LookAndFeel_V4` subclass (`setColour(...)`), draw knobs/meters with resolution-independent `juce::Path` vectors for crisp HiDPI scaling, and **always call `setLookAndFeel(nullptr)` in the editor destructor** before destroying the LookAndFeel member (dangling `LookAndFeel*` asserts/crashes on close).
|
|
27
|
+
- **Resizing & host DAW scaling**: enable `setResizable(true, true)` + `setResizeLimits(minW, minH, maxW, maxH)` and compute child bounds in `resized()` using `juce::FlexBox` / `juce::Grid` / `Rectangle::removeFromTop(...)` rather than fixed coordinates.
|
|
28
|
+
- **Keyboard & accessibility**: set `setTitle(...)`, `setDescription(...)`, `setWantsKeyboardFocus(true)`, and expose custom controls through `juce::AccessibilityHandler` (value + units, e.g., `-6.0 dB`) so VoiceOver/Narrator users can operate plugin parameters in DAWs.
|
|
29
|
+
|
|
30
|
+
```cpp
|
|
31
|
+
// JUCE AudioProcessorEditor: lock-free APVTS attachment, LookAndFeel lifecycle, & a11y metadata
|
|
32
|
+
class GainEditor final : public juce::AudioProcessorEditor {
|
|
33
|
+
public:
|
|
34
|
+
GainEditor(GainProcessor& proc, juce::AudioProcessorValueTreeState& apvts)
|
|
35
|
+
: AudioProcessorEditor(&proc), apvts_(apvts) {
|
|
36
|
+
setLookAndFeel(&laf_);
|
|
37
|
+
gainSlider_.setSliderStyle(juce::Slider::RotaryHorizontalVerticalDrag);
|
|
38
|
+
gainSlider_.setTextBoxStyle(juce::Slider::TextBoxBelow, false, 72, 22);
|
|
39
|
+
gainSlider_.setTitle("Output Gain");
|
|
40
|
+
gainSlider_.setDescription("Adjusts output level in decibels");
|
|
41
|
+
gainSlider_.setWantsKeyboardFocus(true);
|
|
42
|
+
addAndMakeVisible(gainSlider_);
|
|
43
|
+
gainAttachment_ = std::make_unique<juce::AudioProcessorValueTreeState::SliderAttachment>(
|
|
44
|
+
apvts_, "gainDb", gainSlider_);
|
|
45
|
+
|
|
46
|
+
setResizable(true, true);
|
|
47
|
+
setResizeLimits(320, 220, 960, 660);
|
|
48
|
+
setSize(420, 280);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
~GainEditor() override {
|
|
52
|
+
setLookAndFeel(nullptr); // Mandatory before laf_ is destroyed
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
void resized() override {
|
|
56
|
+
gainSlider_.setBounds(getLocalBounds().reduced(24));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
private:
|
|
60
|
+
StudioLookAndFeel laf_;
|
|
61
|
+
juce::AudioProcessorValueTreeState& apvts_;
|
|
62
|
+
juce::Slider gainSlider_;
|
|
63
|
+
std::unique_ptr<juce::AudioProcessorValueTreeState::SliderAttachment> gainAttachment_;
|
|
64
|
+
};
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Token mapping & idiomatic snippets
|
|
68
|
+
|
|
69
|
+
Centralize semantic theme values once—never scatter raw RGB integers through paint or frame callbacks:
|
|
70
|
+
|
|
71
|
+
- **Qt C++**: bind semantic tokens via `QPalette` / QML `pragma Singleton` (avoid massive global QSS that strips native styles; see `references/qt-pyside-qml.md`).
|
|
72
|
+
- **GTKmm (`gtkmm-4.0`)**: load semantic CSS variables via `Gtk::CssProvider`, pair with `libadwaita` adaptive widgets (`Adw::NavigationSplitView`, `Adw::Dialog`), and rely on RAII `Gtk::make_managed<T>()` + `sigc::trackable` so disconnected signals never dangle.
|
|
73
|
+
- **wxWidgets**: query `wxSystemSettings::GetColour(...)` and `GetAppearance().IsDark()` so native dark/high-contrast themes stay intact.
|
|
74
|
+
- **FLTK 1.4**: compose responsive layouts with **`Fl_Flex`** and **`Fl_Grid`** (introduced in 1.4 alongside native Wayland and per-monitor scaling) rather than fixed pixel coordinates.
|
|
75
|
+
- **Nuklear & Ultralight**: in **Nuklear**, drive colors from a central `nk_style` table and bake Unicode font ranges into `nk_font_atlas`; in **Ultralight**, keep HTML/CSS tokens in local bundled assets (`FileSystem`), validate C++↔JS bridge calls, pass OS display scale cleanly, and check licensing before commercial use.
|
|
76
|
+
- **DVUI (Zig)**: read semantic colors from `dvui.themeGet()` and build responsive rows cleanly without manual pixel math:
|
|
77
|
+
|
|
78
|
+
```zig
|
|
79
|
+
// Zig + DVUI responsive row using active theme tokens:
|
|
80
|
+
var hbox = try dvui.box(@src(), .horizontal, .{ .expand = .horizontal });
|
|
81
|
+
defer hbox.deinit();
|
|
82
|
+
|
|
83
|
+
if (try dvui.button(@src(), "Save invoice", .{}, .{
|
|
84
|
+
.color_fill = dvui.themeGet().color_accent,
|
|
85
|
+
})) {
|
|
86
|
+
try saveInvoice();
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Layout, typography, & power-aware motion
|
|
91
|
+
|
|
92
|
+
- Use **Qt layouts**, **JUCE `FlexBox`/`Grid`**, **GTKmm boxes/grids**, **wxWidgets sizers** (`wxBoxSizer`/`wxFlexGridSizer`), **FLTK 1.4 `Fl_Flex`/`Fl_Grid`**, or **Clay** Flexbox declarations—never hard-code pixel rectangles assuming 96 DPI.
|
|
93
|
+
- Verify font loading and glyph coverage explicitly: Qt, GTKmm, JUCE, and wxWidgets inherit OS text shaping/fallbacks, whereas **Dear ImGui**, **Nuklear**, **raygui**, and custom **Clay** renderers require explicit font-atlas glyph ranges (Latin, Cyrillic, CJK, symbols) or missing characters render as `?`/tofu.
|
|
94
|
+
- Avoid draining laptop batteries in immediate-mode loops (**Dear ImGui**, **Nuklear**, **DVUI**, **raygui**): wait on OS input/window events (`SDL_WaitEventTimeout` / `glfwWaitEventsTimeout`) when idle instead of spinning an uncapped 120 FPS render loop. Expose an app-level reduced-motion toggle where OS preference hooks are absent.
|
|
95
|
+
|
|
96
|
+
## Accessibility, states, & forms idioms
|
|
97
|
+
|
|
98
|
+
- Choose **Qt 6**, **GTKmm**, **wxWidgets**, or **JUCE** (for audio) when full screen-reader support (VoiceOver/Narrator/Orca), complex CJK/RTL IME composition, and High Contrast compliance are mandatory.
|
|
99
|
+
- For immediate-mode/lightweight C/C++/Zig toolkits (**Dear ImGui**, **Nuklear**, **FLTK**, **DVUI**, **Clay**, **raygui**), be honest about accessibility boundaries: either integrate **AccessKit** (C ABI `accesskit-c`) and verify live screen-reader output, or scope the UI strictly to dev/engineering/embedded tooling and record screen-reader verification accurately (`not-checked` / `waived` per project floor).
|
|
100
|
+
- Keep durable document state, dirty-close checks, and cancellable background worker threads outside frame/paint loops, marshaling completion back to the UI thread safely (`QMetaObject::invokeMethod`, `wxQueueEvent`, `Fl::awake`, `juce::MessageManager::callAsync`, or lock-free queues).
|
|
101
|
+
|
|
102
|
+
## Do/don't pairs
|
|
103
|
+
|
|
104
|
+
| Do | Don't |
|
|
105
|
+
|---|---|
|
|
106
|
+
| Bind JUCE UI controls via `APVTS` attachments / atomics + `Timer`, and call `setLookAndFeel(nullptr)` in `~Editor()` | Touch `juce::Component`, allocate memory, or lock mutexes inside `processBlock()`, or leak `LookAndFeel*` |
|
|
107
|
+
| Use Qt layouts, JUCE `FlexBox`/`Grid`, GTKmm containers, `wxSizer`, FLTK 1.4 `Fl_Flex`/`Fl_Grid`, or Clay Flexbox | Hard-code fixed pixel coordinates for one 1080p monitor |
|
|
108
|
+
| Wait on OS events when idle in Dear ImGui / Nuklear / DVUI / raygui | Spin an uncapped `while (true)` GPU loop burning battery while idle |
|
|
109
|
+
| Choose Qt 6, GTKmm, wxWidgets, or JUCE `AccessibilityHandler` (or bridge `accesskit-c`) for accessible apps | Ship a raw Dear ImGui, Nuklear, or raygui form and claim screen-reader compliance |
|
|
110
|
+
| Marshal background worker completion safely (`Fl::awake`, `wxQueueEvent`, `invokeMethod`, `callAsync`) | Mutate UI widgets directly from worker or realtime audio threads |
|
|
111
|
+
| Load explicit Unicode/CJK/RTL glyph ranges or HarfBuzz shaping in GPU font atlases | Rely on default ASCII-only bitmap font atlases for localized apps |
|
|
112
|
+
|
|
113
|
+
## Known traps
|
|
114
|
+
|
|
115
|
+
Audio-thread allocations or mutex locks in JUCE `processBlock()`, dangling `LookAndFeel*` on JUCE editor teardown, dangling `QObject`/widget pointers across threads, uncapped immediate-mode GPU frame loops, missing glyph ranges in ImGui/Nuklear/raygui font atlases, FLTK 1.3 vs 1.4 confusion, Ultralight commercial-licensing oversight, ABI/CRT linkage mismatches on packaging, and claiming accessibility for immediate-mode canvas tools without testing VoiceOver/Narrator/Orca.
|
|
116
|
+
|
|
117
|
+
## Verification commands
|
|
118
|
+
|
|
119
|
+
```sh
|
|
120
|
+
# C++ (CMake — Qt, JUCE, GTKmm, wxWidgets, FLTK, ImGui):
|
|
121
|
+
cmake --build build
|
|
122
|
+
ctest --test-dir build --output-on-failure
|
|
123
|
+
./build/<app>
|
|
124
|
+
# Zig (DVUI / Clay):
|
|
125
|
+
zig build test
|
|
126
|
+
zig build run
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Build and test suites provide `static` / logic evidence. Run native binaries (and for JUCE plugins, host DAW validation such as `pluginval` across AU/VST3/CLAP) on each shipped OS across Wayland/X11/Windows/macOS fractional HiDPI scaling, resize/minimum bounds, idle CPU/GPU power draw, keyboard traversal, screen readers (where supported), and dirty-close recovery for `rendered` evidence; label untested OSes and unsupported assistive-tech surfaces `not-checked`.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Electron & Electrobun
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
Use generated DTCG CSS custom properties in renderer UI. Keep main-process native chrome (window `backgroundColor` to eliminate launch flash, `nativeTheme.themeSource`, tray icons, dialogs) synchronized via shared semantic constants without leaking secrets or filesystem logic into the renderer.
|
|
6
|
+
|
|
7
|
+
## Modern Electron security & architecture baseline
|
|
8
|
+
|
|
9
|
+
Never weaken Electron's process boundary for convenience. Enforce these defaults on every `BrowserWindow` and embedded `WebContentsView`:
|
|
10
|
+
|
|
11
|
+
- **Strict renderer isolation**: `contextIsolation: true`, `sandbox: true`, `nodeIntegration: false`, exposing only a minimal, typed preload surface via **`contextBridge.exposeInMainWorld`**.
|
|
12
|
+
- **Typed IPC & streaming**: use **`ipcMain.handle`** / **`ipcRenderer.invoke`** for request/response with structured error propagation, and **`MessagePortMain`** for high-throughput renderer↔worker streaming.
|
|
13
|
+
- **`WebContentsView`** (replaces deprecated `BrowserView`): embed split web surfaces or multi-tab views cleanly inside a `BaseWindow` / `BrowserWindow`.
|
|
14
|
+
- **`protocol.handle`**: serve local/custom-scheme assets via standard Fetch `Request`/`Response` handlers (replaces deprecated `registerFileProtocol`).
|
|
15
|
+
- **`utilityProcess.fork`**: offload heavy CPU work, SQLite/indexing, or native addons out of the main process so window dragging, menus, and IPC never stall.
|
|
16
|
+
- **Credentials & hardening**: encrypt local tokens/secrets with **`safeStorage`** (OS keychain/DPAPI/libsecret) and lock production binaries with **`@electron/fuses`** (disable `RunAsNode`, disable `EnableNodeOptionsEnvironmentVariable`, enable ASAR integrity verification).
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
// main.ts — zero white flash on dark cold start + strict sandbox + native backdrop
|
|
20
|
+
const win = new BrowserWindow({
|
|
21
|
+
width: 1200,
|
|
22
|
+
height: 800,
|
|
23
|
+
minWidth: 720,
|
|
24
|
+
minHeight: 500,
|
|
25
|
+
show: false,
|
|
26
|
+
backgroundColor: '#111318',
|
|
27
|
+
vibrancy: process.platform === 'darwin' ? 'sidebar' : undefined,
|
|
28
|
+
backgroundMaterial: process.platform === 'win32' ? 'mica' : undefined,
|
|
29
|
+
titleBarStyle: process.platform === 'darwin' ? 'hiddenInset' : 'hidden',
|
|
30
|
+
titleBarOverlay: process.platform !== 'darwin' ? { height: 42, symbolColor: '#e5e7eb', color: '#00000000' } : undefined,
|
|
31
|
+
webPreferences: {
|
|
32
|
+
preload: path.join(__dirname, 'preload.js'),
|
|
33
|
+
contextIsolation: true,
|
|
34
|
+
sandbox: true,
|
|
35
|
+
nodeIntegration: false,
|
|
36
|
+
spellcheck: true,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
win.once('ready-to-show', () => win.show());
|
|
41
|
+
ipcMain.handle('doc:save', async (_evt, payload: SaveRequest) => saveDocumentAtomically(payload));
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## The 8 WebView Giveaway Killers, Mica/vibrancy & native DnD
|
|
45
|
+
|
|
46
|
+
Eliminate every browser tell on Electron & Electrobun windows (budgeting **`< 1.0–1.2 s` cold start**, **`~0%` idle CPU** when minimized/unfocused, and explicitly justifying Electron's memory footprint in the brief):
|
|
47
|
+
|
|
48
|
+
1. **`cursor: default`** on all buttons, tabs, sidebar items, and chrome (`cursor: pointer` only on external `https://` links).
|
|
49
|
+
2. **`user-select: none`** across toolbars, sidebars, tabs, menus, and buttons (selectable strictly inside editors, tables, and log panes).
|
|
50
|
+
3. **Block browser shortcuts & menus in production**: remove default `View → Reload / Toggle Developer Tools` accelerators in packaged builds (`!app.isPackaged`), call `webContents.setVisualZoomLevelLimits(1, 1)` to disable accidental pinch-zoom, set `overscroll-behavior: none`, and wire native `Menu.buildFromTemplate(...).popup()` on `context-menu` instead of raw Chromium inspect menus.
|
|
51
|
+
4. **Zero white flash (`show: false` + `backgroundColor`)**: initialize `BrowserWindow` hidden with the active theme's background color and reveal on `ready-to-show`.
|
|
52
|
+
5. **Custom `40–52 px` titlebar & fullscreen traffic-light inset**: pair `titleBarOverlay` (Windows/Linux Snap Layouts preserved) and `titleBarStyle: 'hiddenInset'` (macOS **`72–80 px` left inset**, collapsed to standard padding on `enter-full-screen` / `leave-full-screen`) with `-webkit-app-region: drag` on the bar and `-webkit-app-region: no-drag` on every interactive child.
|
|
53
|
+
6. **Native backdrops + inactive-window dimming**: pair `backgroundMaterial: 'mica'` / `vibrancy` (with opaque fallback for High Contrast / Reduce Transparency) with `focus`/`blur` window classes (`:window-inactive` / `[data-window-focused="false"]`) that soften sidebar/titlebar contrast on unfocused windows.
|
|
54
|
+
7. **Two-way native file drag-and-drop & dialogs**: accept inbound file drops via `webUtils.getPathForFile(file)` in preload with clear drop-zone states, support **outbound drag to Finder/Explorer** via `event.sender.startDrag({ file, icon })`, and use `dialog.showOpenDialog` / `showSaveDialog`.
|
|
55
|
+
8. **Native OS menu bar, `Cmd`/`Ctrl` modifiers & single-instance deep links**: set `Menu.setApplicationMenu(...)` (`App/File/Edit/View/Window/Help`), acquire `app.requestSingleInstanceLock()`, and route `second-instance` + `open-url` deep links cleanly.
|
|
56
|
+
|
|
57
|
+
## Electron vs Tauri vs Electrobun decision matrix
|
|
58
|
+
|
|
59
|
+
**Electrobun** pairs **Bun** (fast JS/TS runtime) + **Zig** native bindings + the **system WebView** (WKWebView / WebView2 / WebKitGTK) as a lightweight TypeScript-first desktop alternative when Electron's Chromium bundle size (~100 MB+) is unacceptable and you prefer TS/Zig over Rust (Tauri):
|
|
60
|
+
|
|
61
|
+
| Runtime | Footprint & cold start | Renderer consistency | Native backend | Best fit |
|
|
62
|
+
|---|---|---|---|---|
|
|
63
|
+
| **Electron** | ~100–150 MB (`< 1.0–1.2 s` cold start; justify RAM in brief) | Identical Chromium/WebGPU across Windows, macOS, Linux | Node.js + `utilityProcess` + native addons | Complex editors/IDEs needing guaranteed Chromium parity, `WebContentsView`, and mature ecosystem |
|
|
64
|
+
| **Tauri v2** | ~3–10 MB (`< 300–500 ms` cold start) | Varies by OS WebView (WKWebView / WebView2 / WebKitGTK) | Rust (`#[tauri::command]`, `Channel`) | Lightweight security-first desktop + mobile apps with Rust backend |
|
|
65
|
+
| **Electrobun** | ~12–20 MB (`< 300–500 ms` cold start) | Varies by OS WebView | Bun TS + Zig FFI | Teams wanting ultra-fast Bun TS tooling, tiny binaries, and fast differential updates without writing Rust |
|
|
66
|
+
|
|
67
|
+
## Storage, 2026 signing & accessibility idioms
|
|
68
|
+
|
|
69
|
+
- **OS paths & atomic writes**: store data strictly under `app.getPath('userData')` / `app.getPath('logs')` using atomic `temp → fsync → rename` writes and SQLite `WAL` mode inside a `utilityProcess` ([working-context.md](working-context.md)).
|
|
70
|
+
- **2026 signing & auto-update**: notarize macOS builds (`@electron/notarize` / `notarytool` + `stapler`); sign Windows releases via **Azure Artifact Signing** or HSM Authenticode (remembering EV certs no longer bypass SmartScreen instantly—maintain consistent CI publisher reputation); verify cryptographically signed delta updates in background and roll back on startup crash.
|
|
71
|
+
- **Accessibility**: bundle offline fonts, honor `prefers-reduced-motion`, clamp multi-monitor bounds across mixed-DPI (`100%` ↔ `200%`) `screen.getAllDisplays()` work areas, guard `close` on dirty documents, and verify `VoiceOver`, `NVDA`/`JAWS`/`Narrator`, and `Orca`.
|
|
72
|
+
|
|
73
|
+
## Do/don't pairs
|
|
74
|
+
|
|
75
|
+
| Do | Don't |
|
|
76
|
+
|---|---|
|
|
77
|
+
| `contextIsolation: true`, `sandbox: true`, narrow `contextBridge` API | Enable `nodeIntegration: true` or expose raw `ipcRenderer.send` to renderer |
|
|
78
|
+
| Launch `show: false` + dark `backgroundColor` + `cursor: default` + `user-select: none` + block prod `Cmd/Ctrl+R` | Flash white on dark start, show hand cursors on chrome, or leave `Ctrl+R`/Inspect Element active in production |
|
|
79
|
+
| Use `WebContentsView`, `protocol.handle`, `utilityProcess.fork`, `webUtils.getPathForFile`, and `startDrag` | Block main thread with sync `fs`/SQLite or ship one-way browser `<input type="file">` pickers |
|
|
80
|
+
| Encrypt tokens with `safeStorage`, lock `@electron/fuses`, and store files in `userData` atomically | Store plaintext OAuth tokens in `localStorage` or write non-atomic files beside the binary |
|
|
81
|
+
| Use `titleBarOverlay` (Windows) and `72–80 px` macOS inset (collapsing on fullscreen) + inactive dimming | Cover macOS traffic lights, swallow button clicks in `-webkit-app-region: drag`, or break Snap Layouts |
|
|
82
|
+
| Clamp restored window bounds against mixed-DPI `screen.getAllDisplays()` work areas | Restore windows off-screen after an external monitor is disconnected |
|
|
83
|
+
|
|
84
|
+
## Known traps
|
|
85
|
+
|
|
86
|
+
Disabling `sandbox`/`contextIsolation`, white flash from omitting `show: false` + `backgroundColor`, leaving `Cmd/Ctrl+R` reload enabled in packaged builds, forgetting to collapse macOS `72–80 px` traffic-light padding in fullscreen, blocking main process instead of `utilityProcess`, restoring invalid multi-monitor coordinates, assuming EV certificates bypass Windows SmartScreen immediately.
|
|
87
|
+
|
|
88
|
+
## Verification commands
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
npm run lint
|
|
92
|
+
npm run test -- --run
|
|
93
|
+
npm run build
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Lint, unit tests, and bundle builds are `static` evidence. Run packaged, signed builds (with `@electron/fuses` applied) on real macOS, Windows, and Linux hosts to verify `< 1.2 s` cold start, `~0%` idle CPU, all 8 WebView giveaway killers, `titleBarOverlay`/Mica, screen readers (`VoiceOver`/`NVDA`/`Narrator`/`Orca`), mixed-DPI multi-monitor restore, and dirty-close recovery for `rendered` evidence; label untested OSes `not-checked`.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Go GUI: Wails (v2 / v3), Fyne, and Gio
|
|
2
|
+
|
|
3
|
+
## Toolkit comparison & idioms
|
|
4
|
+
|
|
5
|
+
| Toolkit | Rendering model | Key 2025–2026 idioms | Best fit |
|
|
6
|
+
|---|---|---|---|
|
|
7
|
+
| **Wails v3** (and **v2**) | OS WebView + Go backend | **v3**: multi-window (`app.Window.NewWithOptions`), native application menus & system tray (`app.NewSystemTray`), `application.NewService(...)` generated TS bindings, `wails3` CLI. (**v2**: single-window `wails build` for existing repos.) | Web-UI desktop apps with a fast Go backend and small binaries |
|
|
8
|
+
| **Fyne (v2.5 / v2.6+)** | Native Go OpenGL/Canvas retained widgets | Custom `fyne.Theme`, reactive `fyne.io/fyne/v2/data/binding`, `app.Preferences()` persistence, `widget.NewList` virtualization | Pure-Go cross-platform desktop/mobile utilities without WebView |
|
|
9
|
+
| **Gio (`gioui.org`)** | Immediate-mode GPU (`layout.Context`, `material.Theme`) | Frame-local `layout.Flex` / `layout.Inset`, explicit `op.Ops`, high-FPS custom vector/tool rendering | Custom Go graphics/engineering tools where immediate-mode control dominates |
|
|
10
|
+
|
|
11
|
+
## Token mapping & idiomatic Go snippets
|
|
12
|
+
|
|
13
|
+
- **Wails v3**: map DTCG tokens into CSS custom properties inside the frontend while mirroring window background, native menus, and tray icon states in Go:
|
|
14
|
+
|
|
15
|
+
```go
|
|
16
|
+
// Wails v3 multi-window + service + system tray setup
|
|
17
|
+
app := application.New(application.Options{
|
|
18
|
+
Name: "InvoiceDesk",
|
|
19
|
+
Services: []application.Service{application.NewService(&InvoiceService{})},
|
|
20
|
+
})
|
|
21
|
+
win := app.Window.NewWithOptions(application.WebviewWindowOptions{
|
|
22
|
+
Title: "Invoices",
|
|
23
|
+
Width: 1120,
|
|
24
|
+
Height: 760,
|
|
25
|
+
MinWidth: 720,
|
|
26
|
+
MinHeight: 500,
|
|
27
|
+
})
|
|
28
|
+
tray := app.SystemTray.New()
|
|
29
|
+
tray.AttachWindow(win).WindowOffset(5)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- **Fyne v2.5/v2.6+**: centralize tokens inside a custom `fyne.Theme` implementation (`Color(name, variant)`, `Size(name)`), bind UI controls reactively with `data/binding` (`binding.NewString()`, `binding.NewFloat()`), and persist user/window preferences via `app.Preferences()`:
|
|
33
|
+
|
|
34
|
+
```go
|
|
35
|
+
status := binding.NewString()
|
|
36
|
+
_ = status.Set("Ready")
|
|
37
|
+
label := widget.NewLabelWithData(status)
|
|
38
|
+
themePref := myApp.Preferences().StringWithFallback("theme", "system")
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- **Gio**: centralize semantic `color.NRGBA` and spacing constants in a Go theme package consumed by `layout.Context` builders rather than scattering inline RGBA structs across frame functions.
|
|
42
|
+
|
|
43
|
+
## Layout, WebView giveaway killers (Wails), & reduced motion
|
|
44
|
+
|
|
45
|
+
- **Wails (all 8 WebView Giveaway Killers)**: configure `Hidden: true` + theme-matched `BackgroundColour` on `WebviewWindowOptions` (showing on ready to eliminate dark-mode white flash), enforce `cursor: default` and `user-select: none` on UI chrome, disable production browser `contextmenu` / `Cmd/Ctrl+R` reload / rubber-band overscroll, mark `40–52 px` headers with `--wails-draggable: drag` (`no-drag` on buttons, `72–80 px` macOS traffic-light inset collapsed on fullscreen), apply native macOS vibrancy / Windows `Mica` + unfocused window dimming, wire native file drop (`EnableFileDrop: true`) + native open/save dialogs, and register native `App/File/Edit/View/Window/Help` menus + single-instance deep-link activation ([tauri.md](tauri.md), [working-context.md](working-context.md)).
|
|
46
|
+
- **Fyne**: compose with `container.NewBorder`, `NewHSplit`, `NewGridWithColumns`, and virtualized `widget.NewList`/`NewTable`; never create thousands of `widget.Label` widgets eagerly inside a `VBox`.
|
|
47
|
+
- **Gio**: derive layout cleanly from `gtx.Constraints` every frame and respect `gtx.Metric` (`Dp`/`Sp`) for HiDPI and font scaling.
|
|
48
|
+
- Register bundled font assets explicitly and test CJK/RTL shaping and glyph fallback across OSes. Honor `prefers-reduced-motion` in Wails WebViews; in Fyne and Gio, expose an app-level reduced-motion preference when OS preference hooks are absent and tie any timer/animation goroutines to `context.Context` cancellation (`~0%` idle CPU when unfocused/minimized).
|
|
49
|
+
|
|
50
|
+
## Accessibility, atomic storage, & states
|
|
51
|
+
|
|
52
|
+
- **Wails**: accessibility relies on semantic HTML/ARIA inside the WebView plus native OS menu/shortcut/dialog verification (`VoiceOver`, `NVDA`/`Narrator`, `Orca`).
|
|
53
|
+
- **Fyne**: implement `fyne.Accessible` (`AccessibilityLabel`, `AccessibilityRole`) where supported, keep keyboard focus (`fyne.Focusable`) explicit, and verify actual VoiceOver/Narrator/Orca coverage honestly—do not assume parity with native OS toolkits.
|
|
54
|
+
- **Gio**: custom GPU rendering has limited built-in screen-reader support; do not select Gio for screen-reader-mandated productivity software without an explicit accessibility bridge, and mark untested assistive-tech support `not-checked`.
|
|
55
|
+
- **OS paths & atomic writes**: store config/data under `os.UserConfigDir()` / `os.UserCacheDir()` (never next to the binary), write files via temp file + `f.Sync()` + `os.Rename()`, and run SQLite in `WAL` mode ([working-context.md](working-context.md)). Cancel background goroutines via `context.Context`, guard dirty-document close events, and update Fyne/Gio UI safely on the toolkit's UI queue (`fyne.Do(...)` in Fyne v2.6+ / `window.Invalidate()` in Gio).
|
|
56
|
+
|
|
57
|
+
## Do/don't pairs
|
|
58
|
+
|
|
59
|
+
| Do | Don't |
|
|
60
|
+
|---|---|
|
|
61
|
+
| Use Wails v3 `application.NewService` + native menus + `Hidden: true` dark launch + all 8 WebView giveaway killers | Ship a single-window WebView SPA that flashes white, shows `cursor: pointer` on chrome, or reloads on `Ctrl+R` |
|
|
62
|
+
| Use Fyne `data/binding`, `app.Preferences()`, and `fyne.Do(...)` from goroutines | Mutate Fyne widgets directly from background goroutines without synchronization |
|
|
63
|
+
| Store config in `os.UserConfigDir()` with `temp → f.Sync() → os.Rename()` + SQLite `WAL` | Write state beside the executable or truncate user files in place |
|
|
64
|
+
| Use `widget.NewList` / `NewTable` in Fyne for large datasets | Append 2,000 rows directly into `container.NewVBox` |
|
|
65
|
+
| Pass `context.Context` into background work and cancel on close/navigation | Leak orphaned goroutines that burn idle CPU or mutate stale window state |
|
|
66
|
+
| Verify actual screen-reader support per toolkit honestly | Claim VoiceOver/Narrator compliance for Gio/Fyne purely because `go build` passed |
|
|
67
|
+
|
|
68
|
+
## Known traps
|
|
69
|
+
|
|
70
|
+
CGO cross-compilation friction in Fyne (OpenGL/OS bindings) vs pure-Go/WebView builds, mutating Fyne UI off the main thread (causing races before `fyne.Do`), Wails v2 vs v3 API confusion (`wails` vs `wails3` CLI), OS WebView differences in Wails (WKWebView vs WebView2 vs WebKitGTK), missing font fallbacks in Gio/Fyne, uncancelled goroutines on window close.
|
|
71
|
+
|
|
72
|
+
## Verification commands
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
go test ./...
|
|
76
|
+
go vet ./...
|
|
77
|
+
go run .
|
|
78
|
+
# Run the packaging command matching your toolkit when installed:
|
|
79
|
+
wails3 build # Wails v3 projects (use `wails build` for Wails v2)
|
|
80
|
+
fyne package # Fyne projects
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`go test` and `go vet` provide `static` / logic evidence. Run packaged builds on target desktop OSes to verify window chrome, tray/menus, resize/HiDPI, keyboard navigation, screen readers (where supported), and dirty-close cancellation for `rendered` evidence; label untested OSes `not-checked`.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# GTK 4 & libadwaita
|
|
2
|
+
|
|
3
|
+
## Token mapping & `AdwStyleManager` / `AdwAccentColor`
|
|
4
|
+
|
|
5
|
+
Prefer libadwaita 1.4–1.8 semantic CSS variables (`--window-bg-color`, `--view-bg-color`, `--accent-bg-color`, `--accent-color`, `--destructive-bg-color`) and built-in style classes (`suggested-action`, `destructive-action`, `boxed-list`, `card`, `dimmed`) over hard-coded hex values so dark mode, high contrast, and system accent colors work automatically.
|
|
6
|
+
|
|
7
|
+
- Inspect **`AdwStyleManager`** (`style_manager.get_dark()`, `get_high_contrast()`, `set_color_scheme(ADW_COLOR_SCHEME_DEFAULT)`) and **`AdwAccentColor`** (libadwaita 1.6+, reflecting desktop accent preferences via `AdwStyleManager:accent-color`).
|
|
8
|
+
- Scope custom application tokens in one CSS resource loaded at `GTK_STYLE_PROVIDER_PRIORITY_APPLICATION` so user accessibility themes still override when needed.
|
|
9
|
+
|
|
10
|
+
## Modern GTK4 / libadwaita 1.4–1.8 widgets & Blueprint (`.blp`)
|
|
11
|
+
|
|
12
|
+
Replace deprecated GTK3 and early libadwaita widgets (`AdwLeaflet`, `AdwFlap`, `AdwSqueezer`, `GtkMessageDialog`, `AdwMessageDialog`) with modern adaptive primitives:
|
|
13
|
+
|
|
14
|
+
- **`AdwNavigationSplitView`** + **`AdwBreakpoint`**: automatically collapses sidebar + content into a stacked navigation view below your chosen width threshold (`max-width: 600sp`).
|
|
15
|
+
- **`AdwDialog` / `AdwAlertDialog`**: adaptive dialogs that present as centered overlays on desktop and bottom sheets on narrow/mobile Linux form factors.
|
|
16
|
+
- **`AdwStatusPage`**: structured empty, loading, error, and onboarding states with icon, title, description, and action button.
|
|
17
|
+
- **Blueprint (`.blp`)**: prefer Blueprint compiler syntax over verbose hand-written GtkBuilder XML for readable, type-checked declarative UI:
|
|
18
|
+
|
|
19
|
+
```blp
|
|
20
|
+
using Gtk 4.0;
|
|
21
|
+
using Adw 1;
|
|
22
|
+
|
|
23
|
+
template $InvoiceWindow : Adw.ApplicationWindow {
|
|
24
|
+
default-width: 960;
|
|
25
|
+
default-height: 640;
|
|
26
|
+
width-request: 360;
|
|
27
|
+
|
|
28
|
+
Adw.Breakpoint {
|
|
29
|
+
condition ("max-width: 600sp")
|
|
30
|
+
setters { split_view.collapsed: true; }
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
content: Adw.NavigationSplitView split_view {
|
|
34
|
+
sidebar: Adw.NavigationPage { title: _("Folders"); child: Gtk.ListBox {}; };
|
|
35
|
+
content: Adw.NavigationPage {
|
|
36
|
+
title: _("Invoices");
|
|
37
|
+
child: Adw.StatusPage {
|
|
38
|
+
icon-name: "document-open-symbolic";
|
|
39
|
+
title: _("No Invoices Yet");
|
|
40
|
+
description: _("Create an invoice or import a CSV.");
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Wayland, XDG paths, atomic storage, & Linux packaging
|
|
48
|
+
|
|
49
|
+
- **Wayland has no global window positioning**: Wayland intentionally prevents apps from querying or setting absolute `(x, y)` desktop coordinates. Persist `default-width`, `default-height`, and `maximized` state only; use `AdwDialog`, `GtkPopover`, and `transient-for` relationships rather than manual screen coordinate math, and preserve libadwaita's `:backdrop` unfocused headerbar/sidebar dimming so multi-window focus stays clear.
|
|
50
|
+
- **XDG Desktop Portals & Flatpak**: use portal-backed GTK4 APIs (`GtkFileDialog`, `GtkUriLauncher`, `GtkFileLauncher`, `GNotification`, `GtkDropTarget` / `GdkDrag` two-way file DnD) or `libportal` / Rust `ashpd` so file open/save, print, notifications, and dark-mode settings work cleanly inside Flatpak sandboxes without broad `--filesystem=home` permissions.
|
|
51
|
+
- **XDG Base Directories & atomic writes**: store config in `g_get_user_config_dir()` (`$XDG_CONFIG_HOME`), persistent data/SQLite (`WAL` mode) in `g_get_user_data_dir()` (`$XDG_DATA_HOME`), state in `g_get_user_state_dir()` (`$XDG_STATE_HOME`), and caches in `g_get_user_cache_dir()` (`$XDG_CACHE_HOME`). Write files atomically via `g_file_set_contents_full(..., G_FILE_SET_CONTENTS_CONSISTENT, ...)` (temp file + `fsync` + atomic `rename`).
|
|
52
|
+
- **Linux packaging & signing**: distribute `.deb`/`.rpm`, **Flatpak** (Flathub manifest), and/or GPG-signed **AppImage** accompanied by validated `.desktop` + **AppStream metainfo XML** (`appstreamcli validate --pedantic` + `desktop-file-validate`).
|
|
53
|
+
|
|
54
|
+
## States, `close-request`, & async main-loop discipline
|
|
55
|
+
|
|
56
|
+
GTK4 replaced GTK3's removed `delete-event` with the **`close-request`** signal on `GtkWindow`. Return `true` (`GDK_EVENT_STOP`) to defer closing while presenting an `AdwAlertDialog` for unsaved documents:
|
|
57
|
+
|
|
58
|
+
```c
|
|
59
|
+
static gboolean on_close_request(GtkWindow *win, gpointer user_data) {
|
|
60
|
+
if (!app_has_unsaved_changes(user_data)) return FALSE; // allow close
|
|
61
|
+
show_unsaved_changes_dialog(win, user_data);
|
|
62
|
+
return TRUE; // hold window open until user decides
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Never block the GLib main loop (`GMainContext`) with synchronous disk or network I/O; run work via `GTask` / `GIO` async APIs (or Rust `gio::spawn_blocking` / Python `GLib.idle_add` handoff) with `GCancellable` cancellation, `< 300 ms` cold start, and `~0%` idle CPU.
|
|
67
|
+
|
|
68
|
+
## Typography, motion, accessibility, & forms idioms
|
|
69
|
+
|
|
70
|
+
Use Pango text layout with semantic style classes (`title-1`, `heading`, `body`, `caption`); always escape dynamic user strings with `g_markup_escape_text` before passing into Pango markup. Honor `gtk-enable-animations` (`GtkSettings`) for custom motion—libadwaita animations honor it automatically.
|
|
71
|
+
|
|
72
|
+
Use `GtkAccessible` properties (`GTK_ACCESSIBLE_PROPERTY_LABEL`, `DESCRIPTION`), keyboard shortcuts (`GtkShortcutController` + `AdwShortcutsDialog`), mnemonics (`_Save`), and `AdwEntryRow` / `AdwComboRow` / `AdwSwitchRow` inside `AdwPreferencesGroup` for clean, accessible forms. Verify with **Orca** (AT-SPI2) screen reader, keyboard-only traversal, and High Contrast mode.
|
|
73
|
+
|
|
74
|
+
## Do/don't pairs
|
|
75
|
+
|
|
76
|
+
| Do | Don't |
|
|
77
|
+
|---|---|
|
|
78
|
+
| Connect `GtkWindow::close-request` to prompt on dirty documents | Reference removed GTK3 `delete-event` or lose edits on window close |
|
|
79
|
+
| Use `AdwNavigationSplitView` + `AdwBreakpoint` + `AdwDialog` + `:backdrop` dimming | Use deprecated `AdwLeaflet`, `GtkMessageDialog`, or override `:backdrop` unfocused states |
|
|
80
|
+
| Use `GtkFileDialog` / XDG Portals + XDG Base Dirs + `G_FILE_SET_CONTENTS_CONSISTENT` atomic saves | Request unrestricted `--filesystem=host` or write dotfiles directly into `$HOME` |
|
|
81
|
+
| Persist `width`/`height`/`maximized` on Wayland and validate AppStream/`.desktop` metadata | Attempt to save/restore global `(x, y)` coordinates on Wayland or ship invalid `.metainfo.xml` |
|
|
82
|
+
| Escape dynamic strings with `g_markup_escape_text` before Pango markup | Interpolate raw filenames into `<b>%s</b>` markup strings |
|
|
83
|
+
|
|
84
|
+
## Known traps
|
|
85
|
+
|
|
86
|
+
Blocking `GMainContext` during I/O, using deprecated GTK3/libadwaita 1.0 APIs, breaking Flatpak sandboxes instead of using portals, assuming X11 global window positioning under Wayland, hard-coding light colors that fail `AdwStyleManager` High Contrast, custom `GtkDrawingArea` widgets missing `GtkAccessible` roles/labels.
|
|
87
|
+
|
|
88
|
+
## Verification commands
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
meson test -C build
|
|
92
|
+
desktop-file-validate data/*.desktop
|
|
93
|
+
appstreamcli validate --no-net data/*.metainfo.xml
|
|
94
|
+
GTK_DEBUG=interactive ./build/your-app
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Build, metadata validation, and unit tests are `static` evidence. Inspect live GTK Inspector (`GTK_DEBUG=interactive`), Wayland/tiling resize across breakpoints, Dark & High Contrast themes, **Orca** AT-SPI screen reader, keyboard-only navigation, and Flatpak sandbox portal behavior for `rendered` evidence; label untested desktop environments `not-checked`.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Java desktop: JavaFX (22+) and Swing (FlatLaf)
|
|
2
|
+
|
|
3
|
+
## Token mapping & modern theming
|
|
4
|
+
|
|
5
|
+
- **JavaFX**: map DTCG semantic tokens to CSS custom properties in an application stylesheet (`.root { -pc-action: #0074ca; }`) or adopt **AtlantaFX** (`PrimerLight`, `PrimerDark`, `NordLight`, `NordDark`, `CupertinoLight`, `CupertinoDark`) which builds modern desktop themes cleanly on semantic CSS variables.
|
|
6
|
+
- **Swing**: adopt **FlatLaf** (`FlatLightLaf`, `FlatDarkLaf`, `FlatMacLightLaf`, `FlatMacDarkLaf`) rather than legacy Metal/Nimbus Look-and-Feels. FlatLaf provides crisp HiDPI vector icons, modern dark/light themes, native macOS/Windows titlebar integration, and semantic UI defaults via `FlatLaf.setGlobalExtraDefaults(...)` / `.properties` files.
|
|
7
|
+
|
|
8
|
+
```java
|
|
9
|
+
// Swing + FlatLaf modern theme initialization (before constructing any Swing frames):
|
|
10
|
+
FlatLaf.setGlobalExtraDefaults(Map.of("@accentColor", "#0074CA"));
|
|
11
|
+
FlatLightLaf.setup(); // or FlatDarkLaf.setup() / FlatMacDarkLaf.setup()
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Never scatter inline `-fx-background-color` strings or per-component `new Color(...)` literals across views.
|
|
15
|
+
|
|
16
|
+
## JavaFX 22+ `Platform.Preferences` (system dark mode, accent, reduced motion)
|
|
17
|
+
|
|
18
|
+
JavaFX 22+ natively exposes OS theme, accent color, reduced motion, and reduced transparency preferences through **`Platform.getPreferences()`**—observe these properties directly instead of guessing with OS-specific hacks:
|
|
19
|
+
|
|
20
|
+
```java
|
|
21
|
+
import javafx.application.ColorScheme;
|
|
22
|
+
import javafx.application.Platform;
|
|
23
|
+
import atlantafx.base.theme.PrimerDark;
|
|
24
|
+
import atlantafx.base.theme.PrimerLight;
|
|
25
|
+
|
|
26
|
+
var prefs = Platform.getPreferences();
|
|
27
|
+
Runnable syncTheme = () -> {
|
|
28
|
+
boolean dark = prefs.getColorScheme() == ColorScheme.DARK;
|
|
29
|
+
Application.setUserAgentStylesheet(
|
|
30
|
+
dark ? new PrimerDark().getUserAgentStylesheet()
|
|
31
|
+
: new PrimerLight().getUserAgentStylesheet()
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
syncTheme.run();
|
|
35
|
+
prefs.colorSchemeProperty().addListener((obs, oldVal, newVal) -> syncTheme.run());
|
|
36
|
+
// Also inspect prefs.reducedMotionProperty() and prefs.accentColorProperty()
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Layout, typography, & motion idioms
|
|
40
|
+
|
|
41
|
+
- **JavaFX**: use scene-graph layout panes (`BorderPane`, `VBox`, `HBox`, `GridPane`, `SplitPane`, `VirtualFlow`/`ListView`) with explicit `minWidth`/`minHeight`, resize persistence, and multi-monitor bounds clamping.
|
|
42
|
+
- **Swing**: always use layout managers (`BorderLayout`, `GridBagLayout`, `MigLayout`, `JSplitPane`)—never absolute `setBounds(...)` pixel placement.
|
|
43
|
+
- Register bundled TTF/OTF fonts (`Font.loadFont` in JavaFX; `GraphicsEnvironment.registerFont` in Swing) and verify fractional HiDPI rendering (`125%`/`150%`/`200%`), glyph fallback, and localized text expansion.
|
|
44
|
+
- Bind JavaFX `Timeline`/`Transition` duration or skip non-essential motion when `Platform.getPreferences().isReducedMotion()` is `true`; cancel Swing `Timer` and JavaFX animations on view close.
|
|
45
|
+
|
|
46
|
+
## Accessibility, states, & forms idioms
|
|
47
|
+
|
|
48
|
+
- **JavaFX**: built-in controls expose native OS accessibility trees; for custom `Node`/`Pane` controls, always set `setAccessibleRole(AccessibleRole.BUTTON)` and `setAccessibleText(...)` (plus `setAccessibleHelp(...)` sparingly).
|
|
49
|
+
- **Swing**: set `JLabel.setLabelFor(field)`, `getAccessibleContext().setAccessibleName(...)`, keyboard mnemonics (`setMnemonic`), and accelerators (`KeyStroke`).
|
|
50
|
+
- Never block the **JavaFX Application Thread** or **Swing EDT (Event Dispatch Thread)** with disk, database, or network I/O: use `javafx.concurrent.Task` / `Service` or `SwingWorker` / virtual threads with explicit cancellation and `Platform.runLater` / `SwingUtilities.invokeLater` handoff. Guard `setOnCloseRequest` / `WindowListener.windowClosing` for unsaved documents.
|
|
51
|
+
|
|
52
|
+
## Native packaging (`jlink` & `jpackage`)
|
|
53
|
+
|
|
54
|
+
Do not ask end users to install a matching system JDK manually. Build a stripped runtime image with `jlink` and package native signed OS installers/bundles with **`jpackage`** (`.dmg`/`.pkg` on macOS, `.msi`/`.exe` on Windows, `.deb`/`.rpm` on Linux) including app icons, file associations, and launcher metadata.
|
|
55
|
+
|
|
56
|
+
## Do/don't pairs
|
|
57
|
+
|
|
58
|
+
| Do | Don't |
|
|
59
|
+
|---|---|
|
|
60
|
+
| Observe JavaFX 22+ `Platform.getPreferences()` for dark mode, accent, and reduced motion | Hard-code a light-only stylesheet or ignore system reduced motion |
|
|
61
|
+
| Use **AtlantaFX** (JavaFX) or **FlatLaf** (Swing) with semantic variables/defaults | Ship legacy 2000s Metal/Caspian themes or inline hex strings everywhere |
|
|
62
|
+
| Set `AccessibleRole` + `accessibleText` / `JLabel.setLabelFor` on controls | Use a clickable `Pane` or `JPanel` with no keyboard focus or screen-reader name |
|
|
63
|
+
| Run I/O in `Task`/`SwingWorker` off the FX thread / EDT with cancellation | Freeze the window by calling HTTP/SQL synchronously inside an `ActionListener` |
|
|
64
|
+
| Bundle self-contained native installers with `jlink` + `jpackage` | Ship a bare `.jar` requiring users to configure `JAVA_HOME` |
|
|
65
|
+
|
|
66
|
+
## Known traps
|
|
67
|
+
|
|
68
|
+
Blocking the FX Application Thread or Swing EDT, leaking strong listeners on `Platform.getPreferences()` or observable properties across closed windows, blurry bitmap icons under Windows `150%` scaling (use SVG/FlatSVGIcon or multi-resolution images), `setBounds` clipping localized strings, Swing/JavaFX interop (`JFXPanel`) focus/DPI bugs, missing macOS notarization or Windows signing on `jpackage` bundles.
|
|
69
|
+
|
|
70
|
+
## Verification commands
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
# Run the build tool configured in the repository (Maven or Gradle):
|
|
74
|
+
./mvnw verify
|
|
75
|
+
./gradlew test build
|
|
76
|
+
./gradlew run
|
|
77
|
+
# Packaging smoke test (requires JDK 21+ with jpackage):
|
|
78
|
+
jpackage --type app-image --name App --input build/libs --main-jar app.jar
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`verify`/`test`/`build` provide `static` / logic evidence. Run the launched desktop app (and `jpackage` bundle) on target OSes across Light/Dark/High Contrast modes, fractional HiDPI, keyboard-only Tab/mnemonic traversal, VoiceOver/Narrator/Orca, and dirty-close recovery for `rendered` evidence; label untested OSes `not-checked`.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Qt 6 / PySide6 / QML
|
|
2
|
+
|
|
3
|
+
Use this reference for **Qt 6, PySide6 (official Python bindings), Qt Quick / QML, and Kirigami**. For C++ CMake build chains, wxWidgets, FLTK 1.4, Dear ImGui, and lightweight C/Zig desktop GUIs, see `references/cpp-gui.md`.
|
|
4
|
+
|
|
5
|
+
## Token mapping, `styleHints.colorScheme`, & QSS caveat
|
|
6
|
+
|
|
7
|
+
- **Qt Quick / QML (preferred for bespoke & modern cross-platform UI)**: create a QML `pragma Singleton` theme object keyed to semantic roles and react directly to **`Application.styleHints.colorScheme`** (`Qt.ColorScheme.Dark` / `Light` / `Unknown` in Qt 6.5+):
|
|
8
|
+
|
|
9
|
+
```qml
|
|
10
|
+
pragma Singleton
|
|
11
|
+
import QtQuick
|
|
12
|
+
|
|
13
|
+
QtObject {
|
|
14
|
+
readonly property bool isDark: Application.styleHints.colorScheme === Qt.ColorScheme.Dark
|
|
15
|
+
readonly property color action: isDark ? "#5bb2ff" : "#0074ca"
|
|
16
|
+
readonly property color surface: isDark ? "#14161a" : "#ffffff"
|
|
17
|
+
readonly property int controlInline: 12
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- **Qt Quick Controls 2 native styles**: select native platform styles (`FluentWinUI3` on Windows 11, `macOS` on macOS, `Fusion`/`Basic` fallback on Linux) via `QQuickStyle.setStyle(...)` / `qtquickcontrols2.conf` so dialogs, scrollbars, and focus rings match the host OS. For adaptive Linux/KDE/convergent apps, layer **Kirigami** (`Kirigami.PageRow`, `Kirigami.Action`, `Kirigami.PlaceholderMessage`) on top of Qt Quick Controls 2.
|
|
22
|
+
- **Qt Widgets / PySide6 QSS warning**: **heavy `setStyleSheet(...)` (QSS) breaks native platform widget styles** (`QStyle` falls back to `QStyleSheetStyle`, stripping native Windows 11 Fluent animations, macOS Aqua chrome, focus rings, and system high-contrast palettes). Prefer **`QPalette`**, **`QApplication.styleHints().colorScheme()`**, and targeted sub-control overrides over full-app QSS rewrites; where QSS is unavoidable, preprocess semantic `@token` placeholders at build time because QSS has no runtime CSS variables.
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
from PySide6.QtCore import Qt
|
|
26
|
+
from PySide6.QtWidgets import QApplication
|
|
27
|
+
|
|
28
|
+
def is_system_dark(app: QApplication) -> bool:
|
|
29
|
+
return app.styleHints().colorScheme() == Qt.ColorScheme.Dark
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Layout, compilation (`qmltc`), & responsive idioms
|
|
33
|
+
|
|
34
|
+
- **Qt Widgets**: always use layout managers (`QVBoxLayout`, `QGridLayout`, `QFormLayout`, `QSplitter`) and `QSizePolicy`—never fixed geometry (`setGeometry`).
|
|
35
|
+
- **QML**: prefer `QtQuick.Layouts` (`RowLayout`, `ColumnLayout`, `GridLayout`) with `Layout.fillWidth` and explicit minimum window sizes. Use **`qmltc`** (QML Type Compiler) and `qmllint` on C++/Qt 6 projects to compile QML into C++ for startup performance and catch type/binding bugs statically.
|
|
36
|
+
- Handle fractional HiDPI scaling, multi-monitor DPI changes, and clamped window geometry restoration (`QSettings` / `restoreGeometry`).
|
|
37
|
+
|
|
38
|
+
## Typography, motion, & reduced motion
|
|
39
|
+
|
|
40
|
+
Load custom fonts via `QFontDatabase.addApplicationFont(...)` and verify platform fallback chains (CJK/RTL/emoji) and point-vs-pixel scaling. Keep QML `NumberAnimation` / `Behavior` and `QPropertyAnimation` brief and interruptible; because Qt does not expose one uniform cross-OS reduced-motion property across every desktop environment, query platform hooks or provide an explicit app-level reduced-motion preference so animations can be disabled cleanly.
|
|
41
|
+
|
|
42
|
+
## Accessibility, atomic `QSaveFile` storage, & states idioms
|
|
43
|
+
|
|
44
|
+
Use standard Qt/QML controls first (they implement `QAccessible` / platform UIA / NSAccessibility / AT-SPI peers automatically). Set `accessibleName` / `Accessible.name`, `Accessible.role`, `Accessible.description`, keyboard shortcuts (`QShortcut` / `Action`), mnemonics (`&Save`), and explicit `QWidget.setTabOrder` / `KeyNavigation` chains; verify with **`NVDA`/`JAWS`/`Narrator`**, **`VoiceOver`**, and **`Orca`**.
|
|
45
|
+
|
|
46
|
+
Never block the Qt GUI event loop (`QApplication.exec()`) with synchronous network or disk I/O—use `QThreadPool` + `QRunnable` / `QObject` worker signals (or Python `QtAsyncio` / `QProcess`) with cancellation, `< 400 ms` cold start, and `~0%` idle CPU when minimized. Resolve OS-standard directories via **`QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation / AppLocalDataLocation)`**, write user/config files atomically with **`QSaveFile`** (`open` → `write` → `commit()`, which performs `fsync` + atomic rename automatically), run local SQLite in `WAL` mode, clamp restored geometry (`QGuiApplication::screens()`) across mixed-DPI monitors ([working-context.md](working-context.md)), and intercept `closeEvent` to protect dirty documents. In forms, pair `QFormLayout` / labeled `TextField` controls with `QValidator` / post-edit validation text (not red borders alone) and preserve input on failed submits.
|
|
47
|
+
|
|
48
|
+
## PyQt6 & Qt Designer (`.ui` / `uic`)
|
|
49
|
+
|
|
50
|
+
- **PyQt6 vs PySide6**: both wrap Qt 6 with identical layout, palette, and `QAccessible` mechanics, but differ in licensing (PyQt6 is GPLv3/commercial; PySide6 is LGPLv3) and bindings (`pyqtSignal`/`pyqtSlot` + strict scoped enums like `Qt.AlignmentFlag.AlignCenter` in PyQt6 vs `Signal`/`Slot` in PySide6). Match whichever binding the repo already declares.
|
|
51
|
+
- **Qt Designer `.ui` workflow**: compile `.ui` forms ahead of time (`pyside6-uic form.ui -o ui_form.py` or `pyuic6`) for static typing and fast startup rather than runtime `QUiLoader` loading in packaged apps. **Never hand-edit generated `ui_*.py` files**—compose or subclass them (`self.ui = Ui_MainWindow(); self.ui.setupUi(self)`) so re-running `uic` never overwrites behavior. Inside Designer, always attach layout managers (`QVBoxLayout`/`QGridLayout`) and avoid pasting global QSS into root dialogs.
|
|
52
|
+
|
|
53
|
+
## Python desktop anti-lazy guard (`Tkinter` / `CustomTkinter` / `Dear PyGui`)
|
|
54
|
+
|
|
55
|
+
- **Do not default to plain `Tkinter` / `ttk` on greenfield Python desktop apps**: plain `Tkinter` ships dated widget chrome, inconsistent fractional HiDPI scaling, weak dark/high-contrast OS synchronization, and thin accessibility tooling. On greenfield projects, choose **PySide6 / Qt Quick**, **Flet**, **NiceGUI** (native mode), **Tauri** (with a Python sidecar), or **Textual** (for keyboard-first terminal utilities) instead.
|
|
56
|
+
- **Brownfield maintenance rules (`CustomTkinter` & `Dear PyGui`)**: when maintaining an existing app that already depends on `CustomTkinter` or `Dear PyGui`:
|
|
57
|
+
- **DPI & fonts**: enable OS DPI awareness on Windows, scale cleanly (`ctk.set_widget_scaling` / Dear PyGui `set_global_font_scale` + `dpg.add_font(...)` with a real TTF font instead of the default blurry bitmap font).
|
|
58
|
+
- **Non-blocking worker threads**: never perform HTTP, SQL, or ML work inside button callbacks or the Dear PyGui render loop—run work in a background `threading.Thread` / `ThreadPoolExecutor` and marshal UI updates safely back to the main thread (`queue.Queue` polled via `root.after(...)` in CustomTkinter, or thread-safe `dpg.set_value(...)` in Dear PyGui).
|
|
59
|
+
- **Theme sync & tokens**: sync `ctk.set_appearance_mode("System")` and centralize semantic `(light, dark)` color tuples or Dear PyGui `dpg.theme()` bindings rather than scattering raw hex values.
|
|
60
|
+
- **Keyboard focus & accessibility honesty**: wire explicit `Tab` order and shortcuts, and label screen-reader testing honestly (`not-checked` / `waived` on GPU-drawn `Dear PyGui` viewports rather than claiming native UIA/VoiceOver parity).
|
|
61
|
+
|
|
62
|
+
## Do/don't pairs
|
|
63
|
+
|
|
64
|
+
| Do | Don't |
|
|
65
|
+
|---|---|
|
|
66
|
+
| Use `QPalette` / `styleHints().colorScheme()` or Qt Quick Controls 2 (`FluentWinUI3`/`macOS`) | Apply massive global QSS that disables native platform styling and High Contrast |
|
|
67
|
+
| Compile `.ui` files via `pyside6-uic`/`pyuic6` and compose them in a separate controller class | Hand-edit generated `ui_*.py` files or hard-code pixel positions inside Qt Designer |
|
|
68
|
+
| Choose PySide6/QML, Flet, NiceGUI, Tauri, or Textual for greenfield Python apps | Default to plain `Tkinter` on greenfield Python desktop projects |
|
|
69
|
+
| Marshal worker results via `queue.Queue` + `after(...)` and load real TTF fonts in brownfield CustomTkinter/Dear PyGui | Block the Tkinter/Dear PyGui main loop with network calls or ship blurry bitmap defaults |
|
|
70
|
+
| Run `qmllint` / `qmltc` and QML singleton semantic tokens | Scatter raw hex strings and untyped dynamic JS lookups across QML files |
|
|
71
|
+
| Offload I/O to worker threads/async tasks and guard `closeEvent` on dirty docs | Block the Qt main event loop and freeze window repainting |
|
|
72
|
+
| Set `Accessible.name`/`role` and verify VoiceOver, Narrator, and Orca | Custom-paint interactive `QWidget` or `Item` surfaces with zero accessibility |
|
|
73
|
+
|
|
74
|
+
## Known traps
|
|
75
|
+
|
|
76
|
+
Global QSS breaking native Windows 11/macOS chrome and High Contrast, PySide6 Python GC prematurely collecting unparented `QObject`/worker references, GUI-thread blocking, missing `qmllint` hiding runtime QML reference errors, fractional DPI blur on raster icons (use SVG/high-DPI pixmaps), custom `QPainter` widgets invisible to screen readers, and unmarshaled Tkinter calls from background threads crashing the interpreter.
|
|
77
|
+
|
|
78
|
+
## Verification commands
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
# Run the test & build commands matching your project (PySide6/PyQt6 vs C++/QML):
|
|
82
|
+
python -m pytest
|
|
83
|
+
qmllint qml/
|
|
84
|
+
qmltestrunner -input tests/qml
|
|
85
|
+
cmake --build build
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Test runners and `qmllint` provide `static` / logic evidence. Launch the real desktop app across Windows/macOS/Linux to verify native styles (`FluentWinUI3`/`macOS`), Dark & High Contrast modes, fractional HiDPI, keyboard-only Tab/mnemonic completion, screen readers, and dirty `closeEvent` flows for `rendered` evidence; label untested OSes `not-checked`.
|