@stacksjs/defaults 0.70.207 → 0.70.208
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/TODO.md +21 -0
- package/ai/AGENTS.md +79 -0
- package/ai/README.md +45 -0
- package/ai/claude/launch.json +12 -0
- package/ai/skills/stacks-actions/SKILL.md +128 -0
- package/ai/skills/stacks-ai/SKILL.md +276 -0
- package/ai/skills/stacks-alias/SKILL.md +94 -0
- package/ai/skills/stacks-analytics/SKILL.md +91 -0
- package/ai/skills/stacks-api/SKILL.md +738 -0
- package/ai/skills/stacks-arrays/SKILL.md +277 -0
- package/ai/skills/stacks-auth/SKILL.md +422 -0
- package/ai/skills/stacks-auto-imports/SKILL.md +138 -0
- package/ai/skills/stacks-brandkit/SKILL.md +811 -0
- package/ai/skills/stacks-browse/SKILL.md +127 -0
- package/ai/skills/stacks-browse/scripts/browse.ts +492 -0
- package/ai/skills/stacks-browser/SKILL.md +145 -0
- package/ai/skills/stacks-buddy/SKILL.md +676 -0
- package/ai/skills/stacks-build/SKILL.md +163 -0
- package/ai/skills/stacks-cache/SKILL.md +125 -0
- package/ai/skills/stacks-calendar/SKILL.md +113 -0
- package/ai/skills/stacks-chat/SKILL.md +371 -0
- package/ai/skills/stacks-cli/SKILL.md +112 -0
- package/ai/skills/stacks-cloud/SKILL.md +192 -0
- package/ai/skills/stacks-cms/SKILL.md +217 -0
- package/ai/skills/stacks-collections/SKILL.md +82 -0
- package/ai/skills/stacks-commerce/SKILL.md +114 -0
- package/ai/skills/stacks-composables/SKILL.md +161 -0
- package/ai/skills/stacks-config/SKILL.md +144 -0
- package/ai/skills/stacks-configuration/SKILL.md +154 -0
- package/ai/skills/stacks-cron/SKILL.md +123 -0
- package/ai/skills/stacks-crosswind/SKILL.md +190 -0
- package/ai/skills/stacks-dashboard/SKILL.md +173 -0
- package/ai/skills/stacks-database/SKILL.md +286 -0
- package/ai/skills/stacks-datetime/SKILL.md +269 -0
- package/ai/skills/stacks-dependencies/SKILL.md +111 -0
- package/ai/skills/stacks-deploy/SKILL.md +102 -0
- package/ai/skills/stacks-design-brutalist/SKILL.md +110 -0
- package/ai/skills/stacks-design-minimalist/SKILL.md +115 -0
- package/ai/skills/stacks-design-output/SKILL.md +55 -0
- package/ai/skills/stacks-design-soft/SKILL.md +156 -0
- package/ai/skills/stacks-design-taste/SKILL.md +1012 -0
- package/ai/skills/stacks-design-taste-codex/SKILL.md +294 -0
- package/ai/skills/stacks-desktop/SKILL.md +78 -0
- package/ai/skills/stacks-development/SKILL.md +298 -0
- package/ai/skills/stacks-dns/SKILL.md +149 -0
- package/ai/skills/stacks-docs/SKILL.md +109 -0
- package/ai/skills/stacks-email/SKILL.md +236 -0
- package/ai/skills/stacks-enums/SKILL.md +100 -0
- package/ai/skills/stacks-env/SKILL.md +181 -0
- package/ai/skills/stacks-error-handling/SKILL.md +137 -0
- package/ai/skills/stacks-events/SKILL.md +228 -0
- package/ai/skills/stacks-faker/SKILL.md +158 -0
- package/ai/skills/stacks-git/SKILL.md +158 -0
- package/ai/skills/stacks-guard/SKILL.md +98 -0
- package/ai/skills/stacks-health/SKILL.md +75 -0
- package/ai/skills/stacks-http/SKILL.md +316 -0
- package/ai/skills/stacks-i18n/SKILL.md +198 -0
- package/ai/skills/stacks-image-to-code/SKILL.md +629 -0
- package/ai/skills/stacks-imagegen-mobile/SKILL.md +1474 -0
- package/ai/skills/stacks-imagegen-web/SKILL.md +998 -0
- package/ai/skills/stacks-investigate/SKILL.md +119 -0
- package/ai/skills/stacks-jobs/SKILL.md +136 -0
- package/ai/skills/stacks-lint/SKILL.md +184 -0
- package/ai/skills/stacks-listeners/SKILL.md +99 -0
- package/ai/skills/stacks-logging/SKILL.md +78 -0
- package/ai/skills/stacks-mail/SKILL.md +120 -0
- package/ai/skills/stacks-middleware/SKILL.md +249 -0
- package/ai/skills/stacks-migrations/SKILL.md +105 -0
- package/ai/skills/stacks-models/SKILL.md +267 -0
- package/ai/skills/stacks-new-feature/SKILL.md +206 -0
- package/ai/skills/stacks-notifications/SKILL.md +210 -0
- package/ai/skills/stacks-objects/SKILL.md +205 -0
- package/ai/skills/stacks-office-hours/SKILL.md +134 -0
- package/ai/skills/stacks-orm/SKILL.md +342 -0
- package/ai/skills/stacks-path/SKILL.md +118 -0
- package/ai/skills/stacks-payments/SKILL.md +373 -0
- package/ai/skills/stacks-plan-review/SKILL.md +152 -0
- package/ai/skills/stacks-plugins/SKILL.md +149 -0
- package/ai/skills/stacks-push/SKILL.md +376 -0
- package/ai/skills/stacks-query-builder/SKILL.md +128 -0
- package/ai/skills/stacks-queue/SKILL.md +559 -0
- package/ai/skills/stacks-realtime/SKILL.md +442 -0
- package/ai/skills/stacks-redesign/SKILL.md +182 -0
- package/ai/skills/stacks-registry/SKILL.md +58 -0
- package/ai/skills/stacks-repl/SKILL.md +80 -0
- package/ai/skills/stacks-retro/SKILL.md +122 -0
- package/ai/skills/stacks-review/SKILL.md +135 -0
- package/ai/skills/stacks-router/SKILL.md +231 -0
- package/ai/skills/stacks-routes/SKILL.md +105 -0
- package/ai/skills/stacks-scaffolding/SKILL.md +162 -0
- package/ai/skills/stacks-scheduler/SKILL.md +363 -0
- package/ai/skills/stacks-search-engine/SKILL.md +112 -0
- package/ai/skills/stacks-security/SKILL.md +129 -0
- package/ai/skills/stacks-security-audit/SKILL.md +128 -0
- package/ai/skills/stacks-server/SKILL.md +458 -0
- package/ai/skills/stacks-shell/SKILL.md +62 -0
- package/ai/skills/stacks-slug/SKILL.md +87 -0
- package/ai/skills/stacks-sms/SKILL.md +385 -0
- package/ai/skills/stacks-socials/SKILL.md +303 -0
- package/ai/skills/stacks-storage/SKILL.md +576 -0
- package/ai/skills/stacks-strings/SKILL.md +416 -0
- package/ai/skills/stacks-stx/SKILL.md +176 -0
- package/ai/skills/stacks-technical-diagrams/LICENSE +22 -0
- package/ai/skills/stacks-technical-diagrams/SKILL.md +290 -0
- package/ai/skills/stacks-technical-diagrams/agents/openai.yaml +4 -0
- package/ai/skills/stacks-technical-diagrams/assets/template.html +1252 -0
- package/ai/skills/stacks-technical-diagrams/bin/technical-diagrams.mjs +289 -0
- package/ai/skills/stacks-technical-diagrams/bunfig.toml +1 -0
- package/ai/skills/stacks-technical-diagrams/examples/agent-run.lifecycle.json +64 -0
- package/ai/skills/stacks-technical-diagrams/examples/agent-tool-call.workflow.json +88 -0
- package/ai/skills/stacks-technical-diagrams/examples/cache-miss-request.sequence.json +75 -0
- package/ai/skills/stacks-technical-diagrams/examples/product-analytics.dataflow.json +70 -0
- package/ai/skills/stacks-technical-diagrams/examples/web-app.architecture.json +41 -0
- package/ai/skills/stacks-technical-diagrams/renderers/architecture/grid.mjs +62 -0
- package/ai/skills/stacks-technical-diagrams/renderers/architecture/render-architecture.mjs +371 -0
- package/ai/skills/stacks-technical-diagrams/renderers/dataflow/README.md +82 -0
- package/ai/skills/stacks-technical-diagrams/renderers/dataflow/render-dataflow.mjs +295 -0
- package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/README.md +91 -0
- package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/render-lifecycle.mjs +384 -0
- package/ai/skills/stacks-technical-diagrams/renderers/sequence/README.md +84 -0
- package/ai/skills/stacks-technical-diagrams/renderers/sequence/render-sequence.mjs +257 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/cli.mjs +42 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/generated-validators.mjs +13 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/geometry.mjs +230 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/layout-report.mjs +40 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/utils.mjs +88 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/validator.mjs +40 -0
- package/ai/skills/stacks-technical-diagrams/renderers/workflow/README.md +103 -0
- package/ai/skills/stacks-technical-diagrams/renderers/workflow/render-workflow.mjs +481 -0
- package/ai/skills/stacks-technical-diagrams/schemas/README.md +68 -0
- package/ai/skills/stacks-technical-diagrams/schemas/architecture.schema.json +121 -0
- package/ai/skills/stacks-technical-diagrams/schemas/common.schema.json +43 -0
- package/ai/skills/stacks-technical-diagrams/schemas/dataflow.schema.json +221 -0
- package/ai/skills/stacks-technical-diagrams/schemas/lifecycle.schema.json +241 -0
- package/ai/skills/stacks-technical-diagrams/schemas/sequence.schema.json +186 -0
- package/ai/skills/stacks-technical-diagrams/schemas/workflow.schema.json +332 -0
- package/ai/skills/stacks-technical-diagrams/scripts/check-render-output.mjs +297 -0
- package/ai/skills/stacks-technical-diagrams/scripts/render-examples.mjs +28 -0
- package/ai/skills/stacks-testing/SKILL.md +129 -0
- package/ai/skills/stacks-tunnel/SKILL.md +125 -0
- package/ai/skills/stacks-types/SKILL.md +178 -0
- package/ai/skills/stacks-ui/SKILL.md +246 -0
- package/ai/skills/stacks-utils/SKILL.md +444 -0
- package/ai/skills/stacks-validation/SKILL.md +371 -0
- package/ai/skills/stacks-whois/SKILL.md +315 -0
- package/assets/world-map-data.ts +121 -0
- package/bootstrap.ts +114 -0
- package/docs/api-examples.md +46 -0
- package/docs/index.md +24 -0
- package/docs/markdown-examples.md +87 -0
- package/functions/analytics.ts +97 -0
- package/functions/api.ts +143 -0
- package/functions/auth.ts +208 -0
- package/functions/billing/payments.ts +149 -0
- package/functions/blog.ts +120 -0
- package/functions/cms/categorizables.ts +107 -0
- package/functions/cms/pages.ts +108 -0
- package/functions/cms/posts.ts +100 -0
- package/functions/cms/taggables.ts +102 -0
- package/functions/commerce/coupons.ts +128 -0
- package/functions/commerce/customers.ts +128 -0
- package/functions/commerce/gift-cards.ts +119 -0
- package/functions/commerce/orders.ts +112 -0
- package/functions/commerce/payments.ts +119 -0
- package/functions/commerce/products/categories.ts +123 -0
- package/functions/commerce/products/manufacturers.ts +123 -0
- package/functions/commerce/products/products.ts +123 -0
- package/functions/commerce/products/reviews.ts +123 -0
- package/functions/commerce/products/units.ts +123 -0
- package/functions/commerce/products/variants.ts +123 -0
- package/functions/commerce/shippings/delivery-routes.ts +123 -0
- package/functions/commerce/shippings/digital-deliveries.ts +119 -0
- package/functions/commerce/shippings/drivers.ts +123 -0
- package/functions/commerce/shippings/license-keys.ts +123 -0
- package/functions/commerce/shippings/shipping-methods.ts +123 -0
- package/functions/commerce/shippings/shipping-rates.ts +119 -0
- package/functions/commerce/shippings/shipping-zones.ts +119 -0
- package/functions/commerce/taxes.ts +119 -0
- package/functions/commerce/waitlist/products.ts +123 -0
- package/functions/commerce/waitlist/restaurants.ts +123 -0
- package/functions/craft.ts +107 -0
- package/functions/dashboard.ts +153 -0
- package/functions/inbox.ts +95 -0
- package/functions/jobs.ts +86 -0
- package/functions/monitoring/errors.ts +295 -0
- package/functions/queue.ts +111 -0
- package/functions/realtime/websockets.ts +96 -0
- package/functions/realtime.ts +52 -0
- package/functions/releases.ts +49 -0
- package/functions/search.ts +126 -0
- package/functions/toasts.ts +95 -0
- package/functions/uploads.ts +216 -0
- package/ide/.gitignore +4 -0
- package/ide/cursor/rules/auto-imports.mdc +574 -0
- package/ide/cursor/rules/code-style.mdc +12 -0
- package/ide/cursor/rules/documentation.mdc +9 -0
- package/ide/cursor/rules/error-handling-validation.mdc +11 -0
- package/ide/cursor/rules/key-conventions.mdc +11 -0
- package/ide/cursor/rules/project-structure.mdc +169 -0
- package/ide/cursor/rules/readme.mdc +318 -0
- package/ide/cursor/rules/syntax-formatting.mdc +9 -0
- package/ide/cursor/rules/testing.mdc +10 -0
- package/ide/cursor/rules/typescript.mdc +9 -0
- package/ide/cursor/rules/ui-styling.mdc +0 -0
- package/ide/dictionary.txt +397 -0
- package/ide/jetbrains/.fleet/settings.json +4 -0
- package/ide/jetbrains/.idea/.gitignore +5 -0
- package/ide/jetbrains/.idea/.name +1 -0
- package/ide/jetbrains/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/ide/jetbrains/.idea/jsLinters/eslint.xml +7 -0
- package/ide/jetbrains/.idea/modules.xml +8 -0
- package/ide/jetbrains/.idea/stacks.iml +22 -0
- package/ide/jetbrains/.idea/vcs.xml +6 -0
- package/ide/jetbrains/.idea/webResources.xml +14 -0
- package/ide/jetbrains/IntelliJ IDEA Global Settings +0 -0
- package/ide/jetbrains/installed.txt +4 -0
- package/ide/jetbrains/options/github-copilot.xml +5 -0
- package/ide/jetbrains/options/nodejs.xml +7 -0
- package/ide/jetbrains/options/templates.xml +124 -0
- package/ide/jetbrains/templates/JavaScript.xml +6 -0
- package/ide/jetbrains/templates/Stacks.xml +8 -0
- package/ide/vscode/.vscode/README.md +23 -0
- package/ide/vscode/.vscode/extensions.json +5 -0
- package/ide/vscode/.vscode/settings.json +176 -0
- package/ide/vscode/.vscode/stacks.code-snippets +181 -0
- package/ide/vscode/LICENSE.md +21 -0
- package/ide/vscode/README.md +36 -0
- package/ide/vscode/logo.png +0 -0
- package/ide/vscode/package.json +79 -0
- package/ide/zed/.zed/settings.json +139 -0
- package/lang/README.md +28 -0
- package/lang/de.yml +14 -0
- package/lang/en.yml +15 -0
- package/package.json +19 -3
- package/project/bootstrap +161 -0
- package/project/buddy +175 -0
- package/project/storage/framework/tsconfig.app.json +50 -0
- package/project/storage/framework/tsconfig.base.json +58 -0
- package/routes/core.ts +78 -0
- package/routes/dashboard-api.ts +233 -0
- package/routes/dashboard.ts +739 -0
- package/routes/email.ts +129 -0
- package/stores/[name].stx +16 -0
- package/stores/git.ts +71 -0
- package/stores/payment.ts +474 -0
- package/stores/queue.ts +43 -0
- package/stores/user.ts +29 -0
- package/stx-components-plugin.ts +25 -0
- package/styles/design-tokens.css +597 -0
- package/types/dashboard.ts +70 -0
- package/types/defaults.ts +438 -0
- package/vcs/github/CODE_OF_CONDUCT.md +83 -0
- package/vcs/github/CONTRIBUTING.md +187 -0
- package/vcs/github/EXPLANATIONS.md +41 -0
- package/vcs/github/FUNDING.yml +1 -0
- package/vcs/github/ISSUE_TEMPLATE/bug_report.yml +49 -0
- package/vcs/github/ISSUE_TEMPLATE/config.yml +10 -0
- package/vcs/github/ISSUE_TEMPLATE/feature_request.yml +44 -0
- package/vcs/github/SECURITY.md +70 -0
- package/vcs/github/renovate.json +5 -0
- package/vcs/github/stale.yml +14 -0
- package/vcs/github/workflows/README.md +16 -0
- package/vcs/github/workflows/ci.yml +114 -0
- package/vcs/github/workflows/export-size.yml +25 -0
- package/vcs/github/workflows/labeler.yml +13 -0
- package/vcs/github/workflows/release.yml +219 -0
- package/views/[...all].stx +8 -0
- package/views/about.md +3 -0
- package/views/auth/login.stx +1 -0
- package/views/auth/signup.stx +85 -0
- package/views/dashboard/.discovered-models.json +542 -0
- package/views/dashboard/AUDIT.md +904 -0
- package/views/dashboard/[...all].stx +89 -0
- package/views/dashboard/access-tokens/index.stx +177 -0
- package/views/dashboard/actions/index.stx +129 -0
- package/views/dashboard/analytics/blog/index.stx +356 -0
- package/views/dashboard/analytics/browsers/index.stx +263 -0
- package/views/dashboard/analytics/commerce/sales/index.stx +329 -0
- package/views/dashboard/analytics/commerce/web/index.stx +379 -0
- package/views/dashboard/analytics/countries/index.stx +289 -0
- package/views/dashboard/analytics/devices/index.stx +305 -0
- package/views/dashboard/analytics/events/index.stx +536 -0
- package/views/dashboard/analytics/index.stx +88 -0
- package/views/dashboard/analytics/marketing/index.stx +315 -0
- package/views/dashboard/analytics/pages/index.stx +271 -0
- package/views/dashboard/analytics/referrers/index.stx +319 -0
- package/views/dashboard/analytics/web/index.stx +356 -0
- package/views/dashboard/buddy/index.stx +198 -0
- package/views/dashboard/ci/index.stx +462 -0
- package/views/dashboard/cloud/index.stx +452 -0
- package/views/dashboard/commands/index.stx +295 -0
- package/views/dashboard/commerce/categories/index.stx +406 -0
- package/views/dashboard/commerce/coupons/index.stx +485 -0
- package/views/dashboard/commerce/customers/index.stx +410 -0
- package/views/dashboard/commerce/dashboard/index.stx +287 -0
- package/views/dashboard/commerce/delivery/delivery-routes.stx +305 -0
- package/views/dashboard/commerce/delivery/digital-delivery.stx +332 -0
- package/views/dashboard/commerce/delivery/drivers.stx +397 -0
- package/views/dashboard/commerce/delivery/index.stx +18 -0
- package/views/dashboard/commerce/delivery/license-keys.stx +380 -0
- package/views/dashboard/commerce/delivery/shipping-methods.stx +346 -0
- package/views/dashboard/commerce/delivery/shipping-rates.stx +338 -0
- package/views/dashboard/commerce/delivery/shipping-zones.stx +302 -0
- package/views/dashboard/commerce/delivery/tabs.ts +25 -0
- package/views/dashboard/commerce/gift-cards/index.stx +561 -0
- package/views/dashboard/commerce/manufacturers/index.stx +308 -0
- package/views/dashboard/commerce/orders/index.stx +247 -0
- package/views/dashboard/commerce/payments/index.stx +535 -0
- package/views/dashboard/commerce/pos/index.stx +653 -0
- package/views/dashboard/commerce/printers/devices/index.stx +273 -0
- package/views/dashboard/commerce/printers/receipts/index.stx +308 -0
- package/views/dashboard/commerce/products/detail.stx +563 -0
- package/views/dashboard/commerce/products/index.stx +370 -0
- package/views/dashboard/commerce/reviews/index.stx +656 -0
- package/views/dashboard/commerce/reviews/index.ts +0 -0
- package/views/dashboard/commerce/taxes/index.stx +377 -0
- package/views/dashboard/commerce/units/index.stx +317 -0
- package/views/dashboard/commerce/variants/index.stx +319 -0
- package/views/dashboard/commerce/waitlist/products.stx +942 -0
- package/views/dashboard/commerce/waitlist/restaurant.stx +1024 -0
- package/views/dashboard/components/index.stx +330 -0
- package/views/dashboard/composables/index.ts +19 -0
- package/views/dashboard/composables/useChart.ts +77 -0
- package/views/dashboard/composables/useNavigation.ts +99 -0
- package/views/dashboard/composables/useRole.ts +58 -0
- package/views/dashboard/composables/useTheme.ts +74 -0
- package/views/dashboard/content/authors/index.stx +171 -0
- package/views/dashboard/content/blog/index.stx +493 -0
- package/views/dashboard/content/categories/index.stx +169 -0
- package/views/dashboard/content/comments/index.stx +189 -0
- package/views/dashboard/content/dashboard.stx +383 -0
- package/views/dashboard/content/files/index.stx +706 -0
- package/views/dashboard/content/pages/index.stx +174 -0
- package/views/dashboard/content/posts/index.stx +269 -0
- package/views/dashboard/content/seo/index.stx +240 -0
- package/views/dashboard/content/tags/index.stx +167 -0
- package/views/dashboard/data/activity/index.stx +261 -0
- package/views/dashboard/data/dashboard/index.stx +116 -0
- package/views/dashboard/data/subscribers.stx +270 -0
- package/views/dashboard/data/teams.stx +275 -0
- package/views/dashboard/data/users.stx +279 -0
- package/views/dashboard/dependencies/index.stx +178 -0
- package/views/dashboard/deployments/[id].stx +234 -0
- package/views/dashboard/deployments/index.stx +9 -0
- package/views/dashboard/dns/index.stx +163 -0
- package/views/dashboard/environment/index.stx +283 -0
- package/views/dashboard/errors/index.stx +274 -0
- package/views/dashboard/forgot-password.stx +57 -0
- package/views/dashboard/functions/index.stx +159 -0
- package/views/dashboard/health/index.stx +248 -0
- package/views/dashboard/inbox/activity.stx +350 -0
- package/views/dashboard/inbox/index.stx +452 -0
- package/views/dashboard/inbox/settings.stx +290 -0
- package/views/dashboard/index.stx +252 -0
- package/views/dashboard/insights/index.stx +529 -0
- package/views/dashboard/jobs/[id].stx +430 -0
- package/views/dashboard/jobs/history.stx +222 -0
- package/views/dashboard/jobs/index.stx +214 -0
- package/views/dashboard/kanban/[id].stx +899 -0
- package/views/dashboard/kanban/index.stx +260 -0
- package/views/dashboard/layouts/default.stx +565 -0
- package/views/dashboard/layouts/guest.stx +10 -0
- package/views/dashboard/login.stx +48 -0
- package/views/dashboard/logs/index.stx +540 -0
- package/views/dashboard/mailboxes/index.stx +149 -0
- package/views/dashboard/management/permissions/index.stx +490 -0
- package/views/dashboard/marketing/campaigns/index.stx +604 -0
- package/views/dashboard/marketing/lists/index.stx +514 -0
- package/views/dashboard/marketing/reviews/index.stx +475 -0
- package/views/dashboard/marketing/social-posts/index.stx +560 -0
- package/views/dashboard/models/[model].stx +195 -0
- package/views/dashboard/models/index.stx +159 -0
- package/views/dashboard/monitoring/errors/index.stx +415 -0
- package/views/dashboard/notifications/dashboard.stx +383 -0
- package/views/dashboard/notifications/email.stx +336 -0
- package/views/dashboard/notifications/history.stx +373 -0
- package/views/dashboard/notifications/sms.stx +332 -0
- package/views/dashboard/packages/index.stx +195 -0
- package/views/dashboard/queries/[id].stx +381 -0
- package/views/dashboard/queries/history.stx +227 -0
- package/views/dashboard/queries/index.stx +335 -0
- package/views/dashboard/queries/slow.stx +318 -0
- package/views/dashboard/queue/index.stx +427 -0
- package/views/dashboard/realtime/index.stx +429 -0
- package/views/dashboard/register.stx +46 -0
- package/views/dashboard/releases/index.stx +389 -0
- package/views/dashboard/requests/index.stx +462 -0
- package/views/dashboard/serverless/index.stx +475 -0
- package/views/dashboard/servers/[id].stx +299 -0
- package/views/dashboard/servers/index.stx +483 -0
- package/views/dashboard/settings/billing.stx +50 -0
- package/views/dashboard/settings/index.stx +256 -0
- package/views/dashboard/settings/mail.stx +252 -0
- package/views/dashboard/stores/auth.ts +123 -0
- package/views/dashboard/stores/ci.ts +342 -0
- package/views/dashboard/stores/index.ts +129 -0
- package/views/dashboard/stores/kanban.ts +723 -0
- package/views/dashboard/stores/rbac.ts +350 -0
- package/views/dashboard/stx.config.ts +34 -0
- package/views/dashboard/teams/[id].stx +170 -0
- package/views/forum/category.stx +92 -0
- package/views/forum/index.stx +209 -0
- package/views/forum/new-topic.stx +113 -0
- package/views/forum/profile.stx +1 -0
- package/views/forum/topic.stx +143 -0
- package/views/hello-world/[name].stx +47 -0
- package/views/index.stx +21 -0
- package/views/system-tray/index.stx +147 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
@extends('layouts/default')
|
|
2
|
+
|
|
3
|
+
@section('content')
|
|
4
|
+
<script client>
|
|
5
|
+
// CI tracking surface (stacksjs/stacks#1844).
|
|
6
|
+
//
|
|
7
|
+
// Renders the snapshot exposed by `/api/dashboard/ci/status`
|
|
8
|
+
// (Action: Dashboard/Ci/StatusAction → @stacksjs/github). Active tab +
|
|
9
|
+
// status filter live in the `ciStore` so they survive SPA navigation.
|
|
10
|
+
//
|
|
11
|
+
// No <script server>, no window./document. reads — per #1838 the page
|
|
12
|
+
// is pure presentation against the store.
|
|
13
|
+
import { useStore } from '@stacksjs/stx'
|
|
14
|
+
import { useRole } from '../composables/useRole'
|
|
15
|
+
|
|
16
|
+
const ci = useStore('ci')
|
|
17
|
+
// Role check is now backed by the real RBAC store + `/api/dashboard/auth/me`
|
|
18
|
+
// (stacksjs/stacks#1843). `isDev()` returns true if the authenticated user
|
|
19
|
+
// holds the `admin` or `dev` role, OR if the request is unauthenticated
|
|
20
|
+
// (i.e. local dev dashboard with no bearer token) — see `useRole.ts` for
|
|
21
|
+
// the full resolution chain.
|
|
22
|
+
const { isDev } = useRole()
|
|
23
|
+
const canView = derived(() => isDev())
|
|
24
|
+
|
|
25
|
+
// Lift store signals so template :if/:text auto-unwrap them.
|
|
26
|
+
const loading = derived(() => ci.loading())
|
|
27
|
+
const error = derived(() => ci.error())
|
|
28
|
+
const disabled = derived(() => ci.disabled())
|
|
29
|
+
const orgs = derived(() => ci.orgs())
|
|
30
|
+
const repos = derived(() => ci.reposForTab())
|
|
31
|
+
const totals = derived(() => ci.tabTotals())
|
|
32
|
+
const tabRunners = derived(() => ci.tabRunners())
|
|
33
|
+
const activeTab = derived(() => ci.activeTab())
|
|
34
|
+
const statusFilter = derived(() => ci.statusFilter())
|
|
35
|
+
|
|
36
|
+
const passingText = derived(() => totals().passing + ' passing')
|
|
37
|
+
const failingText = derived(() => totals().failing + ' failing')
|
|
38
|
+
const totalText = derived(() => totals().total + ' total')
|
|
39
|
+
const runnersText = derived(() => {
|
|
40
|
+
const r = tabRunners()
|
|
41
|
+
return 'Runners: ' + r.running + ' running, ' + r.queued + ' queued / ' + r.cap + ' cap'
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
function tabClass(id) {
|
|
45
|
+
const base = 'px-4 py-2 font-medium text-sm whitespace-nowrap bg-transparent border-b-2 transition-colors cursor-pointer '
|
|
46
|
+
return activeTab() === id
|
|
47
|
+
? base + 'border-violet-400 text-violet-600 dark:text-violet-400'
|
|
48
|
+
: base + 'border-transparent text-zinc-500 hover:text-zinc-700 dark:hover:text-zinc-300'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function filterClass(id) {
|
|
52
|
+
const base = 'px-3 py-1 text-xs rounded-full border transition-colors cursor-pointer '
|
|
53
|
+
return statusFilter() === id
|
|
54
|
+
? base + 'bg-violet-500 border-violet-500 text-white'
|
|
55
|
+
: base + 'bg-transparent border-zinc-300 dark:border-zinc-700 text-zinc-600 dark:text-zinc-400 hover:border-zinc-400'
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function borderColor(status) {
|
|
59
|
+
if (status === 'success') return 'border-color: rgba(16,185,129,0.3)'
|
|
60
|
+
if (status === 'failure' || status === 'error') return 'border-color: rgba(239,68,68,0.3)'
|
|
61
|
+
if (status === 'pending') return 'border-color: rgba(234,179,8,0.3)'
|
|
62
|
+
return 'border-color: rgba(39,39,42,1)'
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function isSuccess(status) { return status === 'success' }
|
|
66
|
+
function isFailing(status) { return status === 'failure' || status === 'error' }
|
|
67
|
+
function isPending(status) { return status === 'pending' }
|
|
68
|
+
function isNoRuns(status) { return status === 'no_runs' }
|
|
69
|
+
|
|
70
|
+
function timeAgo(dateStr) {
|
|
71
|
+
if (!dateStr) return ''
|
|
72
|
+
const diff = Date.now() - new Date(dateStr).getTime()
|
|
73
|
+
const mins = Math.floor(diff / 60000)
|
|
74
|
+
if (mins < 60) return mins + 'm ago'
|
|
75
|
+
const hrs = Math.floor(mins / 60)
|
|
76
|
+
if (hrs < 24) return hrs + 'h ago'
|
|
77
|
+
const days = Math.floor(hrs / 24)
|
|
78
|
+
return days + 'd ago'
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function truncate(str, len) {
|
|
82
|
+
if (!str) return ''
|
|
83
|
+
return str.length > len ? str.slice(0, len) + '...' : str
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// ─── Drilldown drawer state (stacksjs/stacks#1848) ──────────────
|
|
87
|
+
const drilldownTarget = derived(() => ci.drilldown())
|
|
88
|
+
const drilldownRuns = derived(() => ci.drilldownRuns())
|
|
89
|
+
const loadingDrilldown = derived(() => ci.loadingDrilldown())
|
|
90
|
+
const drilldownError = derived(() => ci.drilldownError())
|
|
91
|
+
const expandedRunId = derived(() => ci.expandedRunId())
|
|
92
|
+
const jobsByRunId = derived(() => ci.drilldownJobsByRunId())
|
|
93
|
+
const loadingJobsRunId = derived(() => ci.loadingJobsForRunId())
|
|
94
|
+
|
|
95
|
+
function runRowClass(conclusion, status) {
|
|
96
|
+
const base = 'px-3 py-2 -mx-3 border-l-2 cursor-pointer hover:bg-zinc-50 dark:hover:bg-zinc-900 transition-colors '
|
|
97
|
+
if (status !== 'completed') return base + 'border-yellow-400'
|
|
98
|
+
if (conclusion === 'success') return base + 'border-emerald-400'
|
|
99
|
+
if (conclusion === 'failure' || conclusion === 'timed_out') return base + 'border-red-400'
|
|
100
|
+
if (conclusion === 'cancelled') return base + 'border-zinc-400'
|
|
101
|
+
return base + 'border-zinc-200 dark:border-zinc-800'
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function runStatusBadge(conclusion, status) {
|
|
105
|
+
if (status !== 'completed') return { label: status, cls: 'bg-yellow-100 text-yellow-700 dark:bg-yellow-900/40 dark:text-yellow-300' }
|
|
106
|
+
if (conclusion === 'success') return { label: 'success', cls: 'bg-emerald-100 text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-300' }
|
|
107
|
+
if (conclusion === 'failure') return { label: 'failure', cls: 'bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300' }
|
|
108
|
+
return { label: conclusion || 'unknown', cls: 'bg-zinc-100 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300' }
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function formatDuration(ms) {
|
|
112
|
+
if (ms == null) return ''
|
|
113
|
+
const s = Math.floor(ms / 1000)
|
|
114
|
+
if (s < 60) return s + 's'
|
|
115
|
+
const m = Math.floor(s / 60)
|
|
116
|
+
const rem = s % 60
|
|
117
|
+
if (m < 60) return m + 'm' + (rem ? ' ' + rem + 's' : '')
|
|
118
|
+
const h = Math.floor(m / 60)
|
|
119
|
+
return h + 'h ' + (m % 60) + 'm'
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function jobsForRun(runId) {
|
|
123
|
+
return jobsByRunId()[runId] || []
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function failedJobs(runId) {
|
|
127
|
+
return jobsForRun(runId).filter(j => j.conclusion && j.conclusion !== 'success' && j.conclusion !== 'skipped' && j.conclusion !== 'neutral')
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// ─── Runner pressure sparkline (stacksjs/stacks#1850) ────────────
|
|
131
|
+
//
|
|
132
|
+
// Inline SVG sparkline — no chart lib. The path is built off the
|
|
133
|
+
// active tab's sample history with a simple linear scale: x maps
|
|
134
|
+
// to sample index (oldest left, newest right), y maps to queue
|
|
135
|
+
// depth normalised against the larger of the org's cap or the
|
|
136
|
+
// peak queue depth, inverted so higher pressure paints higher
|
|
137
|
+
// on the chart.
|
|
138
|
+
const runnerHistory = derived(() => {
|
|
139
|
+
const tab = activeTab()
|
|
140
|
+
return (ci.runnerHistoryByOrg()[tab] || [])
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
effect(() => {
|
|
144
|
+
const tab = activeTab()
|
|
145
|
+
if (!tab) return
|
|
146
|
+
// Lazy-load history for the active org tab when it changes.
|
|
147
|
+
// The store dedupes if already fetched.
|
|
148
|
+
Promise.resolve().then(() => ci.loadRunnerHistory(tab))
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
function sparklinePath() {
|
|
152
|
+
const samples = runnerHistory()
|
|
153
|
+
if (!samples || samples.length === 0) return ''
|
|
154
|
+
const w = 200
|
|
155
|
+
const h = 24
|
|
156
|
+
const r = tabRunners()
|
|
157
|
+
const cap = Math.max(1, r.cap || 1)
|
|
158
|
+
let maxQueued = cap
|
|
159
|
+
for (const s of samples)
|
|
160
|
+
if (s.queued > maxQueued) maxQueued = s.queued
|
|
161
|
+
const n = samples.length
|
|
162
|
+
const stepX = n === 1 ? 0 : w / (n - 1)
|
|
163
|
+
const points = samples.map((s, i) => {
|
|
164
|
+
const x = i * stepX
|
|
165
|
+
const y = h - (s.queued / maxQueued) * h
|
|
166
|
+
return [x, y]
|
|
167
|
+
})
|
|
168
|
+
return points.map((p, i) => (i === 0 ? `M ${p[0]} ${p[1]}` : `L ${p[0]} ${p[1]}`)).join(' ')
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function hasHistory() {
|
|
172
|
+
const samples = runnerHistory()
|
|
173
|
+
return samples && samples.length >= 2
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Top-level fetch — runs on both hard reload (SSR hydration) and SPA
|
|
177
|
+
// mount, since `<script client>` re-executes on every entry. The store
|
|
178
|
+
// tracks its own loading flag so back-to-back calls don't double-fire.
|
|
179
|
+
ci.load()
|
|
180
|
+
</script>
|
|
181
|
+
|
|
182
|
+
<div class="mx-auto px-6 py-8 max-w-7xl">
|
|
183
|
+
<!-- Role-gated wrapper. Collapses to the "requires dev role" message
|
|
184
|
+
when an authenticated client-role user lands here. Unauthenticated
|
|
185
|
+
viewers (dev dashboard on localhost) see the surface as if they
|
|
186
|
+
were a dev. -->
|
|
187
|
+
<div :if="!canView" class="px-5 py-8 text-center bg-zinc-50 dark:bg-zinc-900 border border-zinc-200 rounded-lg dark:border-zinc-800">
|
|
188
|
+
<p class="text-sm text-zinc-600 dark:text-zinc-400">This surface requires the dev role.</p>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
<div :if="canView">
|
|
192
|
+
<header class="mb-6">
|
|
193
|
+
<h1 class="font-semibold text-2xl text-zinc-900 dark:text-zinc-100">CI Status</h1>
|
|
194
|
+
<p class="mt-1 text-sm text-zinc-500">GitHub Actions health across the configured orgs. Configure in <code class="text-xs">config/dashboard.ts</code>.</p>
|
|
195
|
+
</header>
|
|
196
|
+
|
|
197
|
+
<!-- Disabled state — the surface is off in config/dashboard.ts -->
|
|
198
|
+
<div :if="disabled" class="px-5 py-8 text-center bg-zinc-50 dark:bg-zinc-900 border border-zinc-200 rounded-lg dark:border-zinc-800">
|
|
199
|
+
<p class="text-sm text-zinc-600 dark:text-zinc-400">CI tracking is disabled.</p>
|
|
200
|
+
<p class="mt-1 text-xs text-zinc-500">Enable it in <code>config/dashboard.ts</code> by setting <code>ci.enabled = true</code> and listing one or more orgs.</p>
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
<!-- Loading state -->
|
|
204
|
+
<div :if="loading && !disabled" class="flex items-center justify-center" style="min-height: 50vh">
|
|
205
|
+
<div class="flex flex-col gap-4 items-center">
|
|
206
|
+
<svg class="text-violet-500 animate-spin" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
207
|
+
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
|
|
208
|
+
</svg>
|
|
209
|
+
<span class="text-sm text-zinc-400">Fetching CI status…</span>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
<!-- Error state -->
|
|
214
|
+
<div :if="error && !loading && !disabled" class="px-5 py-4 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900/40">
|
|
215
|
+
<p class="font-medium text-red-700 text-sm dark:text-red-300">Snapshot failed</p>
|
|
216
|
+
<p class="mt-1 text-red-600 text-xs dark:text-red-400" :text="error"></p>
|
|
217
|
+
<p class="mt-2 text-xs text-zinc-500">Most often: <code>GITHUB_TOKEN</code> is missing or lacks <code>public_repo</code> scope.</p>
|
|
218
|
+
</div>
|
|
219
|
+
|
|
220
|
+
<!-- Loaded state -->
|
|
221
|
+
<div :if="!loading && !error && !disabled">
|
|
222
|
+
<!-- Org tabs -->
|
|
223
|
+
<div class="flex overflow-x-auto gap-1 items-center mb-4 border-b border-zinc-200 dark:border-zinc-800">
|
|
224
|
+
<button
|
|
225
|
+
:for="org in orgs"
|
|
226
|
+
@click="ci.setActiveTab(org)"
|
|
227
|
+
:class="tabClass(org)"
|
|
228
|
+
:text="org"
|
|
229
|
+
></button>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<!-- Status-filter chips -->
|
|
233
|
+
<div class="flex flex-wrap gap-2 mb-4">
|
|
234
|
+
<button @click="ci.setStatusFilter('all')" :class="filterClass('all')">All</button>
|
|
235
|
+
<button @click="ci.setStatusFilter('passing')" :class="filterClass('passing')">Passing</button>
|
|
236
|
+
<button @click="ci.setStatusFilter('failing')" :class="filterClass('failing')">Failing</button>
|
|
237
|
+
<button @click="ci.setStatusFilter('pending')" :class="filterClass('pending')">Pending</button>
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
<!-- Summary line + runner sparkline -->
|
|
241
|
+
<div class="flex flex-wrap gap-x-4 gap-y-1 items-center mb-2 text-sm">
|
|
242
|
+
<span class="font-medium text-emerald-600 dark:text-emerald-400" :text="passingText"></span>
|
|
243
|
+
<span class="font-medium text-red-500 dark:text-red-400" :text="failingText"></span>
|
|
244
|
+
<span class="text-zinc-400" :text="totalText"></span>
|
|
245
|
+
<span class="text-zinc-300 dark:text-zinc-700">·</span>
|
|
246
|
+
<span class="text-zinc-500 dark:text-zinc-400" :text="runnersText"></span>
|
|
247
|
+
</div>
|
|
248
|
+
<!-- Sparkline showing recent queue depth for the active org —
|
|
249
|
+
appears only when alerts are on (history collection is gated
|
|
250
|
+
on `ci.alerts.enabled`). Drawn inline as a single SVG path
|
|
251
|
+
so we don't pull a chart library for 20 datapoints. -->
|
|
252
|
+
<div :if="hasHistory()" class="flex gap-2 items-center mb-5">
|
|
253
|
+
<span class="text-[10px] text-zinc-400 tracking-wide uppercase">Queue depth (last hour)</span>
|
|
254
|
+
<svg width="200" height="24" viewBox="0 0 200 24" class="text-violet-400">
|
|
255
|
+
<path :d="sparklinePath()" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" />
|
|
256
|
+
</svg>
|
|
257
|
+
</div>
|
|
258
|
+
|
|
259
|
+
<!-- Repo cards -->
|
|
260
|
+
<div class="grid gap-2" style="grid-template-columns: repeat(auto-fill, minmax(340px, 1fr))">
|
|
261
|
+
<div
|
|
262
|
+
:for="repo in repos"
|
|
263
|
+
:style="borderColor(repo.status)"
|
|
264
|
+
@click="ci.openDrilldown(repo)"
|
|
265
|
+
class="flex gap-3 items-start px-4 py-3 bg-zinc-50 dark:bg-zinc-900 hover:bg-zinc-100 dark:hover:bg-zinc-800 border rounded-lg transition-colors cursor-pointer"
|
|
266
|
+
>
|
|
267
|
+
<svg :if="isSuccess(repo.status)" class="mt-0.5 text-emerald-500" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
268
|
+
<polyline points="20 6 9 17 4 12" />
|
|
269
|
+
</svg>
|
|
270
|
+
<svg :if="isFailing(repo.status)" class="mt-0.5 text-red-500" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
271
|
+
<line x1="18" y1="6" x2="6" y2="18" />
|
|
272
|
+
<line x1="6" y1="6" x2="18" y2="18" />
|
|
273
|
+
</svg>
|
|
274
|
+
<svg :if="isPending(repo.status)" class="mt-0.5 text-yellow-500 animate-spin" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
275
|
+
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
|
|
276
|
+
</svg>
|
|
277
|
+
<svg :if="isNoRuns(repo.status)" class="mt-0.5 text-zinc-500" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
278
|
+
<line x1="5" y1="12" x2="19" y2="12" />
|
|
279
|
+
</svg>
|
|
280
|
+
|
|
281
|
+
<div class="flex-1 min-w-0">
|
|
282
|
+
<div class="flex gap-2 items-center">
|
|
283
|
+
<!-- Inner links stop propagation so they remain "open repo
|
|
284
|
+
in a new tab" rather than triggering the drilldown
|
|
285
|
+
drawer on the parent card. -->
|
|
286
|
+
<a :href="repo.url" target="_blank" @click.stop class="font-medium no-underline text-sm text-zinc-900 dark:text-zinc-100 hover:underline" :text="repo.name"></a>
|
|
287
|
+
<span :if="repo.commitSha" class="font-mono text-xs text-zinc-400" :text="repo.commitSha"></span>
|
|
288
|
+
<span :if="repo.updatedAt" class="text-xs text-zinc-400" :text="timeAgo(repo.updatedAt)"></span>
|
|
289
|
+
</div>
|
|
290
|
+
|
|
291
|
+
<div :if="repo.commitMessage" class="mt-1">
|
|
292
|
+
<a :href="repo.commitUrl || repo.url" target="_blank" @click.stop class="no-underline text-xs text-zinc-500 dark:text-zinc-400 hover:underline" :text="truncate(repo.commitMessage, 50)"></a>
|
|
293
|
+
</div>
|
|
294
|
+
|
|
295
|
+
<div :if="repo.commitAuthor" class="mt-0.5">
|
|
296
|
+
<span class="text-xs text-zinc-400" :text="repo.commitAuthor"></span>
|
|
297
|
+
</div>
|
|
298
|
+
|
|
299
|
+
<div :if="repo.renovatePRs > 0 || repo.actionsPRs > 0" class="mt-2 pt-2 border-t border-zinc-200/60 dark:border-zinc-800">
|
|
300
|
+
<div class="mb-1 text-xs text-zinc-400">Pull Requests</div>
|
|
301
|
+
<div class="flex flex-wrap gap-x-3 gap-y-0.5">
|
|
302
|
+
<a :if="repo.renovatePRs > 0" :href="repo.renovatePRsUrl" target="_blank" @click.stop class="no-underline text-xs text-zinc-500 dark:text-zinc-400 hover:underline">
|
|
303
|
+
renovatebot: <span :text="repo.renovatePRs"></span>
|
|
304
|
+
</a>
|
|
305
|
+
<a :if="repo.actionsPRs > 0" :href="repo.actionsPRsUrl" target="_blank" @click.stop class="no-underline text-xs text-zinc-500 dark:text-zinc-400 hover:underline">
|
|
306
|
+
github-actions: <span :text="repo.actionsPRs"></span>
|
|
307
|
+
</a>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
|
|
311
|
+
<div :if="repo.failedJobs && repo.failedJobs.length > 0" class="mt-2 pt-2 border-red-500/10 border-t">
|
|
312
|
+
<a
|
|
313
|
+
:for="job in repo.failedJobs"
|
|
314
|
+
:href="job.url"
|
|
315
|
+
target="_blank"
|
|
316
|
+
@click.stop
|
|
317
|
+
class="flex gap-1.5 items-center mt-1 no-underline hover:underline"
|
|
318
|
+
>
|
|
319
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-red-400/70">
|
|
320
|
+
<circle cx="12" cy="12" r="10" />
|
|
321
|
+
<line x1="15" y1="9" x2="9" y2="15" />
|
|
322
|
+
<line x1="9" y1="9" x2="15" y2="15" />
|
|
323
|
+
</svg>
|
|
324
|
+
<span class="text-red-400/80 text-xs" :text="job.name"></span>
|
|
325
|
+
</a>
|
|
326
|
+
</div>
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
<!-- Empty filter result -->
|
|
332
|
+
<div :if="repos.length === 0" class="px-4 py-8 text-center text-sm text-zinc-500">
|
|
333
|
+
No repos match the current filter.
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
</div>
|
|
337
|
+
|
|
338
|
+
<!-- ────────── Drilldown drawer (#1848) ────────── -->
|
|
339
|
+
<!-- Slide-in side panel triggered by a repo-card click. Lists the
|
|
340
|
+
last 20 workflow runs as a vertical timeline; failing runs
|
|
341
|
+
expand inline to their failed-jobs list. Closes on backdrop
|
|
342
|
+
click + Escape. -->
|
|
343
|
+
<div
|
|
344
|
+
:if="drilldownTarget()"
|
|
345
|
+
class="flex fixed inset-0 z-50 justify-end"
|
|
346
|
+
@click="ci.closeDrilldown()"
|
|
347
|
+
@keydown.escape.window="ci.closeDrilldown()"
|
|
348
|
+
>
|
|
349
|
+
<div class="absolute inset-0 bg-black/40"></div>
|
|
350
|
+
<aside
|
|
351
|
+
@click.stop
|
|
352
|
+
class="overflow-y-auto relative h-full max-w-2xl w-full bg-white dark:bg-zinc-950 border-l border-zinc-200 dark:border-zinc-800 shadow-2xl"
|
|
353
|
+
>
|
|
354
|
+
<!-- Header -->
|
|
355
|
+
<div class="flex sticky top-0 z-10 gap-3 items-start px-5 py-4 bg-white dark:bg-zinc-950 border-b border-zinc-200 dark:border-zinc-800">
|
|
356
|
+
<div class="flex-1 min-w-0">
|
|
357
|
+
<p class="text-xs text-zinc-500 tracking-wide uppercase">Run history</p>
|
|
358
|
+
<h3 class="font-semibold text-lg text-zinc-900 truncate dark:text-zinc-100" :text="drilldownTarget().fullName"></h3>
|
|
359
|
+
</div>
|
|
360
|
+
<button
|
|
361
|
+
@click="ci.closeDrilldown()"
|
|
362
|
+
class="text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300"
|
|
363
|
+
title="Close"
|
|
364
|
+
>
|
|
365
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
366
|
+
<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />
|
|
367
|
+
</svg>
|
|
368
|
+
</button>
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
<!-- Error -->
|
|
372
|
+
<div :if="drilldownError()" class="mt-4 mx-5 px-4 py-3 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900/40">
|
|
373
|
+
<p class="text-red-700 text-xs dark:text-red-300" :text="drilldownError()"></p>
|
|
374
|
+
</div>
|
|
375
|
+
|
|
376
|
+
<!-- Loading -->
|
|
377
|
+
<div :if="loadingDrilldown() && drilldownRuns().length === 0" class="px-5 py-12 text-center">
|
|
378
|
+
<svg class="mx-auto text-violet-500 animate-spin" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
379
|
+
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
|
|
380
|
+
</svg>
|
|
381
|
+
<p class="mt-2 text-xs text-zinc-500">Fetching recent runs…</p>
|
|
382
|
+
</div>
|
|
383
|
+
|
|
384
|
+
<!-- Runs list -->
|
|
385
|
+
<ul :if="drilldownRuns().length > 0" class="px-5 py-3">
|
|
386
|
+
<li
|
|
387
|
+
:for="run in drilldownRuns"
|
|
388
|
+
class="border-b border-zinc-100 dark:border-zinc-900 last:border-0"
|
|
389
|
+
>
|
|
390
|
+
<div
|
|
391
|
+
@click="ci.toggleRunJobs(run.id)"
|
|
392
|
+
:class="runRowClass(run.conclusion, run.status)"
|
|
393
|
+
>
|
|
394
|
+
<div class="flex gap-3 items-start justify-between">
|
|
395
|
+
<div class="flex-1 min-w-0">
|
|
396
|
+
<div class="flex gap-2 items-center">
|
|
397
|
+
<span
|
|
398
|
+
:class="`px-1.5 py-0.5 text-[10px] font-medium rounded ${runStatusBadge(run.conclusion, run.status).cls}`"
|
|
399
|
+
:text="runStatusBadge(run.conclusion, run.status).label"
|
|
400
|
+
></span>
|
|
401
|
+
<span class="font-medium text-sm text-zinc-800 truncate dark:text-zinc-200" :text="run.name"></span>
|
|
402
|
+
</div>
|
|
403
|
+
<p :if="run.commitMessage" class="mt-1 text-xs text-zinc-500 truncate" :text="truncate(run.commitMessage, 80)"></p>
|
|
404
|
+
<div class="flex gap-2 items-center mt-1 text-[10px] text-zinc-400">
|
|
405
|
+
<span class="font-mono" :text="run.headShaShort"></span>
|
|
406
|
+
<span :if="run.headBranch" :text="run.headBranch"></span>
|
|
407
|
+
<span :if="run.commitAuthor">·</span>
|
|
408
|
+
<span :if="run.commitAuthor" :text="run.commitAuthor"></span>
|
|
409
|
+
<span>·</span>
|
|
410
|
+
<span :text="timeAgo(run.updatedAt)"></span>
|
|
411
|
+
<span :if="run.durationMs">·</span>
|
|
412
|
+
<span :if="run.durationMs" :text="formatDuration(run.durationMs)"></span>
|
|
413
|
+
</div>
|
|
414
|
+
</div>
|
|
415
|
+
<a
|
|
416
|
+
:href="run.url"
|
|
417
|
+
target="_blank"
|
|
418
|
+
@click.stop
|
|
419
|
+
class="flex-shrink-0 no-underline text-violet-600 text-xs dark:text-violet-400 hover:underline"
|
|
420
|
+
>view ↗</a>
|
|
421
|
+
</div>
|
|
422
|
+
</div>
|
|
423
|
+
|
|
424
|
+
<!-- Expanded: failed job list -->
|
|
425
|
+
<div :if="expandedRunId() === run.id" class="px-3 py-2 bg-zinc-50 dark:bg-zinc-900/50 border-t border-zinc-100 dark:border-zinc-900">
|
|
426
|
+
<div :if="loadingJobsRunId() === run.id" class="py-2 text-xs text-zinc-500">
|
|
427
|
+
Loading jobs…
|
|
428
|
+
</div>
|
|
429
|
+
<div :if="loadingJobsRunId() !== run.id && jobsForRun(run.id).length === 0" class="py-1 italic text-xs text-zinc-400">
|
|
430
|
+
No job detail.
|
|
431
|
+
</div>
|
|
432
|
+
<div :if="loadingJobsRunId() !== run.id && failedJobs(run.id).length > 0" class="space-y-1.5">
|
|
433
|
+
<p class="text-[10px] text-zinc-500 tracking-wide uppercase">Failed jobs</p>
|
|
434
|
+
<a
|
|
435
|
+
:for="job in failedJobs(run.id)"
|
|
436
|
+
:href="job.url"
|
|
437
|
+
target="_blank"
|
|
438
|
+
@click.stop
|
|
439
|
+
class="flex gap-1.5 items-center no-underline text-red-700 text-xs dark:text-red-400 hover:underline"
|
|
440
|
+
>
|
|
441
|
+
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
442
|
+
<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />
|
|
443
|
+
</svg>
|
|
444
|
+
<span :text="job.name"></span>
|
|
445
|
+
<span :if="job.durationMs" class="text-zinc-400" :text="'(' + formatDuration(job.durationMs) + ')'"></span>
|
|
446
|
+
</a>
|
|
447
|
+
</div>
|
|
448
|
+
<div :if="loadingJobsRunId() !== run.id && jobsForRun(run.id).length > 0 && failedJobs(run.id).length === 0" class="py-1 text-xs text-zinc-500">
|
|
449
|
+
All <span :text="jobsForRun(run.id).length"></span> jobs passed.
|
|
450
|
+
</div>
|
|
451
|
+
</div>
|
|
452
|
+
</li>
|
|
453
|
+
</ul>
|
|
454
|
+
|
|
455
|
+
<!-- Empty -->
|
|
456
|
+
<div :if="!loadingDrilldown() && !drilldownError() && drilldownRuns().length === 0" class="px-5 py-12 text-center">
|
|
457
|
+
<p class="text-sm text-zinc-500">No recent runs.</p>
|
|
458
|
+
</div>
|
|
459
|
+
</aside>
|
|
460
|
+
</div>
|
|
461
|
+
</div>
|
|
462
|
+
@endsection
|