This commit is contained in:
小妍儿 ✨ 2026-10-26 03:19:03 +00:00 • committed by GitHub
commit 69ac572268
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
140 changed files with 2988 additions and 836 deletions

View file

@ -0,0 +1,49 @@
# OPTIONAL deployment-owned edge example. Not included by SkillHub.
# HTTP here is a loopback leg behind the operator's existing HTTPS terminator.
# Merge existing TLS, CSP, authentication, host validation and security headers;
# do not expose this listener publicly or replace the production server wholesale.
upstream skillhub_analytics_web {
server 127.0.0.1:8080;
}
server {
listen 127.0.0.1:8081;
server_name localhost;
# Exact file only: a missing collector must be 404, never SPA HTML.
location = /_skillhub-observe/skillhub-observer.v1.mjs {
alias /srv/skillhub-observe/skillhub-observer.v1.mjs;
types { }
default_type application/javascript;
add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "public, max-age=31536000, immutable";
}
location ^~ /_skillhub-observe/ { return 404; }
# No filtering or cache-policy changes for API, auth, assets, runtime config,
# registry guides/downloads or health. Preserve original URI (no trailing /).
location ~ ^/(api/|oauth2/|login/oauth2/|\.well-known/|assets/|registry/|runtime-config\.js$|nginx-health) {
proxy_pass http://skillhub_analytics_web;
proxy_set_header Host $http_host;
}
# Only the UI fallback is eligible; sub_filter's default MIME is text/html.
location / {
proxy_pass http://skillhub_analytics_web;
proxy_set_header Host $http_host;
proxy_set_header Accept-Encoding "";
proxy_set_header If-None-Match "";
proxy_set_header If-Modified-Since "";
proxy_cache off;
proxy_hide_header ETag;
proxy_hide_header Last-Modified;
proxy_hide_header Content-MD5;
proxy_hide_header Cache-Control;
proxy_hide_header Expires;
etag off;
if_modified_since off;
add_header Cache-Control "no-store" always;
sub_filter_once on;
sub_filter_last_modified off;
sub_filter '</head>' '<script type="module" src="/_skillhub-observe/skillhub-observer.v1.mjs"></script></head>';
}
}

View file

@ -0,0 +1,5 @@
export interface SkillhubIntent { readonly id: string; readonly event: string }
export function observeSkillhubIntents(options?: {
root?: Document | Element
onIntent?: (intent: SkillhubIntent) => void
}): () => void

View file

@ -0,0 +1,52 @@
// Optional deployment example, NOT imported or started by SkillHub.
// Call only after consent/policy approval, with an explicit local callback.
const activeRoots = new WeakMap()
const rules = new Map([
['search.query.submit', 'submit'],
['skill.card.open', 'card'],
['suite.card.open', 'card'],
['skill.download.request', 'click'],
['skill.file.download', 'click'],
['skill.command.copy', 'click'],
['skill.prompt.copy', 'click'],
['skill.publish.request', 'click'],
['skill.publish.confirm', 'click'],
['skill.publish.cancel', 'click'],
['skill.delete.confirm', 'click'],
['skill.delete.cancel', 'click'],
])
export function observeSkillhubIntents({ root = document, onIntent } = {}) {
if (typeof onIntent !== 'function') return () => {}
if (activeRoots.has(root)) return activeRoots.get(root)
const observe = event => {
const target = event.target?.nodeType === 1 ? event.target : event.target?.parentElement
const host = target?.closest('[data-analytics-id]')
if (!host || !root.contains(host)) return
const id = host.getAttribute('data-analytics-id')
const rule = rules.get(id)
if (!rule || host.closest(':disabled, [aria-disabled="true"], [data-disabled]')) return
// Do not attribute a nested, unmarked interactive control to its containing card/form.
const interactive = target.closest('button, a, input, select, textarea, [role="button"], [role="link"], [role="option"], [role="menuitem"]')
if (event.type !== 'submit' && interactive && interactive !== host && host.contains(interactive)) return
const keyboardCard = rule === 'card' && event.type === 'keydown'
&& host.tagName === 'DIV' && host.getAttribute('role') === 'link'
&& (event.key === 'Enter' || event.key === ' ')
&& !event.repeat && !event.isComposing && !event.altKey && !event.ctrlKey && !event.metaKey
const accepted = (rule === 'submit' && event.type === 'submit' && host.tagName === 'FORM')
|| ((rule === 'click' || rule === 'card') && event.type === 'click')
|| keyboardCard
if (!accepted) return
// Only an allowlisted category and event kind leave this listener. No text, values,
// resource/identity fields, hrefs, query strings, cookies, storage or network access.
try { onIntent(Object.freeze({ id, event: event.type })) } catch { /* app stays usable */ }
}
for (const type of ['click', 'submit', 'keydown']) root.addEventListener(type, observe, true)
const stop = () => {
if (activeRoots.get(root) !== stop) return
for (const type of ['click', 'submit', 'keydown']) root.removeEventListener(type, observe, true)
activeRoots.delete(root)
}
activeRoots.set(root, stop)
return stop
}

View file

@ -0,0 +1,951 @@
{
"schema": 1,
"description": "Source declarations, not runtime DOM counts, pageviews, successful outcomes or a closed runtime enum. Forwarding sites require explicit callers. See frontend-analytics.md for gaps and event policy.",
"counts": {"routes":54,"uniqueIds":804,"literalJsxSites":821,"literalJsxValues":975,"navigationDefinitions":29,"forwardingSites":36},
"routes": [
{"name":"landingRoute","path":"/","declaration":{"file":"web/src/app/router.tsx","line":256},"implementation":{"file":"web/src/pages/landing.tsx","line":257,"export":"LandingPage"},"guarded":false,"roleProtected":false},
{"name":"skillsRoute","path":"skills","declaration":{"file":"web/src/app/router.tsx","line":262},"implementation":{"file":"web/src/pages/home.tsx","line":12,"export":"HomePage"},"guarded":false,"roleProtected":false},
{"name":"loginRoute","path":"login","declaration":{"file":"web/src/app/router.tsx","line":268},"implementation":{"file":"web/src/pages/login.tsx","line":22,"export":"LoginPage"},"guarded":true,"roleProtected":false},
{"name":"registerRoute","path":"register","declaration":{"file":"web/src/app/router.tsx","line":279},"implementation":{"file":"web/src/pages/register.tsx","line":55,"export":"RegisterPage"},"guarded":false,"roleProtected":false},
{"name":"resetPasswordRoute","path":"reset-password","declaration":{"file":"web/src/app/router.tsx","line":288},"implementation":{"file":"web/src/pages/reset-password.tsx","line":13,"export":"ResetPasswordPage"},"guarded":false,"roleProtected":false},
{"name":"privacyRoute","path":"privacy","declaration":{"file":"web/src/app/router.tsx","line":294},"implementation":{"file":"web/src/pages/privacy.tsx","line":153,"export":"PrivacyPolicyPage"},"guarded":false,"roleProtected":false},
{"name":"searchRoute","path":"search","declaration":{"file":"web/src/app/router.tsx","line":300},"implementation":{"file":"web/src/pages/search.tsx","line":88,"export":"SearchPage"},"guarded":false,"roleProtected":false},
{"name":"githubSkillsRoute","path":"github","declaration":{"file":"web/src/app/router.tsx","line":316},"implementation":{"file":"web/src/pages/github-skills.tsx","line":39,"export":"GithubSkillsPage"},"guarded":false,"roleProtected":false},
{"name":"suitesRoute","path":"suites","declaration":{"file":"web/src/app/router.tsx","line":327},"implementation":{"file":"web/src/pages/suites.tsx","line":17,"export":"SuitesPage"},"guarded":false,"roleProtected":false},
{"name":"suiteDetailRoute","path":"/suite/$namespace/$slug","declaration":{"file":"web/src/app/router.tsx","line":333},"implementation":{"file":"web/src/pages/suite-detail.tsx","line":22,"export":"SuiteDetailPage"},"guarded":false,"roleProtected":false},
{"name":"termsRoute","path":"terms","declaration":{"file":"web/src/app/router.tsx","line":342},"implementation":{"file":"web/src/pages/terms.tsx","line":169,"export":"TermsOfServicePage"},"guarded":false,"roleProtected":false},
{"name":"namespaceRoute","path":"/space/$namespace","declaration":{"file":"web/src/app/router.tsx","line":348},"implementation":{"file":"web/src/pages/namespace.tsx","line":5,"export":"NamespacePage"},"guarded":true,"roleProtected":false},
{"name":"joinRoute","path":"join","declaration":{"file":"web/src/app/router.tsx","line":355},"implementation":{"file":"web/src/pages/join.tsx","line":12,"export":"JoinPage"},"guarded":true,"roleProtected":false},
{"name":"skillDetailRoute","path":"/space/$namespace/$slug","declaration":{"file":"web/src/app/router.tsx","line":362},"implementation":{"file":"web/src/pages/skill-detail.tsx","line":133,"export":"SkillDetailPage"},"guarded":false,"roleProtected":false},
{"name":"skillVersionCompareRoute","path":"/space/$namespace/$slug/compare","declaration":{"file":"web/src/app/router.tsx","line":372},"implementation":{"file":"web/src/pages/skill-version-compare.tsx","line":22,"export":"SkillVersionComparePage"},"guarded":false,"roleProtected":false},
{"name":"dashboardRoute","path":"dashboard","declaration":{"file":"web/src/app/router.tsx","line":382},"implementation":{"file":"web/src/pages/dashboard.tsx","line":98,"export":"DashboardPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardSkillsRoute","path":"dashboard/skills","declaration":{"file":"web/src/app/router.tsx","line":389},"implementation":{"file":"web/src/pages/dashboard/my-skills.tsx","line":46,"export":"MySkillsPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardPublishRoute","path":"dashboard/publish","declaration":{"file":"web/src/app/router.tsx","line":402},"implementation":{"file":"web/src/pages/dashboard/publish.tsx","line":41,"export":"PublishPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardSuiteCreateRoute","path":"dashboard/suites/new","declaration":{"file":"web/src/app/router.tsx","line":428},"implementation":{"file":"web/src/pages/dashboard/suite-editor.tsx","line":716,"export":"SuiteCreatePage"},"guarded":true,"roleProtected":false},
{"name":"dashboardSuitesRoute","path":"dashboard/suites","declaration":{"file":"web/src/app/router.tsx","line":435},"implementation":{"file":"web/src/pages/dashboard/my-suites.tsx","line":21,"export":"MySuitesPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardSuiteManagementRoute","path":"dashboard/suites/$namespace/$slug","declaration":{"file":"web/src/app/router.tsx","line":445},"implementation":{"file":"web/src/pages/dashboard/suite-management.tsx","line":31,"export":"SuiteManagementPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardSuitePublishingTaskRoute","path":"dashboard/suites/publishing/$operationId","declaration":{"file":"web/src/app/router.tsx","line":461},"implementation":{"file":"web/src/pages/dashboard/suite-publishing-task.tsx","line":6,"export":"SuitePublishingTaskPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardSuiteEditRoute","path":"dashboard/suites/$namespace/$slug/edit","declaration":{"file":"web/src/app/router.tsx","line":479},"implementation":{"file":"web/src/pages/dashboard/suite-editor.tsx","line":720,"export":"SuiteEditPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardSuiteVersionCreateRoute","path":"dashboard/suites/$namespace/$slug/new-version","declaration":{"file":"web/src/app/router.tsx","line":489},"implementation":{"file":"web/src/pages/dashboard/suite-editor.tsx","line":726,"export":"SuiteVersionCreatePage"},"guarded":true,"roleProtected":false},
{"name":"dashboardNamespacesRoute","path":"dashboard/namespaces","declaration":{"file":"web/src/app/router.tsx","line":501},"implementation":{"file":"web/src/pages/dashboard/my-namespaces.tsx","line":18,"export":"MyNamespacesPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardNamespaceManagementRoute","path":"dashboard/namespaces/$slug","declaration":{"file":"web/src/app/router.tsx","line":508},"implementation":{"file":"web/src/pages/dashboard/namespace-management.tsx","line":7,"export":"NamespaceManagementPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardNamespaceSettingsRoute","path":"dashboard/namespaces/$slug/settings","declaration":{"file":"web/src/app/router.tsx","line":515},"implementation":{"file":"web/src/pages/dashboard/namespace-settings.tsx","line":14,"export":"NamespaceSettingsPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardNamespaceMembersRoute","path":"dashboard/namespaces/$slug/members","declaration":{"file":"web/src/app/router.tsx","line":522},"implementation":{"file":"web/src/pages/dashboard/namespace-members.tsx","line":45,"export":"NamespaceMembersPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardNamespaceReviewsRoute","path":"dashboard/namespaces/$slug/reviews","declaration":{"file":"web/src/app/router.tsx","line":529},"implementation":{"file":"web/src/pages/dashboard/namespace-reviews.tsx","line":145,"export":"NamespaceReviewsPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardNamespaceGithubSourcesRoute","path":"dashboard/namespaces/$slug/github-sources","declaration":{"file":"web/src/app/router.tsx","line":539},"implementation":{"file":"web/src/pages/dashboard/namespace-github-sources.tsx","line":26,"export":"NamespaceGithubSourcesPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardGovernanceRoute","path":"dashboard/governance","declaration":{"file":"web/src/app/router.tsx","line":546},"implementation":{"file":"web/src/pages/dashboard/governance.tsx","line":40,"export":"GovernancePage"},"guarded":true,"roleProtected":false},
{"name":"dashboardGithubSyncRoute","path":"dashboard/github-sync","declaration":{"file":"web/src/app/router.tsx","line":553},"implementation":{"file":"web/src/pages/dashboard/github-sync.tsx","line":20,"export":"GithubSyncPage"},"guarded":true,"roleProtected":true},
{"name":"dashboardGithubDeepDiscoveryRoute","path":"dashboard/github-deep-discovery","declaration":{"file":"web/src/app/router.tsx","line":586},"implementation":null,"guarded":true,"roleProtected":false},
{"name":"dashboardReviewsRoute","path":"dashboard/reviews","declaration":{"file":"web/src/app/router.tsx","line":595},"implementation":{"file":"web/src/pages/dashboard/reviews.tsx","line":39,"export":"ReviewsPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardReviewProgressRoute","path":"dashboard/review-progress","declaration":{"file":"web/src/app/router.tsx","line":605},"implementation":{"file":"web/src/pages/dashboard/review-progress.tsx","line":27,"export":"ReviewProgressPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardReportsRoute","path":"dashboard/reports","declaration":{"file":"web/src/app/router.tsx","line":627},"implementation":{"file":"web/src/pages/dashboard/reports.tsx","line":31,"export":"ReportsPage"},"guarded":true,"roleProtected":true},
{"name":"dashboardReviewDetailRoute","path":"dashboard/reviews/$id","declaration":{"file":"web/src/app/router.tsx","line":634},"implementation":{"file":"web/src/pages/dashboard/review-detail.tsx","line":530,"export":"ReviewDetailPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardNamespaceReviewDetailRoute","path":"dashboard/namespaces/$slug/reviews/$id","declaration":{"file":"web/src/app/router.tsx","line":641},"implementation":{"file":"web/src/pages/dashboard/review-detail.tsx","line":542,"export":"NamespaceReviewDetailPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardPromotionsRoute","path":"dashboard/promotions","declaration":{"file":"web/src/app/router.tsx","line":648},"implementation":{"file":"web/src/pages/dashboard/promotions.tsx","line":408,"export":"PromotionsPage"},"guarded":true,"roleProtected":true},
{"name":"dashboardStarsRoute","path":"dashboard/stars","declaration":{"file":"web/src/app/router.tsx","line":655},"implementation":{"file":"web/src/pages/dashboard/stars.tsx","line":12,"export":"MyStarsPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardSubscriptionsRoute","path":"dashboard/subscriptions","declaration":{"file":"web/src/app/router.tsx","line":665},"implementation":{"file":"web/src/pages/dashboard/subscriptions.tsx","line":12,"export":"MySubscriptionsPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardNotificationsRoute","path":"dashboard/notifications","declaration":{"file":"web/src/app/router.tsx","line":675},"implementation":{"file":"web/src/pages/notifications.tsx","line":48,"export":"NotificationsPage"},"guarded":true,"roleProtected":false},
{"name":"dashboardTokensRoute","path":"dashboard/tokens","declaration":{"file":"web/src/app/router.tsx","line":682},"implementation":{"file":"web/src/pages/dashboard/tokens.tsx","line":8,"export":"TokensPage"},"guarded":true,"roleProtected":false},
{"name":"cliAuthRoute","path":"cli/auth","declaration":{"file":"web/src/app/router.tsx","line":689},"implementation":{"file":"web/src/pages/cli-auth.tsx","line":48,"export":"CliAuthPage"},"guarded":false,"roleProtected":false},
{"name":"deviceAuthRoute","path":"device","declaration":{"file":"web/src/app/router.tsx","line":704},"implementation":{"file":"web/src/pages/device.tsx","line":20,"export":"DeviceAuthPage"},"guarded":false,"roleProtected":false},
{"name":"settingsSecurityRoute","path":"settings/security","declaration":{"file":"web/src/app/router.tsx","line":710},"implementation":{"file":"web/src/pages/settings/security.tsx","line":28,"export":"SecuritySettingsPage"},"guarded":true,"roleProtected":false},
{"name":"settingsProfileRoute","path":"settings/profile","declaration":{"file":"web/src/app/router.tsx","line":717},"implementation":{"file":"web/src/pages/settings/profile.tsx","line":40,"export":"ProfileSettingsPage"},"guarded":true,"roleProtected":false},
{"name":"settingsNotificationsRoute","path":"settings/notifications","declaration":{"file":"web/src/app/router.tsx","line":724},"implementation":{"file":"web/src/pages/settings/notification-settings.tsx","line":8,"export":"NotificationSettingsPage"},"guarded":true,"roleProtected":false},
{"name":"settingsAccountsRoute","path":"settings/accounts","declaration":{"file":"web/src/app/router.tsx","line":731},"implementation":null,"guarded":true,"roleProtected":false},
{"name":"adminUsersRoute","path":"admin/users","declaration":{"file":"web/src/app/router.tsx","line":740},"implementation":{"file":"web/src/pages/admin/users.tsx","line":47,"export":"AdminUsersPage"},"guarded":true,"roleProtected":true},
{"name":"adminAuditLogRoute","path":"admin/audit-log","declaration":{"file":"web/src/app/router.tsx","line":747},"implementation":{"file":"web/src/pages/admin/audit-log.tsx","line":50,"export":"AuditLogPage"},"guarded":true,"roleProtected":true},
{"name":"adminLabelsRoute","path":"admin/labels","declaration":{"file":"web/src/app/router.tsx","line":754},"implementation":{"file":"web/src/pages/admin/labels.tsx","line":118,"export":"AdminLabelsPage"},"guarded":true,"roleProtected":true},
{"name":"systemConfigRoute","path":"admin/system-config","declaration":{"file":"web/src/app/router.tsx","line":761},"implementation":{"file":"web/src/pages/admin/system-config.tsx","line":13,"export":"SystemConfigPage"},"guarded":true,"roleProtected":true},
{"name":"adminNamespacesRoute","path":"admin/namespaces","declaration":{"file":"web/src/app/router.tsx","line":768},"implementation":{"file":"web/src/pages/admin/namespaces.tsx","line":104,"export":"AdminNamespacesPage"},"guarded":true,"roleProtected":true}
],
"definitions": [
{"file":"web/src/app/layout.tsx","line":89,"ids":["navigation.home.open"]},
{"file":"web/src/app/layout.tsx","line":90,"ids":["skill.publish.open"]},
{"file":"web/src/app/layout.tsx","line":91,"ids":["navigation.skills.open"]},
{"file":"web/src/app/layout.tsx","line":92,"ids":["navigation.github.open"]},
{"file":"web/src/app/layout.tsx","line":93,"ids":["navigation.suites.open"]},
{"file":"web/src/app/layout.tsx","line":94,"ids":["navigation.dashboard.open"]},
{"file":"web/src/features/namespace/namespace-management-nav.tsx","line":26,"ids":["namespace.skills.open"]},
{"file":"web/src/features/namespace/namespace-management-nav.tsx","line":27,"ids":["namespace.members.open"]},
{"file":"web/src/features/namespace/namespace-management-nav.tsx","line":28,"ids":["namespace.reviews.open"]},
{"file":"web/src/features/namespace/namespace-management-nav.tsx","line":29,"ids":["namespace.settings.open"]},
{"file":"web/src/pages/dashboard.tsx","line":41,"ids":["account.profile.open"]},
{"file":"web/src/pages/dashboard.tsx","line":42,"ids":["account.security.open"]},
{"file":"web/src/pages/dashboard.tsx","line":43,"ids":["notification.settings.open"]},
{"file":"web/src/pages/dashboard.tsx","line":49,"ids":["navigation.owned.skills"]},
{"file":"web/src/pages/dashboard.tsx","line":50,"ids":["navigation.owned.suites"]},
{"file":"web/src/pages/dashboard.tsx","line":51,"ids":["namespace.list.open"]},
{"file":"web/src/pages/dashboard.tsx","line":52,"ids":["navigation.starred.open"]},
{"file":"web/src/pages/dashboard.tsx","line":53,"ids":["navigation.subscriptions.open"]},
{"file":"web/src/pages/dashboard.tsx","line":54,"ids":["account.tokens.open"]},
{"file":"web/src/pages/dashboard.tsx","line":55,"ids":["review.progress.open"]},
{"file":"web/src/pages/dashboard.tsx","line":61,"ids":["governance.center.open"]},
{"file":"web/src/pages/dashboard.tsx","line":62,"ids":["report.queue.open"]},
{"file":"web/src/pages/dashboard.tsx","line":63,"ids":["github.sync.open"]},
{"file":"web/src/pages/dashboard.tsx","line":87,"ids":["navigation.owned.skills"]},
{"file":"web/src/pages/dashboard.tsx","line":88,"ids":["navigation.owned.suites"]},
{"file":"web/src/pages/dashboard.tsx","line":89,"ids":["account.tokens.open"]},
{"file":"web/src/pages/dashboard.tsx","line":90,"ids":["navigation.starred.open"]},
{"file":"web/src/pages/dashboard.tsx","line":91,"ids":["account.profile.open"]},
{"file":"web/src/pages/dashboard.tsx","line":92,"ids":["account.security.open"]}
],
"sites": [
{"file":"web/src/app/layout.tsx","line":126,"host":"Link","prop":"data-analytics-id","event":"click","ids":["navigation.home.open"]},
{"file":"web/src/app/layout.tsx","line":139,"host":"Link","prop":"data-analytics-id","event":"click","forward":"item.analyticsId"},
{"file":"web/src/app/layout.tsx","line":159,"host":"button","prop":"data-analytics-id","event":"click","ids":["navigation.menu.toggle"]},
{"file":"web/src/app/layout.tsx","line":175,"host":"Link","prop":"data-analytics-id","event":"click","ids":["auth.login.open"]},
{"file":"web/src/app/layout.tsx","line":193,"host":"Link","prop":"data-analytics-id","event":"click","forward":"item.analyticsId"},
{"file":"web/src/app/layout.tsx","line":251,"host":"Link","prop":"data-analytics-id","event":"click","ids":["navigation.skills.open"]},
{"file":"web/src/app/layout.tsx","line":252,"host":"Link","prop":"data-analytics-id","event":"click","ids":["skill.publish.open"]},
{"file":"web/src/app/layout.tsx","line":253,"host":"Link","prop":"data-analytics-id","event":"click","ids":["navigation.dashboard.open"]},
{"file":"web/src/app/layout.tsx","line":260,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.documentation.open"]},
{"file":"web/src/app/layout.tsx","line":261,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.cli.open"]},
{"file":"web/src/app/layout.tsx","line":262,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.repository.open"]},
{"file":"web/src/app/layout.tsx","line":269,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.license.open"]},
{"file":"web/src/app/layout.tsx","line":270,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.contributing.open"]},
{"file":"web/src/app/layout.tsx","line":271,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.changelog.open"]},
{"file":"web/src/app/layout.tsx","line":272,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.conduct.open"]},
{"file":"web/src/app/layout.tsx","line":279,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.community.open"]},
{"file":"web/src/app/layout.tsx","line":280,"host":"Link","prop":"data-analytics-id","event":"click","ids":["navigation.privacy.open"]},
{"file":"web/src/app/layout.tsx","line":281,"host":"Link","prop":"data-analytics-id","event":"click","ids":["navigation.terms.open"]},
{"file":"web/src/features/auth/auth-shell.tsx","line":19,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.home.open"]},
{"file":"web/src/features/auth/auth-shell.tsx","line":28,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.home.open"]},
{"file":"web/src/features/auth/login-button.tsx","line":71,"host":"Button","prop":"data-analytics-id","event":"click","ids":["auth.oauth.request"]},
{"file":"web/src/features/auth/session-bootstrap-entry.tsx","line":54,"host":"Button","prop":"data-analytics-id","event":"click","ids":["auth.sso.request"]},
{"file":"web/src/features/auth/session-bootstrap-entry.tsx","line":94,"host":"Button","prop":"data-analytics-id","event":"click","ids":["auth.sso.request"]},
{"file":"web/src/features/github-sync/github-admission-config.tsx","line":52,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.admission.edit"]},
{"file":"web/src/features/github-sync/github-admission-config.tsx","line":61,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["github.admission.cancel"]},
{"file":"web/src/features/github-sync/github-admission-config.tsx","line":63,"host":"form","prop":"data-analytics-id","event":"submit","ids":["github.admission.save"]},
{"file":"web/src/features/github-sync/github-admission-config.tsx","line":70,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.admission.cancel"]},
{"file":"web/src/features/github-sync/github-credential-config.tsx","line":69,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.credential.create"]},
{"file":"web/src/features/github-sync/github-credential-config.tsx","line":72,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["github.credential.create.cancel","github.credential.replace.cancel"],"conditional":true},
{"file":"web/src/features/github-sync/github-credential-config.tsx","line":74,"host":"form","prop":"data-analytics-id","event":"submit","ids":["github.credential.create.submit","github.credential.replace.submit"],"conditional":true},
{"file":"web/src/features/github-sync/github-credential-config.tsx","line":82,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.credential.create.cancel","github.credential.replace.cancel"],"conditional":true},
{"file":"web/src/features/github-sync/github-credential-config.tsx","line":114,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.credential.replace"]},
{"file":"web/src/features/github-sync/github-credential-config.tsx","line":117,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.credential.disable","github.credential.enable"],"conditional":true},
{"file":"web/src/features/github-sync/github-deep-discovery-config.tsx","line":65,"host":"input","prop":"data-analytics-id","event":"change","ids":["github.discovery.toggle"]},
{"file":"web/src/features/github-sync/github-deep-discovery-config.tsx","line":72,"host":"input","prop":"data-analytics-id","event":"change","ids":["github.discovery.budget.accelerated","github.discovery.budget.balanced","github.discovery.budget.economy"],"conditional":true},
{"file":"web/src/features/github-sync/github-deep-discovery-config.tsx","line":82,"host":"form","prop":"data-analytics-id","event":"submit","ids":["github.exclusion.add"]},
{"file":"web/src/features/github-sync/github-deep-discovery-config.tsx","line":83,"host":"select","prop":"data-analytics-id","event":"change","ids":["github.exclusion.kind"]},
{"file":"web/src/features/github-sync/github-deep-discovery-config.tsx","line":96,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.exclusion.remove"]},
{"file":"web/src/features/github-sync/github-deep-discovery-config.tsx","line":103,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.discovery.reload"]},
{"file":"web/src/features/github-sync/github-deep-discovery-config.tsx","line":105,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.discovery.cancel"]},
{"file":"web/src/features/github-sync/github-deep-discovery-config.tsx","line":106,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.discovery.save"]},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":171,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.owner.create"]},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":172,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.rule.create"]},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":176,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["github.owner.cancel","github.rule.create.cancel","github.rule.edit.cancel"],"conditional":true},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":191,"host":"form","prop":"data-analytics-id","event":"submit","ids":["github.owner.add"]},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":206,"host":"form","prop":"data-analytics-id","event":"submit","ids":["github.rule.create.submit","github.rule.edit.submit"],"conditional":true},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":219,"host":"option","prop":"data-analytics-id","event":"change-selected-option","ids":["github.selector.kind.keyword"]},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":219,"host":"option","prop":"data-analytics-id","event":"change-selected-option","ids":["github.selector.kind.topic"]},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":224,"host":"option","prop":"data-analytics-id","event":"change-selected-option","ids":["github.selector.priority.core"]},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":224,"host":"option","prop":"data-analytics-id","event":"change-selected-option","ids":["github.selector.priority.extension"]},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":232,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.selector.remove"]},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":236,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.selector.add"]},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":239,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.rule.preview"]},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":240,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.rule.create.cancel","github.rule.edit.cancel"],"conditional":true},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":295,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.rule.edit"]},
{"file":"web/src/features/github-sync/github-discovery-config.tsx","line":296,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.owner.disable","github.owner.enable","github.rule.disable","github.rule.enable"],"conditional":true},
{"file":"web/src/features/github-sync/github-retry-rejected-skill-button.tsx","line":30,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.rejected.retry"]},
{"file":"web/src/features/github-sync/github-schedule-config.tsx","line":56,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.schedule.edit"]},
{"file":"web/src/features/github-sync/github-schedule-config.tsx","line":63,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["github.schedule.cancel"]},
{"file":"web/src/features/github-sync/github-schedule-config.tsx","line":65,"host":"form","prop":"data-analytics-id","event":"submit","ids":["github.schedule.save"]},
{"file":"web/src/features/github-sync/github-schedule-config.tsx","line":74,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.schedule.cancel"]},
{"file":"web/src/features/github-sync/github-source-ignore-editor.tsx","line":60,"host":"form","prop":"data-analytics-id","event":"submit","ids":["github.ignore.save"]},
{"file":"web/src/features/github-sync/github-source-rescan-button.tsx","line":30,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.source.rescan"]},
{"file":"web/src/features/github-sync/github-sync-collection-drawer.tsx","line":57,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["github.collection.close"]},
{"file":"web/src/features/github-sync/github-sync-collection-drawer.tsx","line":75,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.discovery.edit"]},
{"file":"web/src/features/github-sync/github-sync-collection-drawer.tsx","line":78,"host":"button","prop":"data-analytics-id","event":"click","ids":["github.progress.toggle"]},
{"file":"web/src/features/github-sync/github-sync-collection-drawer.tsx","line":88,"host":"form","prop":"data-analytics-id","event":"submit","ids":["github.repository.add"]},
{"file":"web/src/features/github-sync/github-sync-collection-drawer.tsx","line":98,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.repository.open"]},
{"file":"web/src/features/github-sync/github-sync-collection-drawer.tsx","line":98,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.repository.toggle"]},
{"file":"web/src/features/github-sync/github-sync-collection-drawer.tsx","line":102,"host":"button","prop":"data-analytics-id","event":"click","ids":["github.acquisition.toggle"]},
{"file":"web/src/features/github-sync/github-sync-conflict-binder.tsx","line":49,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.binding.conflict.open","github.binding.pathmove.open"],"conditional":true},
{"file":"web/src/features/github-sync/github-sync-conflict-binder.tsx","line":53,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["github.binding.conflict.cancel","github.binding.pathmove.cancel"],"conditional":true},
{"file":"web/src/features/github-sync/github-sync-conflict-binder.tsx","line":60,"host":"form","prop":"data-analytics-id","event":"submit","ids":["github.binding.conflict.confirm","github.binding.pathmove.confirm"],"conditional":true},
{"file":"web/src/features/github-sync/github-sync-conflict-binder.tsx","line":68,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.binding.conflict.cancel","github.binding.pathmove.cancel"],"conditional":true},
{"file":"web/src/features/github-sync/github-sync-overview.tsx","line":50,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.settings.open"]},
{"file":"web/src/features/github-sync/github-sync-overview.tsx","line":51,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.settings.open"]},
{"file":"web/src/features/github-sync/github-sync-overview.tsx","line":52,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.collection.open"]},
{"file":"web/src/features/github-sync/github-sync-overview.tsx","line":59,"host":"Link","prop":"data-analytics-id","event":"click","ids":["review.queue.open"]},
{"file":"web/src/features/github-sync/github-sync-overview.tsx","line":67,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.runs.open"]},
{"file":"web/src/features/github-sync/github-sync-overview.tsx","line":71,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.run.open"]},
{"file":"web/src/features/github-sync/github-sync-platform-control.tsx","line":40,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.platform.pause.request","github.platform.resume.request"],"conditional":true},
{"file":"web/src/features/github-sync/github-sync-platform-control.tsx","line":43,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["github.platform.pause.cancel","github.platform.resume.cancel"],"conditional":true},
{"file":"web/src/features/github-sync/github-sync-platform-control.tsx","line":44,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.platform.pause.cancel","github.platform.resume.cancel"],"conditional":true},
{"file":"web/src/features/github-sync/github-sync-platform-control.tsx","line":44,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.platform.pause.confirm","github.platform.resume.confirm"],"conditional":true},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":26,"host":"select","prop":"data-analytics-id","event":"change","forward":"analyticsId"},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":54,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["github.repository.close"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":60,"host":"a","prop":"data-analytics-id","event":"click","ids":["github.repository.external"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":69,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.run.open"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":74,"host":"Pagination","prop":"analyticsId","event":"click","ids":["github.provenance.paginate"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":79,"host":"Link","prop":"data-analytics-id","event":"click","ids":["review.detail.open"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":80,"host":"Pagination","prop":"analyticsId","event":"click","ids":["github.path.paginate"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":82,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.source.actions"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":83,"host":"Link","prop":"data-analytics-id","event":"click","ids":["review.queue.open"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":117,"host":"form","prop":"data-analytics-id","event":"submit","ids":["github.repository.search"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":119,"host":"SelectFilter","prop":"analyticsId","event":"change","ids":["github.repository.origin.filter"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":120,"host":"SelectFilter","prop":"analyticsId","event":"change","ids":["github.repository.state.filter"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":121,"host":"SelectFilter","prop":"analyticsId","event":"change","ids":["github.repository.source.status.filter"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":124,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.repository.refresh"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":134,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.repository.open"]},
{"file":"web/src/features/github-sync/github-sync-repositories.tsx","line":137,"host":"Pagination","prop":"analyticsId","event":"click","ids":["github.repository.paginate"]},
{"file":"web/src/features/github-sync/github-sync-run-detail.tsx","line":25,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.runs.open"]},
{"file":"web/src/features/github-sync/github-sync-run-detail.tsx","line":68,"host":"Pagination","prop":"analyticsId","event":"click","ids":["github.path.paginate"]},
{"file":"web/src/features/github-sync/github-sync-run-detail.tsx","line":84,"host":"Pagination","prop":"analyticsId","event":"click","ids":["github.task.paginate"]},
{"file":"web/src/features/github-sync/github-sync-run-list.tsx","line":60,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.run.open"]},
{"file":"web/src/features/github-sync/github-sync-run-list.tsx","line":66,"host":"Pagination","prop":"analyticsId","event":"click","ids":["github.run.paginate"]},
{"file":"web/src/features/github-sync/github-sync-runs-section.tsx","line":16,"host":"select","prop":"data-analytics-id","event":"change","ids":["github.run.kind"]},
{"file":"web/src/features/github-sync/github-sync-runs-section.tsx","line":19,"host":"select","prop":"data-analytics-id","event":"change","ids":["github.run.status"]},
{"file":"web/src/features/github-sync/github-sync-settings-drawer.tsx","line":14,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["github.settings.close"]},
{"file":"web/src/features/github-sync/github-sync-source-detail.tsx","line":42,"host":"Pagination","prop":"analyticsId","event":"click","ids":["github.source.paginate"]},
{"file":"web/src/features/governance/governance-inbox.tsx","line":70,"host":"Button","prop":"data-analytics-id","event":"click","ids":["governance.promotion.open","governance.report.open","governance.review.open","governance.skill.open"],"conditional":true},
{"file":"web/src/features/governance/governance-notifications.tsx","line":48,"host":"Button","prop":"data-analytics-id","event":"click","ids":["notification.read.request"]},
{"file":"web/src/features/namespace/add-namespace-member-dialog.tsx","line":110,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["namespace.member.cancel"]},
{"file":"web/src/features/namespace/add-namespace-member-dialog.tsx","line":122,"host":"Input","prop":"data-analytics-id","event":"keydown-enter","ids":["namespace.member.search"]},
{"file":"web/src/features/namespace/add-namespace-member-dialog.tsx","line":139,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.member.search"]},
{"file":"web/src/features/namespace/add-namespace-member-dialog.tsx","line":171,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.member.select"]},
{"file":"web/src/features/namespace/add-namespace-member-dialog.tsx","line":196,"host":"Input","prop":"data-analytics-id","event":"keydown-enter","ids":["namespace.member.add"]},
{"file":"web/src/features/namespace/add-namespace-member-dialog.tsx","line":225,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["namespace.member.role.interact"]},
{"file":"web/src/features/namespace/add-namespace-member-dialog.tsx","line":230,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["namespace.member.role.admin","namespace.member.role.member"],"conditional":true},
{"file":"web/src/features/namespace/add-namespace-member-dialog.tsx","line":244,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.member.cancel"]},
{"file":"web/src/features/namespace/add-namespace-member-dialog.tsx","line":247,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.member.add"]},
{"file":"web/src/features/namespace/batch-import-members-dialog.tsx","line":168,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["namespace.import.cancel","namespace.import.close"],"conditional":true},
{"file":"web/src/features/namespace/batch-import-members-dialog.tsx","line":178,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.template.download"]},
{"file":"web/src/features/namespace/batch-import-members-dialog.tsx","line":181,"host":"div","prop":"data-analytics-id","event":"click+keydown-enter-space","ids":["namespace.import.choose"]},
{"file":"web/src/features/namespace/batch-import-members-dialog.tsx","line":197,"host":"input","prop":"data-analytics-id","event":"change","ids":["namespace.import.select"]},
{"file":"web/src/features/namespace/batch-import-members-dialog.tsx","line":280,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.import.cancel"]},
{"file":"web/src/features/namespace/batch-import-members-dialog.tsx","line":286,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.import.reset"]},
{"file":"web/src/features/namespace/batch-import-members-dialog.tsx","line":289,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.import.confirm"]},
{"file":"web/src/features/namespace/batch-import-members-dialog.tsx","line":301,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.import.close"]},
{"file":"web/src/features/namespace/create-namespace-dialog.tsx","line":145,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["namespace.create.cancel"]},
{"file":"web/src/features/namespace/create-namespace-dialog.tsx","line":156,"host":"Input","prop":"data-analytics-id","event":"keydown-enter","ids":["namespace.create.request"]},
{"file":"web/src/features/namespace/create-namespace-dialog.tsx","line":186,"host":"Input","prop":"data-analytics-id","event":"keydown-enter","ids":["namespace.create.request"]},
{"file":"web/src/features/namespace/create-namespace-dialog.tsx","line":238,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.create.cancel"]},
{"file":"web/src/features/namespace/create-namespace-dialog.tsx","line":241,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.create.request"]},
{"file":"web/src/features/namespace/edit-namespace-dialog.tsx","line":70,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["namespace.settings.cancel"]},
{"file":"web/src/features/namespace/edit-namespace-dialog.tsx","line":107,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.settings.cancel"]},
{"file":"web/src/features/namespace/edit-namespace-dialog.tsx","line":110,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.settings.save"]},
{"file":"web/src/features/namespace/invitation-controls.tsx","line":118,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.invitation.copy"]},
{"file":"web/src/features/namespace/invitation-controls.tsx","line":126,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.invitation.create"]},
{"file":"web/src/features/namespace/invitation-controls.tsx","line":129,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.invitation.create"]},
{"file":"web/src/features/namespace/invitation-controls.tsx","line":140,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.invitation.retry"]},
{"file":"web/src/features/namespace/invitation-controls.tsx","line":147,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.invitation.replace"]},
{"file":"web/src/features/namespace/invitation-controls.tsx","line":148,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.invitation.revoke"]},
{"file":"web/src/features/namespace/invitation-controls.tsx","line":153,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["namespace.invitation.replace.confirm","namespace.invitation.revoke.confirm"],"conditional":true},
{"file":"web/src/features/namespace/invitation-controls.tsx","line":153,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["namespace.invitation.replace.cancel","namespace.invitation.revoke.cancel"],"conditional":true},
{"file":"web/src/features/namespace/invitation-history.tsx","line":55,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.invitation.refresh"]},
{"file":"web/src/features/namespace/invitation-history.tsx","line":89,"host":"Pagination","prop":"analyticsId","event":"click","ids":["namespace.invitation.paginate"]},
{"file":"web/src/features/namespace/namespace-header.tsx","line":68,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.settings.edit"]},
{"file":"web/src/features/namespace/namespace-management-nav.tsx","line":11,"host":"Link","prop":"data-analytics-id","event":"click","ids":["namespace.list.open"]},
{"file":"web/src/features/namespace/namespace-management-nav.tsx","line":35,"host":"Link","prop":"data-analytics-id","event":"click","forward":"tab.analyticsId"},
{"file":"web/src/features/namespace/namespace-skills.tsx","line":63,"host":"SkillCard","prop":"analyticsId","event":"click+keydown-enter-space","ids":["skill.card.open"]},
{"file":"web/src/features/namespace/namespace-skills.tsx","line":72,"host":"Pagination","prop":"analyticsId","event":"click","ids":["namespace.skill.paginate"]},
{"file":"web/src/features/namespace/transfer-ownership-dialog.tsx","line":77,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["namespace.ownership.cancel"]},
{"file":"web/src/features/namespace/transfer-ownership-dialog.tsx","line":94,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["namespace.ownership.interact"]},
{"file":"web/src/features/namespace/transfer-ownership-dialog.tsx","line":99,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["namespace.ownership.select"]},
{"file":"web/src/features/namespace/transfer-ownership-dialog.tsx","line":132,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.ownership.cancel"]},
{"file":"web/src/features/namespace/transfer-ownership-dialog.tsx","line":135,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.ownership.confirm"]},
{"file":"web/src/features/notification/notification-bell.tsx","line":41,"host":"button","prop":"data-analytics-id","event":"click","ids":["notification.menu.toggle"]},
{"file":"web/src/features/notification/notification-dropdown.tsx","line":48,"host":"button","prop":"data-analytics-id","event":"click","ids":["notification.all.read"]},
{"file":"web/src/features/notification/notification-dropdown.tsx","line":75,"host":"Link","prop":"data-analytics-id","event":"click","ids":["notification.fallback.open","notification.promotion.open","notification.report.open","notification.review.detail.open","notification.review.list.open","notification.target.provided.open"],"conditional":true},
{"file":"web/src/features/notification/notification-dropdown.tsx","line":105,"host":"Link","prop":"data-analytics-id","event":"click","ids":["notification.list.open"]},
{"file":"web/src/features/notification/notification-preference-form.tsx","line":75,"host":"button","prop":"data-analytics-id","event":"click","ids":["notification.preference.promotion.toggle","notification.preference.publish.toggle","notification.preference.report.toggle","notification.preference.review.toggle"],"conditional":true},
{"file":"web/src/features/publish/upload-zone.tsx","line":71,"host":"div","prop":"data-analytics-id","event":"click+keydown+drop","ids":[],"conditional":true,"forward":"analyticsId"},
{"file":"web/src/features/publish/upload-zone.tsx","line":81,"host":"input","prop":"data-analytics-id","event":"change","ids":[],"conditional":true,"forward":"analyticsId"},
{"file":"web/src/features/publish/upload-zone.tsx","line":113,"host":"input","prop":"data-analytics-id","event":"change","forward":"folderAnalyticsId"},
{"file":"web/src/features/publish/upload-zone.tsx","line":123,"host":"button","prop":"data-analytics-id","event":"click","forward":"pickerAnalyticsId"},
{"file":"web/src/features/review/github-sync-review-queue.tsx","line":49,"host":"button","prop":"data-analytics-id","event":"click","ids":["review.sync.status"]},
{"file":"web/src/features/review/github-sync-review-queue.tsx","line":62,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["review.sync.sort.interact"]},
{"file":"web/src/features/review/github-sync-review-queue.tsx","line":64,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.sync.sort"]},
{"file":"web/src/features/review/github-sync-review-queue.tsx","line":65,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.sync.sort"]},
{"file":"web/src/features/review/github-sync-review-queue.tsx","line":93,"host":"Link","prop":"data-analytics-id","event":"click","ids":["review.detail.open"]},
{"file":"web/src/features/review/github-sync-review-queue.tsx","line":103,"host":"Pagination","prop":"analyticsId","event":"click","ids":["review.sync.paginate"]},
{"file":"web/src/features/review/github-sync-review-source.tsx","line":79,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.file.previous"]},
{"file":"web/src/features/review/github-sync-review-source.tsx","line":81,"host":"select","prop":"data-analytics-id","event":"change","ids":["review.file.select"]},
{"file":"web/src/features/review/github-sync-review-source.tsx","line":86,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.file.next"]},
{"file":"web/src/features/review/github-sync-review-source.tsx","line":95,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.diff.changes"]},
{"file":"web/src/features/review/github-sync-review-source.tsx","line":96,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.diff.full"]},
{"file":"web/src/features/review/github-sync-review-source.tsx","line":108,"host":"a","prop":"data-analytics-id","event":"click","ids":["review.file.download"]},
{"file":"web/src/features/review/github-sync-review-source.tsx","line":146,"host":"a","prop":"data-analytics-id","event":"click","ids":["review.commit.external"]},
{"file":"web/src/features/review/review-skill-detail-section.tsx","line":60,"host":"a","prop":"data-analytics-id","event":"click","ids":["review.package.download"]},
{"file":"web/src/features/review/review-skill-detail-section.tsx","line":69,"host":"FileTree","prop":"analyticsId","event":"click","ids":["review.file.open"]},
{"file":"web/src/features/review/review-skill-detail-section.tsx","line":81,"host":"a","prop":"data-analytics-id","event":"click","ids":["review.file.download"]},
{"file":"web/src/features/review/review-skill-detail-section.tsx","line":94,"host":"a","prop":"data-analytics-id","event":"click","ids":["review.file.download"]},
{"file":"web/src/features/review/review-skill-detail-section.tsx","line":101,"host":"FilePreviewDialog","prop":"closeAnalyticsId","event":"click","ids":["review.file.close"]},
{"file":"web/src/features/review/review-skill-detail-section.tsx","line":101,"host":"FilePreviewDialog","prop":"downloadAnalyticsId","event":"click","ids":["review.file.download"]},
{"file":"web/src/features/review/review-skill-detail-section.tsx","line":101,"host":"FilePreviewDialog","prop":"copyAnalyticsId","event":"click","ids":["review.file.copy"]},
{"file":"web/src/features/search/search-bar.tsx","line":55,"host":"form","prop":"data-analytics-id","event":"submit","ids":[],"conditional":true,"forward":"analyticsId"},
{"file":"web/src/features/search/search-bar.tsx","line":67,"host":"button","prop":"data-analytics-id","event":"click","ids":["search.query.clear"],"conditional":true},
{"file":"web/src/features/security-audit/security-audit-section.tsx","line":114,"host":"Button","prop":"data-analytics-id","event":"click","ids":["security.findings.toggle"]},
{"file":"web/src/features/security-audit/security-audit-summary.tsx","line":56,"host":"Button","prop":"data-analytics-id","event":"click","ids":["security.scan.retry"]},
{"file":"web/src/features/security-audit/security-audit-summary.tsx","line":71,"host":"Button","prop":"data-analytics-id","event":"click","ids":["security.scan.open"]},
{"file":"web/src/features/security-audit/security-audit-summary.tsx","line":77,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["security.scan.close"]},
{"file":"web/src/features/skill/avatar-review-settings.tsx","line":28,"host":"input","prop":"data-analytics-id","event":"change","ids":["admin.avatar.machine.toggle","admin.avatar.manual.toggle"],"conditional":true},
{"file":"web/src/features/skill/avatar-review-settings.tsx","line":30,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.avatar.settings"]},
{"file":"web/src/features/skill/compliance-snapshot-panel.tsx","line":51,"host":"button","prop":"data-analytics-id","event":"click","ids":["skill.compliance.toggle"]},
{"file":"web/src/features/skill/file-preview-dialog.tsx","line":90,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","forward":"closeAnalyticsId"},
{"file":"web/src/features/skill/file-preview-dialog.tsx","line":101,"host":"Button","prop":"data-analytics-id","event":"click","forward":"copyAnalyticsId"},
{"file":"web/src/features/skill/file-preview-dialog.tsx","line":115,"host":"Button","prop":"data-analytics-id","event":"click","forward":"downloadAnalyticsId"},
{"file":"web/src/features/skill/file-preview-dialog.tsx","line":125,"host":"Button","prop":"data-analytics-id","event":"click","forward":"closeAnalyticsId"},
{"file":"web/src/features/skill/file-preview-dialog.tsx","line":158,"host":"Button","prop":"data-analytics-id","event":"click","forward":"downloadAnalyticsId"},
{"file":"web/src/features/skill/file-tree-node.tsx","line":59,"host":"div","prop":"data-analytics-id","event":"click","forward":"analyticsId"},
{"file":"web/src/features/skill/file-tree-node.tsx","line":81,"host":"div","prop":"data-analytics-id","event":"click","ids":["skill.directory.toggle"],"conditional":true},
{"file":"web/src/features/skill/file-tree-node.tsx","line":102,"host":"FileTreeNodeComponent","prop":"analyticsId","event":"click","forward":"analyticsId"},
{"file":"web/src/features/skill/file-tree.tsx","line":41,"host":"FileTreeNodeComponent","prop":"analyticsId","event":"click","ids":[],"conditional":true,"forward":"analyticsId"},
{"file":"web/src/features/skill/github-skill-source.tsx","line":19,"host":"a","prop":"data-analytics-id","event":"click","ids":["github.repository.external"]},
{"file":"web/src/features/skill/github-skill-source.tsx","line":21,"host":"a","prop":"data-analytics-id","event":"click","ids":["github.commit.external"]},
{"file":"web/src/features/skill/github-skill-source.tsx","line":37,"host":"a","prop":"data-analytics-id","event":"click","ids":["github.file.external"]},
{"file":"web/src/features/skill/install-command.tsx","line":83,"host":"Button","prop":"data-analytics-id","event":"click","forward":"analyticsId"},
{"file":"web/src/features/skill/install-command.tsx","line":116,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","forward":"skillhubAnalyticsId"},
{"file":"web/src/features/skill/install-command.tsx","line":119,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","forward":"clawhubAnalyticsId"},
{"file":"web/src/features/skill/install-command.tsx","line":125,"host":"CommandBlock","prop":"analyticsId","event":"click","forward":"analyticsId"},
{"file":"web/src/features/skill/install-command.tsx","line":129,"host":"CommandBlock","prop":"analyticsId","event":"click","forward":"analyticsId"},
{"file":"web/src/features/skill/install-for-agent-button.tsx","line":56,"host":"button","prop":"data-analytics-id","event":"click","forward":"analyticsId"},
{"file":"web/src/features/skill/markdown-renderer.tsx","line":172,"host":"a","prop":"data-analytics-id","event":"click","ids":["skill.markdown.link"]},
{"file":"web/src/features/skill/share-button.tsx","line":44,"host":"button","prop":"data-analytics-id","event":"click","ids":["skill.share.request"]},
{"file":"web/src/features/skill/skill-avatar-editor.tsx","line":124,"host":"div","prop":"data-analytics-id","event":"drop","ids":["skill.avatar.file.drop"],"conditional":true},
{"file":"web/src/features/skill/skill-avatar-editor.tsx","line":127,"host":"input","prop":"data-analytics-id","event":"change","ids":["skill.avatar.file.select"]},
{"file":"web/src/features/skill/skill-avatar-editor.tsx","line":130,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.avatar.change","skill.avatar.choose"],"conditional":true},
{"file":"web/src/features/skill/skill-avatar-editor.tsx","line":131,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.avatar.remove"]},
{"file":"web/src/features/skill/skill-avatar-editor.tsx","line":132,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.avatar.reset"]},
{"file":"web/src/features/skill/skill-avatar-editor.tsx","line":139,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["skill.avatar.cancel"]},
{"file":"web/src/features/skill/skill-avatar-editor.tsx","line":145,"host":"div","prop":"data-analytics-id","event":"pointerup+keydown-intent","ids":["skill.avatar.crop.adjust"],"conditional":true},
{"file":"web/src/features/skill/skill-avatar-editor.tsx","line":168,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.avatar.cancel"]},
{"file":"web/src/features/skill/skill-avatar-editor.tsx","line":169,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.avatar.retry","skill.avatar.upload"],"conditional":true},
{"file":"web/src/features/skill/skill-avatar-manager.tsx","line":28,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.avatar.refresh"]},
{"file":"web/src/features/skill/skill-avatar-manager.tsx","line":49,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.avatar.appeal"]},
{"file":"web/src/features/skill/skill-avatar-manager.tsx","line":50,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.avatar.retry"]},
{"file":"web/src/features/skill/skill-avatar-takedown.tsx","line":21,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.avatar.takedown"]},
{"file":"web/src/features/skill/skill-card.tsx","line":37,"host":"Card","prop":"data-analytics-id","event":"click+keydown-enter-space","ids":[],"conditional":true,"forward":"analyticsId"},
{"file":"web/src/features/skill/skill-label-panel.tsx","line":181,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.label.privileged.detach","skill.label.recommended.detach","suite.label.privileged.detach","suite.label.recommended.detach"],"conditional":true},
{"file":"web/src/features/skill/skill-label-panel.tsx","line":212,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.label.privileged.attach","skill.label.recommended.attach","suite.label.privileged.attach","suite.label.recommended.attach"],"conditional":true},
{"file":"web/src/features/skill/skill-visibility-dialog.tsx","line":44,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.visibility.open"]},
{"file":"web/src/features/skill/skill-visibility-dialog.tsx","line":51,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["skill.visibility.cancel"]},
{"file":"web/src/features/skill/skill-visibility-dialog.tsx","line":63,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["skill.visibility.interact"]},
{"file":"web/src/features/skill/skill-visibility-dialog.tsx","line":64,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["skill.visibility.namespace","skill.visibility.private","skill.visibility.public"],"conditional":true},
{"file":"web/src/features/skill/skill-visibility-dialog.tsx","line":69,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.visibility.cancel"]},
{"file":"web/src/features/skill/skill-visibility-dialog.tsx","line":70,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.visibility.save"]},
{"file":"web/src/features/social/rating-input.tsx","line":39,"host":"button","prop":"data-analytics-id","event":"click","ids":["skill.rating.five.request","skill.rating.four.request","skill.rating.one.request","skill.rating.three.request","skill.rating.two.request"],"conditional":true},
{"file":"web/src/features/social/skill-reviews.tsx","line":60,"host":"input","prop":"data-analytics-id","event":"change","ids":["skill.comment.rating.five","skill.comment.rating.four","skill.comment.rating.one","skill.comment.rating.three","skill.comment.rating.two"],"conditional":true},
{"file":"web/src/features/social/skill-reviews.tsx","line":143,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.comment.delete"]},
{"file":"web/src/features/social/skill-reviews.tsx","line":147,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.comment.cancel"]},
{"file":"web/src/features/social/skill-reviews.tsx","line":150,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.comment.save"]},
{"file":"web/src/features/social/skill-reviews.tsx","line":212,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.comment.hide","skill.comment.restore"],"conditional":true},
{"file":"web/src/features/social/skill-reviews.tsx","line":269,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.comment.edit"]},
{"file":"web/src/features/social/skill-reviews.tsx","line":273,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.comment.delete"]},
{"file":"web/src/features/social/skill-reviews.tsx","line":318,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.comment.previous"]},
{"file":"web/src/features/social/skill-reviews.tsx","line":322,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.comment.next"]},
{"file":"web/src/features/social/star-button.tsx","line":39,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.star.add","skill.star.remove"],"conditional":true},
{"file":"web/src/features/social/subscribe-button.tsx","line":34,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.subscription.add","skill.subscription.remove"],"conditional":true},
{"file":"web/src/features/suite/resource-card.tsx","line":12,"host":"Card","prop":"data-analytics-id","event":"click+keydown-enter-space","forward":"analyticsId"},
{"file":"web/src/features/suite/suite-bundle-import.tsx","line":241,"host":"UploadZone","prop":"analyticsId","event":"click+keydown+change+drop","ids":["suite.bundle.select"]},
{"file":"web/src/features/suite/suite-bundle-import.tsx","line":241,"host":"UploadZone","prop":"folderAnalyticsId","event":"change","ids":["suite.bundle.folder.select"]},
{"file":"web/src/features/suite/suite-bundle-import.tsx","line":241,"host":"UploadZone","prop":"pickerAnalyticsId","event":"click","ids":["suite.bundle.folder.open"]},
{"file":"web/src/features/suite/suite-bundle-import.tsx","line":317,"host":"input","prop":"data-analytics-id","event":"change","ids":["suite.bundle.warning"]},
{"file":"web/src/features/suite/suite-bundle-import.tsx","line":358,"host":"input","prop":"data-analytics-id","event":"change","ids":["suite.bundle.removals"]},
{"file":"web/src/features/suite/suite-bundle-import.tsx","line":368,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.bundle.reset"]},
{"file":"web/src/features/suite/suite-bundle-import.tsx","line":371,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.bundle.confirm"]},
{"file":"web/src/features/suite/suite-bundle-operation-detail.tsx","line":112,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.operation.retry"]},
{"file":"web/src/features/suite/suite-bundle-operation-detail.tsx","line":123,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.operation.cancel"]},
{"file":"web/src/features/suite/suite-bundle-operation-detail.tsx","line":128,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.operation.restart"]},
{"file":"web/src/features/suite/suite-bundle-operation-detail.tsx","line":131,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.draft.open"]},
{"file":"web/src/features/suite/suite-bundle-operation-detail.tsx","line":137,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.operation.restart"]},
{"file":"web/src/features/suite/suite-bundle-operation-detail.tsx","line":181,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.operation.refresh"]},
{"file":"web/src/features/suite/suite-bundle-operation-detail.tsx","line":280,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.detail.open"]},
{"file":"web/src/features/suite/suite-bundle-operation-detail.tsx","line":310,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["suite.operation.cancel.confirm"]},
{"file":"web/src/features/suite/suite-bundle-operation-detail.tsx","line":310,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["suite.operation.cancel.cancel"]},
{"file":"web/src/features/suite/suite-management-actions.tsx","line":123,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.draft.reopen"]},
{"file":"web/src/features/suite/suite-management-actions.tsx","line":128,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.version.create"]},
{"file":"web/src/features/suite/suite-management-actions.tsx","line":131,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.version.yank"]},
{"file":"web/src/features/suite/suite-management-actions.tsx","line":134,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.hide.request","suite.restore.request"],"conditional":true},
{"file":"web/src/features/suite/suite-management-actions.tsx","line":139,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.archive.request","suite.unarchive.request"],"conditional":true},
{"file":"web/src/features/suite/suite-management-actions.tsx","line":149,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.delete.request"]},
{"file":"web/src/features/suite/suite-management-actions.tsx","line":160,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["suite.archive.confirm","suite.delete.confirm","suite.hide.confirm","suite.restore.confirm","suite.unarchive.confirm"],"conditional":true},
{"file":"web/src/features/suite/suite-management-actions.tsx","line":160,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["suite.archive.cancel","suite.delete.cancel","suite.hide.cancel","suite.restore.cancel","suite.unarchive.cancel"],"conditional":true},
{"file":"web/src/features/suite/suite-management-actions.tsx","line":173,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["suite.version.yank.cancel"]},
{"file":"web/src/features/suite/suite-management-actions.tsx","line":184,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.version.yank.cancel"]},
{"file":"web/src/features/suite/suite-management-actions.tsx","line":185,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.version.yank.confirm"]},
{"file":"web/src/features/suite/suite-member-table.tsx","line":27,"host":"button","prop":"data-analytics-id","event":"click","ids":["suite.members.edit"]},
{"file":"web/src/features/suite/suite-member-table.tsx","line":71,"host":"Link","prop":"data-analytics-id","event":"click","ids":["skill.detail.open"]},
{"file":"web/src/features/suite/suite-member-table.tsx","line":97,"host":"Link","prop":"data-analytics-id","event":"click","ids":["skill.version.open"]},
{"file":"web/src/features/suite/suite-version-ledger.tsx","line":95,"host":"button","prop":"data-analytics-id","event":"click","ids":["suite.version.expand"]},
{"file":"web/src/features/suite/suite-version-ledger.tsx","line":118,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.version.select"]},
{"file":"web/src/features/suite/suite-version-ledger.tsx","line":191,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.draft.edit"]},
{"file":"web/src/features/suite/suite-version-ledger.tsx","line":197,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.publish.direct.request","suite.review.submit.request"],"conditional":true},
{"file":"web/src/features/suite/suite-version-ledger.tsx","line":221,"host":"Link","prop":"data-analytics-id","event":"click","ids":["skill.detail.open"]},
{"file":"web/src/features/suite/suite-workspace-header.tsx","line":26,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.workspace.back"]},
{"file":"web/src/features/token/create-token-dialog.tsx","line":144,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["account.token.create.cancel","account.token.created.close"],"conditional":true},
{"file":"web/src/features/token/create-token-dialog.tsx","line":156,"host":"Input","prop":"data-analytics-id","event":"keydown-enter","ids":["account.token.create"]},
{"file":"web/src/features/token/create-token-dialog.tsx","line":193,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["account.token.create.expiry.interact"]},
{"file":"web/src/features/token/create-token-dialog.tsx","line":197,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["account.token.create.expiry.never"]},
{"file":"web/src/features/token/create-token-dialog.tsx","line":198,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["account.token.create.expiry.week"]},
{"file":"web/src/features/token/create-token-dialog.tsx","line":199,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["account.token.create.expiry.month"]},
{"file":"web/src/features/token/create-token-dialog.tsx","line":200,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["account.token.create.expiry.quarter"]},
{"file":"web/src/features/token/create-token-dialog.tsx","line":201,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["account.token.create.expiry.custom"]},
{"file":"web/src/features/token/create-token-dialog.tsx","line":229,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.token.create.cancel"]},
{"file":"web/src/features/token/create-token-dialog.tsx","line":232,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.token.create"]},
{"file":"web/src/features/token/create-token-dialog.tsx","line":265,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.token.copy"]},
{"file":"web/src/features/token/create-token-dialog.tsx","line":268,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.token.created.close"]},
{"file":"web/src/features/token/token-list.tsx","line":181,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.token.open"]},
{"file":"web/src/features/token/token-list.tsx","line":196,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.token.open"]},
{"file":"web/src/features/token/token-list.tsx","line":233,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.token.expiration.edit"]},
{"file":"web/src/features/token/token-list.tsx","line":242,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.token.revoke"]},
{"file":"web/src/features/token/token-list.tsx","line":260,"host":"Pagination","prop":"analyticsId","event":"click","ids":["account.token.paginate"]},
{"file":"web/src/features/token/token-list.tsx","line":263,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["account.token.revoke.confirm"]},
{"file":"web/src/features/token/token-list.tsx","line":263,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["account.token.revoke.cancel"]},
{"file":"web/src/features/token/token-list.tsx","line":274,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["account.token.expiration.cancel"]},
{"file":"web/src/features/token/token-list.tsx","line":291,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["account.token.edit.expiry.interact"]},
{"file":"web/src/features/token/token-list.tsx","line":295,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["account.token.edit.expiry.never"]},
{"file":"web/src/features/token/token-list.tsx","line":296,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["account.token.edit.expiry.week"]},
{"file":"web/src/features/token/token-list.tsx","line":297,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["account.token.edit.expiry.month"]},
{"file":"web/src/features/token/token-list.tsx","line":298,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["account.token.edit.expiry.quarter"]},
{"file":"web/src/features/token/token-list.tsx","line":299,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["account.token.edit.expiry.custom"]},
{"file":"web/src/features/token/token-list.tsx","line":320,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.token.expiration.cancel"]},
{"file":"web/src/features/token/token-list.tsx","line":323,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.token.expiration.save"]},
{"file":"web/src/pages/admin/audit-log.tsx","line":107,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.audit.rebuild.filter"]},
{"file":"web/src/pages/admin/audit-log.tsx","line":110,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.audit.clear"]},
{"file":"web/src/pages/admin/audit-log.tsx","line":123,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["admin.audit.action.interact"]},
{"file":"web/src/pages/admin/audit-log.tsx","line":128,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.audit.action.all","admin.audit.action.archive","admin.audit.action.cli.publish","admin.audit.action.compat.publish","admin.audit.action.hide","admin.audit.action.promotion.approve","admin.audit.action.promotion.reject","admin.audit.action.promotion.submit","admin.audit.action.report","admin.audit.action.report.dismiss","admin.audit.action.report.resolve","admin.audit.action.review.approve","admin.audit.action.review.reject","admin.audit.action.review.submit","admin.audit.action.search.rebuild","admin.audit.action.unarchive","admin.audit.action.unhide","admin.audit.action.version.yank"],"conditional":true},
{"file":"web/src/pages/admin/audit-log.tsx","line":137,"host":"Input","prop":"data-analytics-id","event":"change","ids":["admin.audit.user.filter"]},
{"file":"web/src/pages/admin/audit-log.tsx","line":145,"host":"Input","prop":"data-analytics-id","event":"change","ids":["admin.audit.request.filter"]},
{"file":"web/src/pages/admin/audit-log.tsx","line":153,"host":"Input","prop":"data-analytics-id","event":"change","ids":["admin.audit.ip.filter"]},
{"file":"web/src/pages/admin/audit-log.tsx","line":161,"host":"Input","prop":"data-analytics-id","event":"change","ids":["admin.audit.type.filter"]},
{"file":"web/src/pages/admin/audit-log.tsx","line":169,"host":"Input","prop":"data-analytics-id","event":"change","ids":["admin.audit.resource.filter"]},
{"file":"web/src/pages/admin/audit-log.tsx","line":177,"host":"Input","prop":"data-analytics-id","event":"change","ids":["admin.audit.start.filter"]},
{"file":"web/src/pages/admin/audit-log.tsx","line":185,"host":"Input","prop":"data-analytics-id","event":"change","ids":["admin.audit.end.filter"]},
{"file":"web/src/pages/admin/audit-log.tsx","line":242,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.audit.previous"]},
{"file":"web/src/pages/admin/audit-log.tsx","line":250,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.audit.next"]},
{"file":"web/src/pages/admin/labels.tsx","line":249,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.label.create"]},
{"file":"web/src/pages/admin/labels.tsx","line":317,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.label.up"]},
{"file":"web/src/pages/admin/labels.tsx","line":320,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.label.down"]},
{"file":"web/src/pages/admin/labels.tsx","line":329,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.label.edit"]},
{"file":"web/src/pages/admin/labels.tsx","line":332,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.label.delete"]},
{"file":"web/src/pages/admin/labels.tsx","line":353,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["admin.label.create.cancel","admin.label.edit.cancel"],"conditional":true},
{"file":"web/src/pages/admin/labels.tsx","line":377,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["admin.label.type.interact"]},
{"file":"web/src/pages/admin/labels.tsx","line":381,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.label.type.recommended"]},
{"file":"web/src/pages/admin/labels.tsx","line":382,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.label.type.privileged"]},
{"file":"web/src/pages/admin/labels.tsx","line":392,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["admin.label.visibility.interact"]},
{"file":"web/src/pages/admin/labels.tsx","line":396,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.label.visibility.visible"]},
{"file":"web/src/pages/admin/labels.tsx","line":397,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.label.visibility.hidden"]},
{"file":"web/src/pages/admin/labels.tsx","line":418,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.label.translation.add"]},
{"file":"web/src/pages/admin/labels.tsx","line":436,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.label.translation.remove"]},
{"file":"web/src/pages/admin/labels.tsx","line":445,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.label.create.cancel","admin.label.edit.cancel"],"conditional":true},
{"file":"web/src/pages/admin/labels.tsx","line":448,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.label.create.submit","admin.label.edit.submit"],"conditional":true},
{"file":"web/src/pages/admin/labels.tsx","line":460,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["admin.label.delete.cancel"]},
{"file":"web/src/pages/admin/labels.tsx","line":468,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.label.delete.cancel"]},
{"file":"web/src/pages/admin/labels.tsx","line":471,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.label.delete.confirm"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":337,"host":"Input","prop":"data-analytics-id","event":"keydown-enter","ids":["admin.namespace.search"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":344,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.search"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":345,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.clear"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":356,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["admin.namespace.status.interact"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":358,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.namespace.status.filter"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":359,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.namespace.status.filter"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":360,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.namespace.status.filter"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":361,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.namespace.status.filter"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":371,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["admin.namespace.type.interact"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":373,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.namespace.type.filter"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":374,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.namespace.type.filter"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":375,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.namespace.type.filter"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":407,"host":"TableRow","prop":"data-analytics-id","event":"click","ids":["admin.namespace.open"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":431,"host":"Pagination","prop":"analyticsId","event":"click","ids":["admin.namespace.paginate"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":456,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.transfer"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":464,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.member.open"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":484,"host":"Pagination","prop":"analyticsId","event":"click","ids":["admin.namespace.member.paginate"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":493,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.freeze"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":501,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.unfreeze"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":509,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.archive"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":517,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.restore"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":533,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["admin.namespace.member.cancel"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":541,"host":"Input","prop":"data-analytics-id","event":"change","ids":["admin.namespace.member.search"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":549,"host":"button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.member.select"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":573,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["admin.namespace.member.role.interact"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":575,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.namespace.member.role.member"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":576,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.namespace.member.role.admin"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":582,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.member.cancel"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":583,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.member.add"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":589,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["admin.namespace.transfer.cancel"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":604,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["admin.namespace.ownership.interact"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":607,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.namespace.ownership.select"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":624,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.transfer.cancel"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":625,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.transfer.confirm"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":637,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["admin.namespace.member.remove.confirm"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":637,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["admin.namespace.member.remove.cancel"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":658,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["admin.namespace.archive.cancel","admin.namespace.freeze.cancel","admin.namespace.restore.cancel","admin.namespace.unfreeze.cancel"],"conditional":true},
{"file":"web/src/pages/admin/namespaces.tsx","line":676,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.archive.cancel","admin.namespace.freeze.cancel","admin.namespace.restore.cancel","admin.namespace.unfreeze.cancel"],"conditional":true},
{"file":"web/src/pages/admin/namespaces.tsx","line":677,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.archive.confirm","admin.namespace.freeze.confirm","admin.namespace.restore.confirm","admin.namespace.unfreeze.confirm"],"conditional":true},
{"file":"web/src/pages/admin/namespaces.tsx","line":799,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["admin.namespace.member.role.draft.interact"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":801,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.namespace.member.role.draft.member"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":802,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.namespace.member.role.draft.admin"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":805,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.member.role"]},
{"file":"web/src/pages/admin/namespaces.tsx","line":825,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.namespace.member.remove"]},
{"file":"web/src/pages/admin/system-config.tsx","line":131,"host":"input","prop":"data-analytics-id","event":"change","ids":["admin.auth.password.toggle","admin.auth.registration.toggle"],"conditional":true},
{"file":"web/src/pages/admin/system-config.tsx","line":145,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.auth.discard"]},
{"file":"web/src/pages/admin/system-config.tsx","line":149,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.auth.save"]},
{"file":"web/src/pages/admin/system-config.tsx","line":158,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["admin.auth.confirm"]},
{"file":"web/src/pages/admin/system-config.tsx","line":158,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["admin.auth.cancel"]},
{"file":"web/src/pages/admin/system-config.tsx","line":174,"host":"form","prop":"data-analytics-id","event":"submit","ids":["admin.role.rule.create"]},
{"file":"web/src/pages/admin/system-config.tsx","line":189,"host":"select","prop":"data-analytics-id","event":"change","ids":["admin.role.rule.role.select"]},
{"file":"web/src/pages/admin/system-config.tsx","line":218,"host":"select","prop":"data-analytics-id","event":"change","ids":["admin.role.rule.role.edit"]},
{"file":"web/src/pages/admin/system-config.tsx","line":226,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.role.rule.discard"]},
{"file":"web/src/pages/admin/system-config.tsx","line":227,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.role.rule.save"]},
{"file":"web/src/pages/admin/system-config.tsx","line":230,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.role.rule.disable"]},
{"file":"web/src/pages/admin/system-config.tsx","line":239,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["admin.role.rule.disable.confirm"]},
{"file":"web/src/pages/admin/system-config.tsx","line":239,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["admin.role.rule.disable.cancel"]},
{"file":"web/src/pages/admin/users.tsx","line":163,"host":"Input","prop":"data-analytics-id","event":"keydown-enter","ids":["admin.user.search"]},
{"file":"web/src/pages/admin/users.tsx","line":171,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.search"]},
{"file":"web/src/pages/admin/users.tsx","line":174,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.clear"]},
{"file":"web/src/pages/admin/users.tsx","line":186,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["admin.user.status.interact"]},
{"file":"web/src/pages/admin/users.tsx","line":190,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.user.status.filter"]},
{"file":"web/src/pages/admin/users.tsx","line":191,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.user.status.filter"]},
{"file":"web/src/pages/admin/users.tsx","line":192,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.user.status.filter"]},
{"file":"web/src/pages/admin/users.tsx","line":193,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.user.status.filter"]},
{"file":"web/src/pages/admin/users.tsx","line":232,"host":"CopyButton","prop":"analyticsId","event":"click","ids":["admin.user.identifier.copy"]},
{"file":"web/src/pages/admin/users.tsx","line":253,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.role.edit"]},
{"file":"web/src/pages/admin/users.tsx","line":261,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.approve"]},
{"file":"web/src/pages/admin/users.tsx","line":270,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.disable"]},
{"file":"web/src/pages/admin/users.tsx","line":278,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.enable"]},
{"file":"web/src/pages/admin/users.tsx","line":286,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.password.reset"]},
{"file":"web/src/pages/admin/users.tsx","line":306,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.previous"]},
{"file":"web/src/pages/admin/users.tsx","line":314,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.next"]},
{"file":"web/src/pages/admin/users.tsx","line":328,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["admin.user.role.cancel"]},
{"file":"web/src/pages/admin/users.tsx","line":339,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["admin.user.role.interact"]},
{"file":"web/src/pages/admin/users.tsx","line":344,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["admin.user.role.select"]},
{"file":"web/src/pages/admin/users.tsx","line":353,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.role.cancel"]},
{"file":"web/src/pages/admin/users.tsx","line":356,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.role.confirm"]},
{"file":"web/src/pages/admin/users.tsx","line":372,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["admin.user.disable.cancel","admin.user.enable.cancel","admin.user.password.reset.cancel"],"conditional":true},
{"file":"web/src/pages/admin/users.tsx","line":384,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.disable.cancel","admin.user.enable.cancel","admin.user.password.reset.cancel"],"conditional":true},
{"file":"web/src/pages/admin/users.tsx","line":387,"host":"Button","prop":"data-analytics-id","event":"click","ids":["admin.user.disable.confirm","admin.user.enable.confirm","admin.user.password.reset.confirm"],"conditional":true},
{"file":"web/src/pages/cli-auth.tsx","line":218,"host":"Button","prop":"data-analytics-id","event":"click","ids":["auth.cli.login"]},
{"file":"web/src/pages/dashboard/github-sync.tsx","line":46,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.collection.open"]},
{"file":"web/src/pages/dashboard/github-sync.tsx","line":47,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.settings.open"]},
{"file":"web/src/pages/dashboard/github-sync.tsx","line":52,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["github.overview.tab"]},
{"file":"web/src/pages/dashboard/github-sync.tsx","line":53,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["github.repositories.tab"]},
{"file":"web/src/pages/dashboard/github-sync.tsx","line":54,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["github.runs.tab"]},
{"file":"web/src/pages/dashboard/github-sync.tsx","line":69,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["github.source.close"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":102,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["governance.all.tab"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":103,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["governance.review.tab"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":104,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["governance.promotion.tab"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":105,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["governance.report.tab"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":109,"host":"Pagination","prop":"analyticsId","event":"click","ids":["governance.inbox.paginate"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":113,"host":"Pagination","prop":"analyticsId","event":"click","ids":["governance.inbox.paginate"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":117,"host":"Pagination","prop":"analyticsId","event":"click","ids":["governance.inbox.paginate"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":121,"host":"Pagination","prop":"analyticsId","event":"click","ids":["governance.inbox.paginate"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":139,"host":"Pagination","prop":"analyticsId","event":"click","ids":["governance.notification.paginate"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":149,"host":"Pagination","prop":"analyticsId","event":"click","ids":["governance.activity.paginate"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":161,"host":"Button","prop":"data-analytics-id","event":"click","ids":["governance.index.rebuild"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":173,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["governance.index.rebuild.confirm"]},
{"file":"web/src/pages/dashboard/governance.tsx","line":173,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["governance.index.rebuild.cancel"]},
{"file":"web/src/pages/dashboard/my-namespaces.tsx","line":92,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.create.open"]},
{"file":"web/src/pages/dashboard/my-namespaces.tsx","line":134,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.management.open"]},
{"file":"web/src/pages/dashboard/my-namespaces.tsx","line":138,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.namespace.open"]},
{"file":"web/src/pages/dashboard/my-namespaces.tsx","line":148,"host":"Pagination","prop":"analyticsId","event":"click","ids":["namespace.list.paginate"]},
{"file":"web/src/pages/dashboard/my-namespaces.tsx","line":157,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.create.open"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":306,"host":"form","prop":"data-analytics-id","event":"submit","ids":["skill.owned.search"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":327,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["skill.owned.namespace.interact"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":331,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["skill.owned.namespace"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":333,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["skill.owned.namespace"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":341,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.owned.clear"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":354,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.owned.filter"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":390,"host":"Card","prop":"data-analytics-id","event":"click","ids":["skill.owned.open"],"conditional":true},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":408,"host":"button","prop":"data-analytics-id","event":"click","ids":["skill.related.open"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":451,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.restore.request"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":462,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.update.open"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":478,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.review.withdraw"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":494,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.promotion.create.request","skill.promotion.update.request"],"conditional":true},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":510,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.unarchive.request"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":525,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.archive.request"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":554,"host":"Pagination","prop":"analyticsId","event":"click","ids":["skill.owned.paginate"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":563,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.owned.clear"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":571,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.restore.confirm"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":571,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.restore.cancel"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":584,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.promotion.create.confirm","skill.promotion.update.confirm"],"conditional":true},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":584,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.promotion.create.cancel","skill.promotion.update.cancel"],"conditional":true},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":599,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.archive.confirm"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":599,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.archive.cancel"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":612,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.unarchive.confirm"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":612,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.unarchive.cancel"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":625,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.review.withdraw.confirm"]},
{"file":"web/src/pages/dashboard/my-skills.tsx","line":625,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.review.withdraw.cancel"]},
{"file":"web/src/pages/dashboard/my-suites.tsx","line":55,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.create.open"]},
{"file":"web/src/pages/dashboard/my-suites.tsx","line":57,"host":"form","prop":"data-analytics-id","event":"submit","ids":["suite.owned.search"]},
{"file":"web/src/pages/dashboard/my-suites.tsx","line":63,"host":"button","prop":"data-analytics-id","event":"click","ids":["suite.query.clear"]},
{"file":"web/src/pages/dashboard/my-suites.tsx","line":70,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["suite.owned.interact"]},
{"file":"web/src/pages/dashboard/my-suites.tsx","line":71,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["suite.owned.filter"]},
{"file":"web/src/pages/dashboard/my-suites.tsx","line":73,"host":"button","prop":"data-analytics-id","event":"click","ids":["suite.attention.filter"]},
{"file":"web/src/pages/dashboard/my-suites.tsx","line":82,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.owned.refresh"]},
{"file":"web/src/pages/dashboard/my-suites.tsx","line":96,"host":"button","prop":"data-analytics-id","event":"click","ids":["suite.management.open","suite.operation.open"],"conditional":true},
{"file":"web/src/pages/dashboard/my-suites.tsx","line":115,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.management.open","suite.operation.open"],"conditional":true},
{"file":"web/src/pages/dashboard/my-suites.tsx","line":125,"host":"Pagination","prop":"analyticsId","event":"click","ids":["suite.owned.paginate"]},
{"file":"web/src/pages/dashboard/namespace-github-sources.tsx","line":80,"host":"form","prop":"data-analytics-id","event":"submit","ids":["github.namespace.create"]},
{"file":"web/src/pages/dashboard/namespace-github-sources.tsx","line":86,"host":"option","prop":"data-analytics-id","event":"change-selected-option","ids":["github.namespace.create.visibility.namespace"]},
{"file":"web/src/pages/dashboard/namespace-github-sources.tsx","line":87,"host":"option","prop":"data-analytics-id","event":"change-selected-option","ids":["github.namespace.create.visibility.public"]},
{"file":"web/src/pages/dashboard/namespace-github-sources.tsx","line":113,"host":"option","prop":"data-analytics-id","event":"change-selected-option","ids":["github.namespace.visibility.namespace"]},
{"file":"web/src/pages/dashboard/namespace-github-sources.tsx","line":113,"host":"option","prop":"data-analytics-id","event":"change-selected-option","ids":["github.namespace.visibility.public"]},
{"file":"web/src/pages/dashboard/namespace-github-sources.tsx","line":116,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.namespace.disable","github.namespace.enable"],"conditional":true},
{"file":"web/src/pages/dashboard/namespace-github-sources.tsx","line":143,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.source.skills"]},
{"file":"web/src/pages/dashboard/namespace-github-sources.tsx","line":149,"host":"Pagination","prop":"analyticsId","event":"click","ids":["github.namespace.paginate"]},
{"file":"web/src/pages/dashboard/namespace-github-sources.tsx","line":159,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.namespace.skills.close"]},
{"file":"web/src/pages/dashboard/namespace-github-sources.tsx","line":170,"host":"Pagination","prop":"analyticsId","event":"click","ids":["github.source.paginate"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":184,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.invitation.open"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":185,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["namespace.invitation.close"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":194,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.ownership.open"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":200,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.import.open"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":203,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.member.open"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":261,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["namespace.member.role.draft.interact"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":265,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["namespace.member.role.draft.member"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":266,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["namespace.member.role.draft.admin"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":289,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.member.role.save"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":295,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.member.role.cancel"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":306,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.member.remove"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":331,"host":"Pagination","prop":"analyticsId","event":"click","ids":["namespace.member.paginate"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":335,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["namespace.member.remove.confirm"]},
{"file":"web/src/pages/dashboard/namespace-members.tsx","line":335,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["namespace.member.remove.cancel"]},
{"file":"web/src/pages/dashboard/namespace-reviews.tsx","line":57,"host":"Pagination","prop":"analyticsId","event":"click","ids":["review.namespace.paginate"]},
{"file":"web/src/pages/dashboard/namespace-reviews.tsx","line":97,"host":"Link","prop":"data-analytics-id","event":"click","ids":["review.detail.open"]},
{"file":"web/src/pages/dashboard/namespace-reviews.tsx","line":117,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["review.namespace.status.interact"]},
{"file":"web/src/pages/dashboard/namespace-reviews.tsx","line":119,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.namespace.status"]},
{"file":"web/src/pages/dashboard/namespace-reviews.tsx","line":120,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.namespace.status"]},
{"file":"web/src/pages/dashboard/namespace-reviews.tsx","line":121,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.namespace.status"]},
{"file":"web/src/pages/dashboard/namespace-reviews.tsx","line":130,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["review.namespace.sort.interact"]},
{"file":"web/src/pages/dashboard/namespace-reviews.tsx","line":134,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.namespace.sort"]},
{"file":"web/src/pages/dashboard/namespace-reviews.tsx","line":135,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.namespace.sort"]},
{"file":"web/src/pages/dashboard/namespace-reviews.tsx","line":175,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.namespace.user.tab"]},
{"file":"web/src/pages/dashboard/namespace-reviews.tsx","line":176,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.namespace.sync.tab"]},
{"file":"web/src/pages/dashboard/namespace-settings.tsx","line":45,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.archive.request","namespace.delete.request","namespace.freeze.request","namespace.restore.request","namespace.unfreeze.request"],"conditional":true},
{"file":"web/src/pages/dashboard/namespace-settings.tsx","line":52,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["namespace.archive.confirm","namespace.delete.confirm","namespace.freeze.confirm","namespace.restore.confirm","namespace.unfreeze.confirm"],"conditional":true},
{"file":"web/src/pages/dashboard/namespace-settings.tsx","line":52,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["namespace.archive.cancel","namespace.delete.cancel","namespace.freeze.cancel","namespace.restore.cancel","namespace.unfreeze.cancel"],"conditional":true},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":195,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.profile.previous"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":204,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.profile.next"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":281,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.profile.approve"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":284,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.profile.reject"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":342,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["review.profile.sort.interact"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":346,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.profile.sort"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":347,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.profile.sort"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":363,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.profile.pending.tab"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":369,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.profile.approved.tab"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":375,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.profile.rejected.tab"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":416,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["review.profile.approve.cancel"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":428,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.profile.approve.cancel"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":431,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.profile.approve.confirm"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":439,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["review.profile.reject.cancel"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":455,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.profile.reject.cancel"]},
{"file":"web/src/pages/dashboard/profile-review-table.tsx","line":458,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.profile.reject.confirm"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":82,"host":"Pagination","prop":"analyticsId","event":"click","ids":["promotion.list.paginate"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":151,"host":"Button","prop":"data-analytics-id","event":"click","ids":["promotion.review.approve"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":154,"host":"Button","prop":"data-analytics-id","event":"click","ids":["promotion.review.reject"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":250,"host":"Button","prop":"data-analytics-id","event":"click","ids":["promotion.revocation.approve"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":253,"host":"Button","prop":"data-analytics-id","event":"click","ids":["promotion.revocation.reject"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":259,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["promotion.revocation.confirm"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":259,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["promotion.revocation.cancel"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":296,"host":"Pagination","prop":"analyticsId","event":"click","ids":["promotion.revocation.paginate"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":351,"host":"Button","prop":"data-analytics-id","event":"click","ids":["promotion.history.sort"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":437,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["promotion.pending.tab"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":438,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["promotion.revocation.tab"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":439,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["promotion.revocation.history"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":440,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["promotion.approved.tab"]},
{"file":"web/src/pages/dashboard/promotions.tsx","line":441,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["promotion.rejected.tab"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":265,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["skill.publish.namespace.interact"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":269,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["skill.publish.namespace.clear"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":271,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["skill.publish.namespace.select"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":283,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["skill.publish.visibility.interact"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":287,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["skill.publish.visibility.public"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":288,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["skill.publish.visibility.namespace"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":289,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["skill.publish.visibility.private"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":297,"host":"UploadZone","prop":"analyticsId","event":"click+keydown+change+drop","ids":["skill.package.select"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":297,"host":"UploadZone","prop":"folderAnalyticsId","event":"change","ids":["skill.package.folder.select"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":297,"host":"UploadZone","prop":"pickerAnalyticsId","event":"click","ids":["skill.package.folder.open"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":312,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.package.remove"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":343,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.package.preview.retry"]},
{"file":"web/src/pages/dashboard/publish.tsx","line":355,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.avatar.save","skill.publish.request"],"conditional":true},
{"file":"web/src/pages/dashboard/publish.tsx","line":365,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.publish.confirm"],"conditional":true},
{"file":"web/src/pages/dashboard/publish.tsx","line":365,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.publish.cancel"],"conditional":true},
{"file":"web/src/pages/dashboard/reports.tsx","line":131,"host":"button","prop":"data-analytics-id","event":"click","ids":["skill.detail.open"]},
{"file":"web/src/pages/dashboard/reports.tsx","line":151,"host":"Button","prop":"data-analytics-id","event":"click","ids":["report.dismiss.request"]},
{"file":"web/src/pages/dashboard/reports.tsx","line":159,"host":"Button","prop":"data-analytics-id","event":"click","ids":["report.resolve.request"]},
{"file":"web/src/pages/dashboard/reports.tsx","line":167,"host":"Button","prop":"data-analytics-id","event":"click","ids":["report.hide.request"]},
{"file":"web/src/pages/dashboard/reports.tsx","line":175,"host":"Button","prop":"data-analytics-id","event":"click","ids":["report.archive.request"]},
{"file":"web/src/pages/dashboard/reports.tsx","line":192,"host":"Pagination","prop":"analyticsId","event":"click","ids":["report.list.paginate"]},
{"file":"web/src/pages/dashboard/reports.tsx","line":208,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["report.pending.tab"]},
{"file":"web/src/pages/dashboard/reports.tsx","line":209,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["report.resolved.tab"]},
{"file":"web/src/pages/dashboard/reports.tsx","line":210,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["report.dismissed.tab"]},
{"file":"web/src/pages/dashboard/reports.tsx","line":224,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["report.archive.confirm","report.dismiss.confirm","report.hide.confirm","report.resolve.confirm"],"conditional":true},
{"file":"web/src/pages/dashboard/reports.tsx","line":224,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["report.archive.cancel","report.dismiss.cancel","report.hide.cancel","report.resolve.cancel"],"conditional":true},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":211,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.list.open"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":233,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.list.open"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":276,"host":"button","prop":"data-analytics-id","event":"click","ids":["review.security.open"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":293,"host":"button","prop":"data-analytics-id","event":"click","ids":["review.security.open"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":317,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.content.tab"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":318,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.changes.tab"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":319,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.source.tab"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":320,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.history.tab"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":362,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.suite.retry"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":439,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.approve.request"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":453,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.reject.open"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":464,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.reject.request"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":479,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.reject.cancel"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":508,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["review.approve.confirm"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":508,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["review.approve.cancel"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":517,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["review.reject.confirm"]},
{"file":"web/src/pages/dashboard/review-detail.tsx","line":517,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["review.reject.cancel"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":79,"host":"form","prop":"data-analytics-id","event":"submit","ids":["review.progress.search"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":100,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["review.progress.type.interact"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":104,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.progress.type"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":105,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.progress.type"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":106,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.progress.type"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":118,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["review.progress.status.interact"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":122,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.progress.status"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":123,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.progress.status"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":124,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.progress.status"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":125,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.progress.status"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":138,"host":"button","prop":"data-analytics-id","event":"click","ids":["review.progress.status"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":193,"host":"Pagination","prop":"analyticsId","event":"click","ids":["review.progress.paginate"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":228,"host":"Link","prop":"data-analytics-id","event":"click","ids":["suite.workspace.open"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":232,"host":"Link","prop":"data-analytics-id","event":"click","ids":["skill.detail.open"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":262,"host":"Link","prop":"data-analytics-id","event":"click","ids":["skill.resubmit.open"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":274,"host":"Link","prop":"data-analytics-id","event":"click","ids":["suite.workspace.open"]},
{"file":"web/src/pages/dashboard/review-progress.tsx","line":278,"host":"Button","prop":"data-analytics-id","event":"click","ids":["review.history.toggle"]},
{"file":"web/src/pages/dashboard/reviews.tsx","line":115,"host":"Pagination","prop":"analyticsId","event":"click","ids":["review.list.paginate"]},
{"file":"web/src/pages/dashboard/reviews.tsx","line":158,"host":"TableRow","prop":"data-analytics-id","event":"click","ids":["review.detail.open"]},
{"file":"web/src/pages/dashboard/reviews.tsx","line":207,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["review.list.sort.interact"]},
{"file":"web/src/pages/dashboard/reviews.tsx","line":211,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.list.sort"]},
{"file":"web/src/pages/dashboard/reviews.tsx","line":212,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["review.list.sort"]},
{"file":"web/src/pages/dashboard/reviews.tsx","line":221,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.pending.tab"]},
{"file":"web/src/pages/dashboard/reviews.tsx","line":227,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.approved.tab"]},
{"file":"web/src/pages/dashboard/reviews.tsx","line":233,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.rejected.tab"]},
{"file":"web/src/pages/dashboard/reviews.tsx","line":274,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.skill.tab"]},
{"file":"web/src/pages/dashboard/reviews.tsx","line":280,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.sync.tab"]},
{"file":"web/src/pages/dashboard/reviews.tsx","line":286,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["review.profile.tab"]},
{"file":"web/src/pages/dashboard/stars.tsx","line":42,"host":"SkillCard","prop":"analyticsId","event":"click+keydown-enter-space","ids":["skill.card.open"]},
{"file":"web/src/pages/dashboard/stars.tsx","line":53,"host":"Pagination","prop":"analyticsId","event":"click","ids":["skill.starred.paginate"]},
{"file":"web/src/pages/dashboard/subscriptions.tsx","line":42,"host":"SkillCard","prop":"analyticsId","event":"click+keydown-enter-space","ids":["skill.card.open"]},
{"file":"web/src/pages/dashboard/subscriptions.tsx","line":53,"host":"Pagination","prop":"analyticsId","event":"click","ids":["skill.subscribed.paginate"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":313,"host":"button","prop":"data-analytics-id","event":"click","ids":["suite.authoring.manual"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":322,"host":"button","prop":"data-analytics-id","event":"click","ids":["suite.authoring.import"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":355,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["suite.namespace.interact"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":356,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["suite.namespace.select"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":417,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["suite.visibility.interact"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":419,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["suite.visibility.public"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":420,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["suite.visibility.namespace"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":421,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["suite.visibility.private"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":519,"host":"button","prop":"data-analytics-id","event":"click","ids":["suite.candidate.coordinate.select","suite.candidate.market.select","suite.candidate.namespace.select"],"conditional":true},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":542,"host":"Input","prop":"data-analytics-id","event":"keydown-enter","ids":["suite.candidate.search"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":558,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["suite.candidate.visibility.interact"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":560,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["suite.candidate.visibility.public"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":561,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["suite.candidate.visibility.namespace"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":562,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["suite.candidate.visibility.private"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":565,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.candidate.search"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":596,"host":"button","prop":"data-analytics-id","event":"click","ids":["suite.member.add","suite.member.version.replace"],"conditional":true},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":634,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.members.collapse"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":643,"host":"button","prop":"data-analytics-id","event":"click","ids":["suite.entry.select"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":648,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.member.up"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":649,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.member.down"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":650,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.member.remove"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":653,"host":"input","prop":"data-analytics-id","event":"change","ids":["suite.entry.select"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":677,"host":"button","prop":"data-analytics-id","event":"click","ids":["suite.member.remove"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":684,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.members.toggle"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":687,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.draft.cancel"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":688,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.draft.create.save","suite.draft.edit.save","suite.version.draft.save"],"conditional":true},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":696,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["suite.member.version.confirm"]},
{"file":"web/src/pages/dashboard/suite-editor.tsx","line":696,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["suite.member.version.cancel"]},
{"file":"web/src/pages/dashboard/suite-management.tsx","line":92,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.draft.edit","suite.version.create"],"conditional":true},
{"file":"web/src/pages/dashboard/suite-management.tsx","line":107,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.market.preview"]},
{"file":"web/src/pages/dashboard/suite-management.tsx","line":162,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["suite.overview.tab"]},
{"file":"web/src/pages/dashboard/suite-management.tsx","line":163,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["suite.members.tab"]},
{"file":"web/src/pages/dashboard/suite-management.tsx","line":164,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["suite.versions.tab"]},
{"file":"web/src/pages/dashboard/suite-management.tsx","line":165,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["suite.publishing.tab"]},
{"file":"web/src/pages/dashboard/suite-management.tsx","line":177,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.publish.direct.request","suite.review.submit.request"],"conditional":true},
{"file":"web/src/pages/dashboard/suite-management.tsx","line":210,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.content.edit"]},
{"file":"web/src/pages/dashboard/suite-management.tsx","line":236,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.members.edit"]},
{"file":"web/src/pages/dashboard/suite-management.tsx","line":333,"host":"Link","prop":"data-analytics-id","event":"click","ids":["suite.operation.open"]},
{"file":"web/src/pages/dashboard.tsx","line":128,"host":"Link","prop":"data-analytics-id","event":"click","forward":"card.analyticsId"},
{"file":"web/src/pages/dashboard.tsx","line":176,"host":"button","prop":"data-analytics-id","event":"click","ids":["navigation.dashboard.toggle"]},
{"file":"web/src/pages/dashboard.tsx","line":194,"host":"Link","prop":"data-analytics-id","event":"click","forward":"item.analyticsId"},
{"file":"web/src/pages/dashboard.tsx","line":245,"host":"Link","prop":"data-analytics-id","event":"click","forward":"item.analyticsId"},
{"file":"web/src/pages/device.tsx","line":106,"host":"form","prop":"data-analytics-id","event":"submit","ids":["auth.device.authorize"]},
{"file":"web/src/pages/github-skills.tsx","line":33,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.detail.open"]},
{"file":"web/src/pages/github-skills.tsx","line":62,"host":"Button","prop":"data-analytics-id","event":"click","ids":["github.catalog.explore"]},
{"file":"web/src/pages/github-skills.tsx","line":63,"host":"Button","prop":"data-analytics-id","event":"click","ids":["navigation.skills.open"]},
{"file":"web/src/pages/github-skills.tsx","line":82,"host":"form","prop":"data-analytics-id","event":"submit","ids":["github.catalog.search"]},
{"file":"web/src/pages/github-skills.tsx","line":85,"host":"select","prop":"data-analytics-id","event":"change","ids":["github.catalog.sort"]},
{"file":"web/src/pages/github-skills.tsx","line":91,"host":"Pagination","prop":"analyticsId","event":"click","ids":["github.catalog.paginate"]},
{"file":"web/src/pages/home.tsx","line":52,"host":"SearchBar","prop":"analyticsId","event":"submit","ids":["search.query.submit"]},
{"file":"web/src/pages/home.tsx","line":56,"host":"button","prop":"data-analytics-id","event":"click","ids":["navigation.skills.open"]},
{"file":"web/src/pages/home.tsx","line":62,"host":"button","prop":"data-analytics-id","event":"click","ids":["skill.publish.open"]},
{"file":"web/src/pages/home.tsx","line":81,"host":"Button","prop":"data-analytics-id","event":"click","ids":["discovery.popular.open"]},
{"file":"web/src/pages/home.tsx","line":94,"host":"SkillCard","prop":"analyticsId","event":"click+keydown-enter-space","ids":["skill.card.open"]},
{"file":"web/src/pages/home.tsx","line":113,"host":"Button","prop":"data-analytics-id","event":"click","ids":["discovery.latest.open"]},
{"file":"web/src/pages/home.tsx","line":126,"host":"SkillCard","prop":"analyticsId","event":"click+keydown-enter-space","ids":["skill.card.open"]},
{"file":"web/src/pages/join.tsx","line":58,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.join.retry"]},
{"file":"web/src/pages/join.tsx","line":70,"host":"Button","prop":"data-analytics-id","event":"click","ids":["namespace.join.confirm"]},
{"file":"web/src/pages/landing.tsx","line":92,"host":"input","prop":"data-analytics-id","event":"keydown-enter","ids":["discovery.query.enter"]},
{"file":"web/src/pages/landing.tsx","line":106,"host":"button","prop":"data-analytics-id","event":"click","ids":["discovery.suggestion.search"]},
{"file":"web/src/pages/landing.tsx","line":132,"host":"Link","prop":"data-analytics-id","event":"click","ids":["navigation.skills.open"]},
{"file":"web/src/pages/landing.tsx","line":358,"host":"Link","prop":"data-analytics-id","event":"click","ids":["skill.publish.open"]},
{"file":"web/src/pages/landing.tsx","line":361,"host":"Link","prop":"data-analytics-id","event":"click","ids":["navigation.skills.open"]},
{"file":"web/src/pages/landing.tsx","line":424,"host":"Button","prop":"data-analytics-id","event":"click","ids":["discovery.popular.open"]},
{"file":"web/src/pages/landing.tsx","line":437,"host":"SkillCard","prop":"analyticsId","event":"click+keydown-enter-space","ids":["skill.card.open"]},
{"file":"web/src/pages/landing.tsx","line":453,"host":"Button","prop":"data-analytics-id","event":"click","ids":["discovery.latest.open"]},
{"file":"web/src/pages/landing.tsx","line":466,"host":"SkillCard","prop":"analyticsId","event":"click+keydown-enter-space","ids":["skill.card.open"]},
{"file":"web/src/pages/landing.tsx","line":483,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.repository.open"]},
{"file":"web/src/pages/landing.tsx","line":486,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.documentation.open"]},
{"file":"web/src/pages/login.tsx","line":88,"host":"button","prop":"data-analytics-id","event":"click","ids":["auth.personal.select"]},
{"file":"web/src/pages/login.tsx","line":91,"host":"button","prop":"data-analytics-id","event":"click","ids":["auth.enterprise.select"]},
{"file":"web/src/pages/login.tsx","line":98,"host":"form","prop":"data-analytics-id","event":"submit","ids":["auth.login.submit"]},
{"file":"web/src/pages/login.tsx","line":125,"host":"Link","prop":"data-analytics-id","event":"click","ids":["auth.password.reset.open"]},
{"file":"web/src/pages/login.tsx","line":146,"host":"button","prop":"data-analytics-id","event":"click","ids":["auth.password.visibility"]},
{"file":"web/src/pages/login.tsx","line":200,"host":"Link","prop":"data-analytics-id","event":"click","ids":["auth.register.open"]},
{"file":"web/src/pages/login.tsx","line":208,"host":"Link","prop":"data-analytics-id","event":"click","ids":["navigation.terms.open"]},
{"file":"web/src/pages/login.tsx","line":214,"host":"Link","prop":"data-analytics-id","event":"click","ids":["navigation.privacy.open"]},
{"file":"web/src/pages/notifications.tsx","line":88,"host":"Button","prop":"data-analytics-id","event":"click","ids":["notification.all.read"]},
{"file":"web/src/pages/notifications.tsx","line":102,"host":"button","prop":"data-analytics-id","event":"click","ids":["notification.category.all","notification.category.promotion","notification.category.publish","notification.category.report","notification.category.review"],"conditional":true},
{"file":"web/src/pages/notifications.tsx","line":133,"host":"button","prop":"data-analytics-id","event":"click","ids":["notification.fallback.open","notification.promotion.open","notification.report.open","notification.review.detail.open","notification.review.list.open","notification.target.provided.open"],"conditional":true},
{"file":"web/src/pages/notifications.tsx","line":158,"host":"Button","prop":"data-analytics-id","event":"click","ids":["notification.delete.request"]},
{"file":"web/src/pages/notifications.tsx","line":177,"host":"Pagination","prop":"analyticsId","event":"click","ids":["notification.list.paginate"]},
{"file":"web/src/pages/register.tsx","line":186,"host":"form","prop":"data-analytics-id","event":"submit","ids":["auth.register.submit"]},
{"file":"web/src/pages/register.tsx","line":263,"host":"Link","prop":"data-analytics-id","event":"click","ids":["auth.login.open"]},
{"file":"web/src/pages/reset-password.tsx","line":109,"host":"Link","prop":"data-analytics-id","event":"click","ids":["auth.login.open"]},
{"file":"web/src/pages/reset-password.tsx","line":114,"host":"form","prop":"data-analytics-id","event":"submit","ids":["auth.password.reset.submit"]},
{"file":"web/src/pages/reset-password.tsx","line":129,"host":"Button","prop":"data-analytics-id","event":"click","ids":["auth.password.code.request"]},
{"file":"web/src/pages/search.tsx","line":209,"host":"SearchBar","prop":"analyticsId","event":"submit","ids":["search.query.submit"]},
{"file":"web/src/pages/search.tsx","line":223,"host":"Button","prop":"data-analytics-id","event":"click","ids":["search.sort.relevance"]},
{"file":"web/src/pages/search.tsx","line":230,"host":"Button","prop":"data-analytics-id","event":"click","ids":["search.sort.downloads"]},
{"file":"web/src/pages/search.tsx","line":237,"host":"Button","prop":"data-analytics-id","event":"click","ids":["search.sort.newest"]},
{"file":"web/src/pages/search.tsx","line":263,"host":"Button","prop":"data-analytics-id","event":"click","ids":["search.starred.filter"]},
{"file":"web/src/pages/search.tsx","line":271,"host":"Button","prop":"data-analytics-id","event":"click","ids":["search.label.filter"]},
{"file":"web/src/pages/search.tsx","line":281,"host":"Button","prop":"data-analytics-id","event":"click","ids":["search.namespace.clear"]},
{"file":"web/src/pages/search.tsx","line":300,"host":"SkillCard","prop":"analyticsId","event":"click+keydown-enter-space","ids":["skill.card.open"]},
{"file":"web/src/pages/search.tsx","line":309,"host":"Pagination","prop":"analyticsId","event":"click","ids":["search.results.paginate"]},
{"file":"web/src/pages/settings/profile.tsx","line":186,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.security.open"]},
{"file":"web/src/pages/settings/profile.tsx","line":191,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.profile.edit"]},
{"file":"web/src/pages/settings/profile.tsx","line":215,"host":"form","prop":"data-analytics-id","event":"submit","ids":["account.profile.save"]},
{"file":"web/src/pages/settings/profile.tsx","line":261,"host":"Button","prop":"data-analytics-id","event":"click","ids":["account.profile.cancel"]},
{"file":"web/src/pages/settings/security.tsx","line":96,"host":"form","prop":"data-analytics-id","event":"submit","ids":["account.password.save"]},
{"file":"web/src/pages/skill-detail.tsx","line":831,"host":"Button","prop":"data-analytics-id","event":"click","ids":["auth.login.open"]},
{"file":"web/src/pages/skill-detail.tsx","line":867,"host":"div","prop":"data-analytics-id","event":"structural","ids":["skill.detail.render"]},
{"file":"web/src/pages/skill-detail.tsx","line":872,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.detail.back"]},
{"file":"web/src/pages/skill-detail.tsx","line":923,"host":"CopyButton","prop":"analyticsId","event":"click","ids":["skill.coordinate.copy"]},
{"file":"web/src/pages/skill-detail.tsx","line":945,"host":"Link","prop":"data-analytics-id","event":"click","ids":["search.label.open"]},
{"file":"web/src/pages/skill-detail.tsx","line":985,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["skill.overview.tab"]},
{"file":"web/src/pages/skill-detail.tsx","line":986,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["skill.files.tab"]},
{"file":"web/src/pages/skill-detail.tsx","line":987,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["skill.versions.tab"]},
{"file":"web/src/pages/skill-detail.tsx","line":1015,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.overview.toggle"]},
{"file":"web/src/pages/skill-detail.tsx","line":1058,"host":"FileTree","prop":"analyticsId","event":"click","ids":["skill.file.open"]},
{"file":"web/src/pages/skill-detail.tsx","line":1097,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.comparison.open"]},
{"file":"web/src/pages/skill-detail.tsx","line":1104,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.rerelease.open"]},
{"file":"web/src/pages/skill-detail.tsx","line":1114,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.version.delete"]},
{"file":"web/src/pages/skill-detail.tsx","line":1123,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.review.withdraw"]},
{"file":"web/src/pages/skill-detail.tsx","line":1132,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.version.publish"]},
{"file":"web/src/pages/skill-detail.tsx","line":1141,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.review.submit"]},
{"file":"web/src/pages/skill-detail.tsx","line":1178,"host":"button","prop":"data-analytics-id","event":"click","ids":["skill.browser.toggle"]},
{"file":"web/src/pages/skill-detail.tsx","line":1200,"host":"FileTree","prop":"analyticsId","event":"click","ids":["skill.file.open"]},
{"file":"web/src/pages/skill-detail.tsx","line":1253,"host":"Button","prop":"data-analytics-id","event":"click","ids":["report.create.open"]},
{"file":"web/src/pages/skill-detail.tsx","line":1291,"host":"Link","prop":"data-analytics-id","event":"click","ids":["suite.detail.open"]},
{"file":"web/src/pages/skill-detail.tsx","line":1318,"host":"Link","prop":"data-analytics-id","event":"click","ids":["skill.related.open"]},
{"file":"web/src/pages/skill-detail.tsx","line":1373,"host":"InstallCommand","prop":"analyticsId","event":"click","ids":["skill.command.copy"]},
{"file":"web/src/pages/skill-detail.tsx","line":1373,"host":"InstallCommand","prop":"skillhubAnalyticsId","event":"click","ids":["skill.command.skillhub.select"]},
{"file":"web/src/pages/skill-detail.tsx","line":1373,"host":"InstallCommand","prop":"clawhubAnalyticsId","event":"click","ids":["skill.command.clawhub.select"]},
{"file":"web/src/pages/skill-detail.tsx","line":1413,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.review.withdraw"]},
{"file":"web/src/pages/skill-detail.tsx","line":1423,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.download.request"]},
{"file":"web/src/pages/skill-detail.tsx","line":1442,"host":"InstallForAgentButton","prop":"analyticsId","event":"click","ids":["skill.prompt.copy"]},
{"file":"web/src/pages/skill-detail.tsx","line":1514,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.unarchive.request"]},
{"file":"web/src/pages/skill-detail.tsx","line":1518,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.archive.request"]},
{"file":"web/src/pages/skill-detail.tsx","line":1523,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.delete.request"]},
{"file":"web/src/pages/skill-detail.tsx","line":1555,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["skill.promotion.version.interact"]},
{"file":"web/src/pages/skill-detail.tsx","line":1560,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["skill.promotion.version"]},
{"file":"web/src/pages/skill-detail.tsx","line":1569,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.promotion.create.request","skill.promotion.update.request"],"conditional":true},
{"file":"web/src/pages/skill-detail.tsx","line":1582,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.revocation.request"]},
{"file":"web/src/pages/skill-detail.tsx","line":1586,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.revocation.direct"]},
{"file":"web/src/pages/skill-detail.tsx","line":1621,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.hide.request"]},
{"file":"web/src/pages/skill-detail.tsx","line":1625,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.unhide.request"]},
{"file":"web/src/pages/skill-detail.tsx","line":1631,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.version.yank"]},
{"file":"web/src/pages/skill-detail.tsx","line":1641,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["report.create.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1661,"host":"Button","prop":"data-analytics-id","event":"click","ids":["report.create.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1664,"host":"Button","prop":"data-analytics-id","event":"click","ids":["report.create.request"]},
{"file":"web/src/pages/skill-detail.tsx","line":1671,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.promotion.create.confirm","skill.promotion.update.confirm"],"conditional":true},
{"file":"web/src/pages/skill-detail.tsx","line":1671,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.promotion.create.cancel","skill.promotion.update.cancel"],"conditional":true},
{"file":"web/src/pages/skill-detail.tsx","line":1690,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["skill.revocation.direct.cancel","skill.revocation.request.cancel"],"conditional":true},
{"file":"web/src/pages/skill-detail.tsx","line":1703,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.revocation.direct.cancel","skill.revocation.request.cancel"],"conditional":true},
{"file":"web/src/pages/skill-detail.tsx","line":1704,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.revocation.direct.submit","skill.revocation.request.submit"],"conditional":true},
{"file":"web/src/pages/skill-detail.tsx","line":1711,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.archive.confirm"]},
{"file":"web/src/pages/skill-detail.tsx","line":1711,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.archive.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1720,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.unarchive.confirm"]},
{"file":"web/src/pages/skill-detail.tsx","line":1720,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.unarchive.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1729,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.delete.continue"]},
{"file":"web/src/pages/skill-detail.tsx","line":1729,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.delete.continue.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1748,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["skill.delete.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1764,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.delete.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1767,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.delete.confirm"]},
{"file":"web/src/pages/skill-detail.tsx","line":1778,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.version.delete.confirm"]},
{"file":"web/src/pages/skill-detail.tsx","line":1778,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.version.delete.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1792,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.review.withdraw.confirm"]},
{"file":"web/src/pages/skill-detail.tsx","line":1792,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.review.withdraw.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1816,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["skill.rerelease.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1836,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.rerelease.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1839,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.rerelease.request"]},
{"file":"web/src/pages/skill-detail.tsx","line":1846,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.rerelease.confirm"]},
{"file":"web/src/pages/skill-detail.tsx","line":1846,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.rerelease.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1867,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.version.publish.confirm"]},
{"file":"web/src/pages/skill-detail.tsx","line":1867,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.version.publish.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1880,"host":"ConfirmDialog","prop":"confirmAnalyticsId","event":"click","ids":["skill.review.submit.confirm"]},
{"file":"web/src/pages/skill-detail.tsx","line":1880,"host":"ConfirmDialog","prop":"cancelAnalyticsId","event":"click","ids":["skill.review.submit.cancel"]},
{"file":"web/src/pages/skill-detail.tsx","line":1902,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","ids":["skill.comparison.close"]},
{"file":"web/src/pages/skill-detail.tsx","line":1967,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.comparison.close"]},
{"file":"web/src/pages/skill-detail.tsx","line":1981,"host":"FilePreviewDialog","prop":"closeAnalyticsId","event":"click","ids":["skill.file.close"]},
{"file":"web/src/pages/skill-detail.tsx","line":1981,"host":"FilePreviewDialog","prop":"downloadAnalyticsId","event":"click","ids":["skill.file.download"]},
{"file":"web/src/pages/skill-detail.tsx","line":1981,"host":"FilePreviewDialog","prop":"copyAnalyticsId","event":"click","ids":["skill.file.copy"]},
{"file":"web/src/pages/skill-version-compare.tsx","line":160,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["skill.comparison.base.interact"]},
{"file":"web/src/pages/skill-version-compare.tsx","line":165,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["skill.comparison.base"]},
{"file":"web/src/pages/skill-version-compare.tsx","line":187,"host":"SelectTrigger","prop":"data-analytics-id","event":"click+keydown-intent","ids":["skill.comparison.head.interact"]},
{"file":"web/src/pages/skill-version-compare.tsx","line":192,"host":"SelectItem","prop":"data-analytics-id","event":"radix-item-intent","ids":["skill.comparison.head"]},
{"file":"web/src/pages/skill-version-compare.tsx","line":200,"host":"Input","prop":"data-analytics-id","event":"change","ids":["skill.comparison.filter"]},
{"file":"web/src/pages/skill-version-compare.tsx","line":212,"host":"a","prop":"data-analytics-id","event":"click","ids":["skill.comparison.file"]},
{"file":"web/src/pages/suite-detail.tsx","line":116,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.command.copy"]},
{"file":"web/src/pages/suite-detail.tsx","line":122,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.command.copy"]},
{"file":"web/src/pages/suite-detail.tsx","line":128,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.draft.edit"]},
{"file":"web/src/pages/suite-detail.tsx","line":134,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.publish.direct.request","suite.review.submit.request"],"conditional":true},
{"file":"web/src/pages/suite-detail.tsx","line":155,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["suite.overview.tab"]},
{"file":"web/src/pages/suite-detail.tsx","line":156,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["suite.members.tab"]},
{"file":"web/src/pages/suite-detail.tsx","line":157,"host":"TabsTrigger","prop":"data-analytics-id","event":"click","ids":["suite.versions.tab"]},
{"file":"web/src/pages/suite-detail.tsx","line":185,"host":"Button","prop":"data-analytics-id","event":"click","ids":["skill.version.open"]},
{"file":"web/src/pages/suites.tsx","line":44,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.create.open"]},
{"file":"web/src/pages/suites.tsx","line":47,"host":"form","prop":"data-analytics-id","event":"submit","ids":["suite.query.submit"]},
{"file":"web/src/pages/suites.tsx","line":61,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.label.clear"]},
{"file":"web/src/pages/suites.tsx","line":75,"host":"Button","prop":"data-analytics-id","event":"click","ids":["suite.label.filter"]},
{"file":"web/src/pages/suites.tsx","line":97,"host":"ResourceCard","prop":"analyticsId","event":"click+keydown-enter-space","ids":["suite.card.open"]},
{"file":"web/src/pages/suites.tsx","line":106,"host":"Pagination","prop":"analyticsId","event":"click","ids":["suite.list.paginate"]},
{"file":"web/src/shared/components/confirm-dialog.tsx","line":68,"host":"DialogContent","prop":"closeAnalyticsId","event":"click","forward":"cancelAnalyticsId"},
{"file":"web/src/shared/components/confirm-dialog.tsx","line":74,"host":"Button","prop":"data-analytics-id","event":"click","forward":"cancelAnalyticsId"},
{"file":"web/src/shared/components/confirm-dialog.tsx","line":77,"host":"Button","prop":"data-analytics-id","event":"click","forward":"confirmAnalyticsId"},
{"file":"web/src/shared/components/copy-button.tsx","line":25,"host":"Button","prop":"data-analytics-id","event":"click","forward":"analyticsId"},
{"file":"web/src/shared/components/landing-quick-start.tsx","line":51,"host":"button","prop":"data-analytics-id","event":"click","ids":["guide.view.select"]},
{"file":"web/src/shared/components/landing-quick-start.tsx","line":78,"host":"button","prop":"data-analytics-id","event":"click","ids":["guide.prompt.copy"]},
{"file":"web/src/shared/components/landing-quick-start.tsx","line":174,"host":"button","prop":"data-analytics-id","event":"click","ids":["guide.command.copy"]},
{"file":"web/src/shared/components/landing-quick-start.tsx","line":193,"host":"button","prop":"data-analytics-id","event":"click","ids":["guide.command.copy"]},
{"file":"web/src/shared/components/landing-quick-start.tsx","line":232,"host":"button","prop":"data-analytics-id","event":"click","ids":["guide.command.copy"]},
{"file":"web/src/shared/components/landing-quick-start.tsx","line":273,"host":"a","prop":"data-analytics-id","event":"click","ids":["navigation.cli.open"]},
{"file":"web/src/shared/components/landing-quick-start.tsx","line":321,"host":"a","prop":"data-analytics-id","event":"click","ids":["guide.package.download"]},
{"file":"web/src/shared/components/landing-quick-start.tsx","line":371,"host":"button","prop":"data-analytics-id","event":"click","ids":["guide.mode.select"]},
{"file":"web/src/shared/components/language-switcher.tsx","line":59,"host":"Button","prop":"data-analytics-id","event":"click","ids":["navigation.language.open"]},
{"file":"web/src/shared/components/language-switcher.tsx","line":79,"host":"button","prop":"data-analytics-id","event":"click","ids":["navigation.language.select"]},
{"file":"web/src/shared/components/pagination.tsx","line":52,"host":"Button","prop":"data-analytics-id","event":"click","forward":"analyticsId"},
{"file":"web/src/shared/components/pagination.tsx","line":74,"host":"Button","prop":"data-analytics-id","event":"click","forward":"analyticsId"},
{"file":"web/src/shared/components/pagination.tsx","line":91,"host":"Button","prop":"data-analytics-id","event":"click","forward":"analyticsId"},
{"file":"web/src/shared/components/quick-start.tsx","line":31,"host":"button","prop":"data-analytics-id","event":"click","ids":["guide.command.copy"]},
{"file":"web/src/shared/components/route-error.tsx","line":24,"host":"Button","prop":"data-analytics-id","event":"click","ids":["navigation.route.retry"]},
{"file":"web/src/shared/components/theme-toggle.tsx","line":18,"host":"button","prop":"data-analytics-id","event":"click","ids":["navigation.theme.toggle"]},
{"file":"web/src/shared/components/user-menu.tsx","line":112,"host":"button","prop":"data-analytics-id","event":"click","ids":["navigation.account.toggle"]},
{"file":"web/src/shared/components/user-menu.tsx","line":145,"host":"Link","prop":"data-analytics-id","event":"click","ids":["navigation.owned.skills"]},
{"file":"web/src/shared/components/user-menu.tsx","line":148,"host":"Link","prop":"data-analytics-id","event":"click","ids":["navigation.owned.suites"]},
{"file":"web/src/shared/components/user-menu.tsx","line":151,"host":"Link","prop":"data-analytics-id","event":"click","ids":["navigation.dashboard.open"]},
{"file":"web/src/shared/components/user-menu.tsx","line":155,"host":"Link","prop":"data-analytics-id","event":"click","ids":["account.security.open"]},
{"file":"web/src/shared/components/user-menu.tsx","line":160,"host":"Link","prop":"data-analytics-id","event":"click","ids":["review.queue.open"]},
{"file":"web/src/shared/components/user-menu.tsx","line":166,"host":"Link","prop":"data-analytics-id","event":"click","ids":["admin.users.open"]},
{"file":"web/src/shared/components/user-menu.tsx","line":171,"host":"Link","prop":"data-analytics-id","event":"click","ids":["admin.labels.open"]},
{"file":"web/src/shared/components/user-menu.tsx","line":176,"host":"Link","prop":"data-analytics-id","event":"click","ids":["admin.settings.open"]},
{"file":"web/src/shared/components/user-menu.tsx","line":181,"host":"Link","prop":"data-analytics-id","event":"click","ids":["admin.namespaces.open"]},
{"file":"web/src/shared/components/user-menu.tsx","line":186,"host":"Link","prop":"data-analytics-id","event":"click","ids":["admin.audit.open"]},
{"file":"web/src/shared/components/user-menu.tsx","line":191,"host":"button","prop":"data-analytics-id","event":"click","ids":["auth.logout.request"]},
{"file":"web/src/shared/ui/dialog.tsx","line":45,"host":"DialogPrimitive.Close","prop":"data-analytics-id","event":"click","forward":"closeAnalyticsId"}
]
}

232
docs/frontend-analytics.md Normal file
View file

@ -0,0 +1,232 @@
# Passive frontend analytics attributes
SkillHub exposes semantic HTML attributes for separately maintained, optional
collectors. It does not collect or send analytics by default. There is no SDK,
DataFinder dependency, vendor token, network reporter, app script loader or
telemetry configuration switch. The application entrypoint and production Nginx
configuration are unchanged. Deployment owners control consent, script delivery,
retention, transport and compliance; this is not an official vendor integration
or a durable business-event feed.
## Contract and scope
`data-analytics-id` identifies an observable action intent, not its result.
Lowercase dotted names are independent of language, visible text and layout.
Literal conditional branches distinguish finite business actions (for example,
namespace freeze/unfreeze/archive/restore/delete and each confirmation/cancel).
No resource, slug, version, user, provider, role, label instance or backend string
is interpolated into attributes. Fixed navigation metadata is source-owned.
`data-analytics-event`, where present, describes a native observation boundary;
it is a hint for a deployment collector, not an application event dispatcher.
The source inventory covers these domains:
- Landing/catalog/search: queries, sorting, filters, results, pagination and links.
- Skills: detail structure, tabs/versions/comparison, documentation and files,
acquisition/copy, social actions, labels, visibility and lifecycle confirmations.
- Publishing: package/folder selection, preview/retry, submission/warnings and
avatar editing, staging, retries and cancellation.
- Suites: catalog/detail, members/versions, editor/import, publishing tasks,
lifecycle and destructive actions.
- Reviews, promotions, reports and governance: queues, detail inspection,
dispositions, layered confirmations, rejection editing, cancellation and retry.
- Namespaces: management, membership/import, invitations, ownership and lifecycle.
- GitHub: collection/settings, discovery, credentials, scheduling/admission,
repositories/sources/runs, conflicts and review inspection.
- Notifications/preferences, account/profile/security/token flows, login,
registration/reset/device/CLI authorization, administration and global navigation.
[The generated manifest](frontend-analytics-manifest.json) is the authoritative
source index: registered routes and their implementations, literal JSX sites,
conditional values, static navigation definitions and forwarding sites. Counts
are recomputed from the TypeScript AST; they are not quotas. Unique IDs are
semantic categories, JSX sites are source declarations, and forwarding sites
may have no literal ID until a caller opts in. A wrapper prop is not itself a
DOM element. Repeated resources/pages, desktop/mobile navigation and portal
instances can share an ID; neither IDs nor source sites count runtime elements,
unique users, pageviews, successful operations or exhaustive business coverage.
Development checks (from the repository root with web dependencies installed):
```sh
node web/scripts/analytics-manifest.mjs
# After reviewing intentional source changes:
node web/scripts/analytics-manifest.mjs --write
pnpm -C web test src/app/analytics-manifest.test.ts
```
Do not ship the manifest as a runtime closed enum. A deployment collector should
have its own small, explicit event/ID allowlist and update it deliberately.
### Original eight compatibility meanings
| ID | Meaning |
| --- | --- |
| `search.query.submit` | Search form submit; button and Enter converge here. |
| `skill.card.open` | Existing card activation; click or its direct Enter/Space handler. |
| `skill.detail.render` | Structural detail root after loading/error/missing/deleted guards; not a unique pageview or success. |
| `skill.download.request` | Package download attempt; authentication/guards may reject it. |
| `skill.command.copy` | Command-copy attempt for the displayed installation method; not clipboard or installation success. |
| `skill.prompt.copy` | Agent-prompt-copy attempt; not execution or installation. |
| `skill.publish.request` | Publish/update/resubmit attempt, never avatar-only save. |
| `skill.publish.confirm` | Explicit publish warning continuation, never all generic dialogs or avatar-only save. |
Installation method tabs distinguish SkillHub and ClawHub; the original command
copy ID remains compatible. Public/namespace/private choices and business modes
use static categories, not data fetched from the selected object.
## Native observation policy and limits
Attributes alone never create events. Choose the native event per host, and
count one semantic target per event rather than every marked ancestor:
- Forms: observe `submit`, not both submit-button click and submit. Enter and
native validation follow existing app behavior. Rejected validation may produce
no submit. Search typing/clear is not a search submission.
- Buttons/links: observe click, including browser-generated keyboard click. Ignore
disabled, aria-disabled and data-disabled controls. An enabled click can still
fail app guards; busy/authorization semantics remain the application's.
- Custom DIV cards with existing Enter/Space handlers need that keydown in addition
to click. Native buttons must not count both. Tabs generate click from navigation
keys; do not count Arrow/Home/End keydown again. Do not invent keyboard handlers
for existing mouse-only rows or directories.
- Native select: observe change. Where the static marker is on an option, read only
`selectedOptions[0].getAttribute('data-analytics-id')`, never option value/text.
A select marker describes its context, not the raw choice. Avoid click/change
double counting. Checkbox/radio change is an intent, not saved server state.
- Radix Select items are actual option DOM, sometimes in a portal. Pointerup or
Enter/Space on an item is selection intent, not proof that onValueChange committed
a new value. Opening the trigger and navigation/highlight are not committed
selections. A click-only collector is insufficient. Validate event order with
the deployed component/browser version rather than manufacturing app hooks.
Trigger `*.interact` markers cover observable activation/keydown intent, including
closed-trigger typeahead; never capture the typed key, infer the chosen value,
or call that interaction a committed selection. Typeahead can change selection
without opening an item. Keep trigger interaction and item selection-intent
metrics separate instead of counting both as the same selection.
- File inputs: change means a selection was offered, not upload success. Drop is
offered files, not accepted/validated files. Picker-opening click differs from
change; ignore programmatic input clicks as additional user intent. Never read
filenames, paths or file metadata. Picker cancellation is not observed.
- Crop surface pointer/keyboard interaction is adjustment intent, not proof the
crop changed or an image upload succeeded; no coordinates or image data may leave.
- Explicit cancel/close buttons, including X, preserve workflow-specific meaning.
Escape, overlay dismissal, route teardown, browser Back, automatic close and
native picker cancel are not reliably observable through these static attrs.
Closing an editor is not proof an in-flight request was aborted.
Use document-level delegation for portals; React ancestry is not DOM ancestry.
Wrapper forwarding is caller-scoped, including confirmation/cancel and close X;
generic UI primitives do not guess business IDs. Keep the nearest semantic target
and reject nested unmarked interactive controls rather than attributing them to
an ancestor card/form. Synthetic clicks (including temporary download anchors)
are not new successful user actions. Do not block or change default behavior,
propagation, focus, route history, permissions or app handlers.
`skill.detail.render` is not an automatic pageview event. SPA route classification,
render retries, consent transitions, duplicate initialization and view deduplication
are separate collector policies. Never derive these from full URLs/query strings.
### Privacy and integration modes
The recommended output allowlist is only `{ id, event }`, each validated against
operator-owned static categories. Do not collect textContent/innerHTML, input or
option values, clipboard contents, href/full URLs/query/fragment, cookies, storage,
identity/account IDs, device codes, tokens, invitation links, private coordinates,
filenames/paths, review/report reasons or crop data. Do not scrape arbitrary DOM
attributes or reuse test IDs (some intentionally contain resource identifiers).
Disabled integration means no injected script and zero analytics collection.
Enabled delivery does not itself authorize collection: initialize only after
applicable consent/policy approval, stop on withdrawal, and separately review any
outbound adapter and CSP connect destinations. External JS has page privileges;
serve reviewed versioned code, restrict access and treat compromise as a security
incident. Vendor credentials and ingestion endpoints belong outside core.
[The docs-only example](examples/skillhub-intents.mjs) exports
`observeSkillhubIntents({ root, onIntent })`. Importing it does not start collection;
without an explicit callback it installs no listeners. It has no network, identity,
route patching or default output. Its intentionally small allowlist demonstrates
click/submit/custom-card keydown only, not every manifest action, Select, crop,
file change/drop or pageviews. The callback receives only ID and event kind; it
must not enrich them with sensitive context. Initialization is idempotent per root,
and the returned function removes listeners. It catches callback errors and never
calls preventDefault/stopPropagation. Tests use synthetic data and are not browser
or deployment acceptance.
The repository-integration test lives at `web/analytics-example.test.ts`, alongside
the existing root-level web tests. Vitest discovers it with `pnpm -C web test`;
run it alone with `pnpm -C web test analytics-example.test.ts`. It stays outside
the production TypeScript project's `src`/`test` inputs because the docs-only
example is not present in the `web/` Docker build context.
## Optional deployment-owned Nginx injection
Prefer a separately maintained same-origin HTTPS module, optionally inserted by
Nginx `sub_filter`, not an app entrypoint modification. Start with
[the opt-in edge example](examples/nginx-analytics.conf). It is not loaded by the
product. Its loopback HTTP ports and filesystem path are examples behind your
existing HTTPS terminator; adapt upstream/listener/file path in isolation first.
The operator must supply `skillhub-observer.v1.mjs`, which may import the example
helper and call it with an explicit callback after consent. Delivering only the
helper intentionally collects nothing. Do not place either script in the app bundle.
The sample filters only the UI fallback's default `text/html` type, once per
response, inserting a module before `</head>`. Module loading is deferred and no
application code depends on it; missing/failed JS must not stop SkillHub. The
exact script location overrides SPA fallback, sets JavaScript MIME and nosniff,
and returns 404 if absent. Never return index.html for missing collector/imports.
Keep static code versioned and immutable; change the filename when bytes change.
Deployment checklist:
1. Check `nginx -V` for http_sub_module (built with `--with-http_sub_module` or an
equivalent loaded module), then `nginx -t`. Module absence is a blocker, not an
invitation to weaken security. Review actual final config with `nginx -T`.
2. Upstream `Accept-Encoding ""` requests uncompressed HTML. Ensure upstream
gzip_static/Brotli/CDN compression cannot still send encoded bytes. Filtering
compressed input does not work; downstream compression may run after filtering.
Leave API, auth, download, asset and runtime-config locations unmodified.
3. Filtered HTML must not reuse unfiltered validators or cached 304 responses. The
example removes upstream ETag/Last-Modified/Content-MD5 and cache headers,
suppresses conditional requests and disables proxy cache, serving no-store HTML.
Purge old edge/CDN HTML on enable/rollback; test GET/HEAD, conditional headers,
existing browser caches and 200/304 behavior. Do not cache injected HTML under
the old unfiltered entity validator. API and immutable assets retain their policy.
4. Preserve existing CSP and all security headers. The script must satisfy the
current script-src policy (same-origin alone does not satisfy nonce-only or
strict-dynamic policies). A per-response nonce or approved external hash/SRI
policy needs deployment-specific coordination; otherwise do not enable injection.
Never add unsafe-inline/unsafe-eval or broad wildcards. Any reporter needs an
explicitly permitted connect-src endpoint; no reporter exists in core/example.
Nginx add_header inheritance is location-sensitive: merge/repeat existing edge
security headers as necessary; do not drop or hide upstream CSP to make it work.
5. Test actual built SkillHub HTML, not just a synthetic HTML fixture: exactly one
script for UI routes, none for APIs/assets/downloads/auth endpoints; script MIME,
missing-script 404, root/deep links, compression, CSP, disabled delivery and
collector failure. Then browser-check native events, portals, guards and consent.
A fixture filter probe is not final-config, SkillHub or production acceptance.
### Supported sub-path mapping
The sample is root deployment. For a supported `/skillhub/` deployment, keep that
prefix on the edge-to-app proxy URI (proxy_pass without a trailing slash), and
configure the app normally with SKILLHUB_WEB_BASE_PATH=/skillhub/ and matching
same-origin API base. Its existing container entrypoint owns internal prefix
rewriting; do not rewrite it a second time at the edge.
Adapt the sample's UI `location /` to `location /skillhub/`; add an exact
`/skillhub` redirect to `/skillhub/`; scope the bypass regex to
`^/skillhub/(api/|oauth2/|login/oauth2/|\.well-known/|assets/|registry/|runtime-config\.js$|nginx-health)`.
Change BOTH the exact script location and injected src to
`/skillhub/_skillhub-observe/skillhub-observer.v1.mjs`, plus the matching 404 prefix.
The alias filesystem path does not gain the URL prefix. Keep other site locations
unchanged; do not put sub_filter at http/server scope. Use any supported validated
base path consistently, preserving original request URIs. HTTPS/public registry,
OAuth callbacks and generated asset URLs still need the normal deployment setup.
Rollback: remove the sub_filter directives/injection location customization, test
configuration, reload through the normal deployment procedure, and purge cached
HTML. Existing cached versioned JS can remain temporarily but must not be referenced
or initialized. Verify new HTML has no script, no callback/reporting occurs and
SkillHub remains usable. This document does not authorize production changes.

View file

@ -0,0 +1,135 @@
/** @vitest-environment jsdom */
import { afterEach, describe, expect, it, vi } from 'vitest'
import { fireEvent } from '@testing-library/react'
import { observeSkillhubIntents } from '../docs/examples/skillhub-intents.mjs'
const stops: Array<() => void> = []
afterEach(() => { stops.splice(0).forEach(stop => stop()); document.body.replaceChildren(); vi.restoreAllMocks(); vi.unstubAllGlobals() })
function start(onIntent = vi.fn<(intent: { id: string; event: string }) => void>()) {
const stop = observeSkillhubIntents({ root: document, onIntent })
stops.push(stop)
return { onIntent, stop }
}
function fixture(html: string) { document.body.innerHTML = html; return document.body.firstElementChild as HTMLElement }
describe('optional deployment example (never automatically loaded)', () => {
it('has no listener or network defaults without an explicit callback', () => {
const listener = vi.spyOn(document, 'addEventListener')
observeSkillhubIntents({ root: document })()
expect(listener).not.toHaveBeenCalled()
})
it('reads a nested click as one allowlisted intent, not content or identity', () => {
const host = fixture('<button data-analytics-id="skill.command.copy" data-user="private-person"><span>private-command</span></button>')
const { onIntent } = start()
fireEvent.click(host.firstElementChild!)
expect(onIntent).toHaveBeenCalledExactlyOnceWith({ id: 'skill.command.copy', event: 'click' })
})
it('ignores unknown IDs, structural anchors and nested unmarked controls', () => {
const host = fixture('<div role="link" data-analytics-id="skill.card.open"><button>nested action</button></div>')
const { onIntent } = start()
fireEvent.click(host.firstElementChild!)
host.setAttribute('data-analytics-id', 'not.allowlisted.action')
fireEvent.click(host)
host.setAttribute('data-analytics-id', 'skill.detail.render')
fireEvent.click(host)
expect(onIntent).not.toHaveBeenCalled()
})
it('counts submit once, not typing, clearing, Enter keydown or submit-button click', () => {
const form = fixture('<form data-analytics-id="search.query.submit"><input value="private-query"><button type="submit">search</button></form>')
// Model the existing application submit handler without allowing jsdom navigation.
const submit = vi.fn((event: Event) => event.preventDefault())
form.addEventListener('submit', submit)
const { onIntent } = start()
fireEvent.change(form.querySelector('input')!, { target: { value: 'another-private-query' } })
fireEvent.keyDown(form.querySelector('input')!, { key: 'Enter' })
fireEvent.click(form.querySelector('button')!)
expect(onIntent).toHaveBeenCalledExactlyOnceWith({ id: 'search.query.submit', event: 'submit' })
expect(submit).toHaveBeenCalledTimes(1)
fireEvent.submit(form)
expect(onIntent).toHaveBeenCalledTimes(2)
})
it('covers the existing custom-card Enter/Space behavior without synthesizing events', () => {
const card = fixture('<div role="link" tabindex="0" data-analytics-id="skill.card.open">open</div>')
const navigate = vi.fn()
card.addEventListener('click', navigate)
card.addEventListener('keydown', event => {
if (event.key === 'Enter' || event.key === ' ') { event.preventDefault(); navigate() }
})
const { onIntent } = start()
fireEvent.click(card)
fireEvent.keyDown(card, { key: 'Enter' })
fireEvent.keyDown(card, { key: ' ' })
expect(navigate).toHaveBeenCalledTimes(3)
expect(onIntent.mock.calls.map(([event]) => event)).toEqual([
{ id: 'skill.card.open', event: 'click' },
{ id: 'skill.card.open', event: 'keydown' },
{ id: 'skill.card.open', event: 'keydown' },
])
fireEvent.keyDown(card, { key: 'Enter', repeat: true })
fireEvent.keyDown(card, { key: 'Enter', ctrlKey: true })
fireEvent.keyDown(card, { key: 'Enter', isComposing: true })
fireEvent.keyDown(card, { key: 'Escape' })
expect(onIntent).toHaveBeenCalledTimes(3)
})
it('does not count native-button keydown in addition to its generated click', () => {
const button = fixture('<button data-analytics-id="skill.download.request">download</button>')
const { onIntent } = start()
fireEvent.keyDown(button, { key: 'Enter' })
fireEvent.click(button)
expect(onIntent).toHaveBeenCalledExactlyOnceWith({ id: 'skill.download.request', event: 'click' })
})
it.each(['disabled', 'aria-disabled="true"', 'data-disabled'])('ignores disabled/busy activation (%s)', disabled => {
const button = fixture(`<button data-analytics-id="skill.publish.confirm" ${disabled}>continue</button>`)
const { onIntent } = start()
fireEvent.click(button)
expect(onIntent).not.toHaveBeenCalled()
})
it('is idempotent, removable, and safe to initialize again after disposal', () => {
const button = fixture('<button data-analytics-id="skill.publish.cancel">cancel</button>')
const { onIntent, stop } = start()
expect(observeSkillhubIntents({ root: document, onIntent })).toBe(stop)
fireEvent.click(button)
expect(onIntent).toHaveBeenCalledTimes(1)
stop()
fireEvent.click(button)
expect(onIntent).toHaveBeenCalledTimes(1)
const second = start()
stop()
fireEvent.click(button)
expect(second.onIntent).toHaveBeenCalledTimes(1)
})
it('does not modify application propagation/default behavior even if the callback throws', () => {
const button = fixture('<button data-analytics-id="skill.delete.cancel">cancel</button>')
const handler = vi.fn()
button.addEventListener('click', handler)
start(vi.fn(() => { throw new Error('synthetic operator failure') }))
const event = new MouseEvent('click', { bubbles: true, cancelable: true })
button.dispatchEvent(event)
expect(event.defaultPrevented).toBe(false)
expect(handler).toHaveBeenCalledTimes(1)
})
it('never reads cookies/storage/location or sends network requests', () => {
const button = fixture('<button data-analytics-id="skill.prompt.copy">private prompt</button>')
const fetch = vi.fn()
const xhr = vi.fn()
const beacon = vi.fn()
vi.stubGlobal('fetch', fetch)
vi.stubGlobal('XMLHttpRequest', xhr)
vi.stubGlobal('navigator', { sendBeacon: beacon })
const cookie = vi.spyOn(document, 'cookie', 'get')
const storage = vi.spyOn(Storage.prototype, 'getItem')
const { onIntent } = start()
fireEvent.click(button)
expect(onIntent).toHaveBeenCalledExactlyOnceWith({ id: 'skill.prompt.copy', event: 'click' })
for (const spy of [fetch, xhr, beacon, cookie, storage]) expect(spy).not.toHaveBeenCalled()
})
})

View file

@ -0,0 +1,2 @@
// Development tooling only; keeps Node tooling out of application TS globals.
export function buildManifest(): unknown

View file

@ -0,0 +1,142 @@
// Development-only source inventory. Never imported by the application bundle.
import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import ts from 'typescript'
const root = fileURLToPath(new URL('../../', import.meta.url))
const destination = path.join(root, 'docs/frontend-analytics-manifest.json')
const sourceRoot = path.join(root, 'web/src')
const markerProp = /^(data-analytics-id|analyticsId|[a-z]+AnalyticsId)$/
const idPattern = /^[a-z]+(?:\.[a-z]+){2,}$/
const passthrough = new Set(['analyticsId', 'confirmAnalyticsId', 'cancelAnalyticsId', 'closeAnalyticsId', 'copyAnalyticsId', 'downloadAnalyticsId', 'skillhubAnalyticsId', 'clawhubAnalyticsId', 'folderAnalyticsId', 'pickerAnalyticsId'])
const navigationFiles = new Set(['web/src/app/layout.tsx', 'web/src/pages/dashboard.tsx', 'web/src/features/namespace/namespace-management-nav.tsx'])
function walk(dir) {
return fs.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name, 'en')).flatMap(entry => entry.isDirectory() ? walk(path.join(dir, entry.name)) : [path.join(dir, entry.name)])
}
function parse(file) {
return ts.createSourceFile(file, fs.readFileSync(path.join(root, file), 'utf8'), ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX)
}
function visit(node, fn) {
fn(node)
ts.forEachChild(node, child => visit(child, fn))
}
function line(sf, node) {
return sf.getLineAndCharacterOfPosition(node.getStart(sf)).line + 1
}
function properties(node, sf) {
return Object.fromEntries(node.properties.filter(ts.isPropertyAssignment).map(prop => [prop.name.getText(sf), prop.initializer]))
}
function values(node, sf, file) {
if (!node) throw new Error(`Missing marker value in ${file}`)
if (ts.isStringLiteral(node)) {
if (!idPattern.test(node.text)) throw new Error(`Nonsemantic marker in ${file}:${line(sf, node)}`)
return { ids: [node.text] }
}
if (ts.isJsxExpression(node) || ts.isParenthesizedExpression(node)) return values(node.expression, sf, file)
if (ts.isConditionalExpression(node)) {
const yes = values(node.whenTrue, sf, file)
const no = values(node.whenFalse, sf, file)
return { ids: [...new Set([...(yes.ids ?? []), ...(no.ids ?? [])])].sort(), conditional: true, ...(yes.forward || no.forward ? { forward: yes.forward ?? no.forward } : {}) }
}
if (ts.isIdentifier(node) && node.text === 'undefined') return { ids: [] }
if (ts.isIdentifier(node) && passthrough.has(node.text)) return { forward: node.text }
if (ts.isPropertyAccessExpression(node) && node.name.text === 'analyticsId' && navigationFiles.has(file) && ['item', 'card', 'tab'].includes(node.expression.getText(sf))) return { forward: node.getText(sf) }
throw new Error(`Dynamic analytics value rejected in ${file}:${line(sf, node)}: ${node.getText(sf)}`)
}
function eventFor(tag, prop, attrs, ids) {
if (ids.includes('skill.detail.render')) return 'structural'
if (tag === 'SelectItem') return 'radix-item-intent'
if (tag === 'SelectTrigger') return 'click+keydown-intent'
if (tag === 'form' || tag === 'SearchBar') return 'submit'
if (tag === 'UploadZone') return prop === 'pickerAnalyticsId' ? 'click' : prop === 'folderAnalyticsId' ? 'change' : 'click+keydown+change+drop'
if (tag === 'SelectFilter') return 'change'
if (tag === 'FileTree' || tag === 'FileTreeNodeComponent') return 'click'
if (tag === 'SkillCard' || tag === 'ResourceCard' || (attrs.has('onKeyDown') && attrs.has('onClick') && tag !== 'TabsTrigger')) return 'click+keydown-enter-space'
if (tag === 'input' || tag === 'Input') return attrs.has('onKeyDown') ? 'keydown-enter' : 'change'
if (tag === 'select') return 'change'
if (tag === 'option') return 'change-selected-option'
if (ids.includes('skill.avatar.crop.adjust')) return 'pointerup+keydown-intent'
if (tag === 'div' && attrs.has('data-analytics-event')) return ids.includes('skill.avatar.file.drop') ? 'drop' : 'click+keydown+drop'
return 'click'
}
export function buildManifest() {
const sites = []
const definitions = []
for (const full of walk(sourceRoot).filter(file => file.endsWith('.tsx') && !/\.(test|spec)\.tsx$/.test(file))) {
const file = path.relative(root, full).split(path.sep).join('/')
const sf = parse(file)
visit(sf, node => {
if (ts.isJsxOpeningElement(node) || ts.isJsxSelfClosingElement(node)) {
const attrs = node.attributes.properties.filter(ts.isJsxAttribute)
const names = new Set(attrs.map(attr => attr.name.getText(sf)))
for (const attr of attrs.filter(attr => markerProp.test(attr.name.getText(sf)))) {
const result = values(attr.initializer, sf, file)
const tag = node.tagName.getText(sf)
sites.push({ file, line: line(sf, node), host: tag, prop: attr.name.getText(sf), event: eventFor(tag, attr.name.getText(sf), names, result.ids ?? []), ...result })
}
}
if (ts.isPropertyAssignment(node) && node.name.getText(sf) === 'analyticsId') {
if (!navigationFiles.has(file)) throw new Error(`Unreviewed navigation metadata in ${file}`)
definitions.push({ file, line: line(sf, node), ...values(node.initializer, sf, file) })
}
})
}
const routeFile = 'web/src/app/router.tsx'
const sf = parse(routeFile)
const bindings = new Map()
const routes = []
let registered = []
visit(sf, node => {
if (!ts.isVariableDeclaration(node) || node.parent?.parent?.parent !== sf || !node.initializer || !ts.isCallExpression(node.initializer)) return
const call = node.initializer
const callee = call.expression.getText(sf)
if (['createLazyRouteComponent', 'createRoleProtectedRouteComponent'].includes(callee)) {
let modulePath
visit(call.arguments[0], child => {
if (ts.isCallExpression(child) && child.expression.kind === ts.SyntaxKind.ImportKeyword && ts.isStringLiteral(child.arguments[0])) modulePath = child.arguments[0].text
})
const exported = call.arguments[1]
if (!modulePath?.startsWith('@/') || !exported || !ts.isStringLiteral(exported)) throw new Error('Unresolved lazy route')
const file = 'web/src/' + modulePath.slice(2) + '.tsx'
const page = parse(file)
let implementation
visit(page, child => {
if ((ts.isFunctionDeclaration(child) || ts.isVariableDeclaration(child)) && child.name?.getText(page) === exported.text) implementation = { file, line: line(page, child), export: exported.text }
})
if (!implementation) throw new Error(`Missing route implementation: ${file} ${exported.text}`)
bindings.set(node.name.getText(sf), { implementation, roleProtected: callee === 'createRoleProtectedRouteComponent' })
}
if (callee === 'createRoute') {
const props = properties(call.arguments[0], sf)
if (!ts.isStringLiteral(props.path)) throw new Error('Nonliteral route path')
const component = props.component?.getText(sf)
const binding = bindings.get(component)
routes.push({ name: node.name.getText(sf), path: props.path.text, declaration: { file: routeFile, line: line(sf, node) }, implementation: binding?.implementation ?? null, guarded: !!props.beforeLoad, roleProtected: binding?.roleProtected ?? false })
}
if (callee === 'rootRoute.addChildren') registered = call.arguments[0].elements.map(element => element.getText(sf))
})
if (routes.length !== registered.length || routes.some(route => !registered.includes(route.name)) || new Set(registered).size !== registered.length) throw new Error('Route declaration/registration drift')
const ids = new Set([...sites, ...definitions].flatMap(site => site.ids ?? []))
return {
schema: 1,
description: 'Source declarations, not runtime DOM counts, pageviews, successful outcomes or a closed runtime enum. Forwarding sites require explicit callers. See frontend-analytics.md for gaps and event policy.',
counts: { routes: routes.length, uniqueIds: ids.size, literalJsxSites: sites.filter(site => site.ids?.length).length, literalJsxValues: sites.reduce((count, site) => count + (site.ids?.length ?? 0), 0), navigationDefinitions: definitions.length, forwardingSites: sites.filter(site => site.forward).length },
routes,
definitions,
sites,
}
}
function serialize(manifest) {
// Compact one-record-per-line projection; source and event stay reviewable together.
return '{\n "schema": 1,\n "description": ' + JSON.stringify(manifest.description) + ',\n "counts": ' + JSON.stringify(manifest.counts) + ',\n' + ['routes', 'definitions', 'sites'].map(key => ' "' + key + '": [\n' + manifest[key].map(row => ' ' + JSON.stringify(row)).join(',\n') + '\n ]').join(',\n') + '\n}\n'
}
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
const manifest = buildManifest()
const text = serialize(manifest)
if (process.argv.includes('--write')) fs.writeFileSync(destination, text)
else if (fs.readFileSync(destination, 'utf8') !== text) throw new Error('Analytics manifest drift. Review source, then run node web/scripts/analytics-manifest.mjs --write from the repository root.')
console.log(JSON.stringify(manifest.counts))
}

View file

@ -0,0 +1,147 @@
/** @vitest-environment jsdom */
import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import type { ManagedNamespace, SkillSuite } from '@/api/types'
import { NamespaceSettingsPage } from '@/pages/dashboard/namespace-settings'
import { ReportsPage } from '@/pages/dashboard/reports'
import { SuiteManagementActions } from '@/features/suite/suite-management-actions'
import { GithubSyncPlatformControl } from '@/features/github-sync/github-sync-platform-control'
import { GithubCredentialConfig } from '@/features/github-sync/github-credential-config'
const state = vi.hoisted(() => ({
namespace: null as ManagedNamespace | null,
namespaceMutate: vi.fn(), resolve: vi.fn(), dismiss: vi.fn(),
hidden: vi.fn(), archived: vi.fn(), remove: vi.fn(),
paused: false, platform: vi.fn(),
credential: { id: 'synthetic-private-id', label: 'synthetic-private-label', status: 'ACTIVE', keyAvailable: true },
create: vi.fn(), replace: vi.fn(), enable: vi.fn(),
}))
vi.mock('react-i18next', async () => ({ ...await vi.importActual<typeof import('react-i18next')>('react-i18next'), useTranslation: () => ({ t: (key: string) => key, i18n: { language: 'en' } }) }))
vi.mock('@tanstack/react-router', () => ({ useParams: () => ({ slug: 'synthetic-private-team' }), useNavigate: () => vi.fn() }))
vi.mock('@/features/namespace/namespace-header', () => ({ NamespaceHeader: () => null }))
vi.mock('@/features/namespace/namespace-management-nav', () => ({ NamespaceManagementBack: () => null, NamespaceManagementNav: () => null }))
vi.mock('@/shared/lib/toast', () => ({ toast: { success: vi.fn(), error: vi.fn() } }))
vi.mock('@/shared/hooks/use-namespace-queries', () => ({
useNamespaceDetail: () => ({ data: state.namespace, isLoading: false }),
useMyNamespaces: () => ({ data: state.namespace ? [state.namespace] : [] }),
useFreezeNamespace: () => ({ mutateAsync: state.namespaceMutate }),
useUnfreezeNamespace: () => ({ mutateAsync: state.namespaceMutate }),
useArchiveNamespace: () => ({ mutateAsync: state.namespaceMutate }),
useRestoreNamespace: () => ({ mutateAsync: state.namespaceMutate }),
useDeleteNamespace: () => ({ mutateAsync: state.namespaceMutate }),
}))
vi.mock('@/shared/hooks/use-suite-queries', () => ({
useReopenSuiteVersion: () => ({ mutateAsync: vi.fn() }),
useYankSuiteVersion: () => ({ mutateAsync: vi.fn() }),
useSetSuiteHidden: () => ({ mutateAsync: state.hidden }),
useSetSuiteArchived: () => ({ mutateAsync: state.archived }),
useDeleteSuite: () => ({ mutateAsync: state.remove }),
}))
vi.mock('@/features/report/use-skill-reports', () => ({
useSkillReports: (status: string) => ({ data: { items: status === 'PENDING' ? [{ id: 1, skillId: 2, namespace: 'private-team', skillSlug: 'private-skill', reason: 'private-reason', createdAt: '2026-01-01' }] : [], total: status === 'PENDING' ? 1 : 0, size: 10 }, isLoading: false }),
useResolveSkillReport: () => ({ mutateAsync: state.resolve, isPending: false }),
useDismissSkillReport: () => ({ mutateAsync: state.dismiss, isPending: false }),
}))
vi.mock('@/features/github-sync/use-github-sync-admin', () => ({
useGithubPlatformControl: () => ({ data: { desiredPaused: state.paused, version: 1, state: state.paused ? 'PAUSED' : 'RUNNING' } }),
useUpdateGithubPlatformControl: () => ({ mutateAsync: state.platform }),
useGithubCredentials: () => ({ data: [state.credential] }),
useGithubCredentialMutations: () => ({ create: { mutateAsync: state.create }, replace: { mutateAsync: state.replace }, setEnabled: { mutateAsync: state.enable } }),
}))
const id = (node: Element) => node.getAttribute('data-analytics-id')
function assertNoSensitiveAttributes() {
for (const node of document.querySelectorAll('[data-analytics-id]')) expect(id(node)).not.toMatch(/synthetic|private|reason|token-value/)
}
beforeEach(() => {
vi.clearAllMocks()
state.namespace = { id: 2, slug: 'synthetic-private-team', displayName: 'Private name', type: 'TEAM', status: 'ACTIVE', createdAt: '', immutable: false, currentUserRole: 'OWNER', canFreeze: true, canUnfreeze: true, canArchive: true, canRestore: true, canDelete: true }
state.paused = false
state.credential.status = 'ACTIVE'
})
afterEach(cleanup)
describe('finite business branch markers on real confirmation DOM', () => {
it.each(['freeze', 'unfreeze', 'archive', 'restore', 'delete'] as const)('namespace %s keeps request, cancel, X and confirm distinct', async action => {
render(<NamespaceSettingsPage />)
const request = screen.getByTestId(`${action}-namespace-synthetic-private-team`)
expect(id(request)).toBe(`namespace.${action}.request`)
fireEvent.click(request)
const confirm = screen.getByTestId(`namespace-action-confirm-${action}`)
expect(id(confirm)).toBe(`namespace.${action}.confirm`)
expect(id(screen.getByRole('button', { name: 'Close' }))).toBe(`namespace.${action}.cancel`)
fireEvent.click(screen.getByRole('button', { name: 'dialog.cancel' }))
expect(state.namespaceMutate).not.toHaveBeenCalled()
fireEvent.click(request)
fireEvent.click(screen.getByTestId(`namespace-action-confirm-${action}`))
await waitFor(() => expect(state.namespaceMutate).toHaveBeenCalledTimes(1))
assertNoSensitiveAttributes()
})
it('does not expose namespace actions for global or missing data', () => {
state.namespace!.type = 'GLOBAL'
const view = render(<NamespaceSettingsPage />)
expect(document.querySelector('[data-analytics-id]')).toBeNull()
state.namespace = null
view.rerender(<NamespaceSettingsPage />)
expect(document.querySelector('[data-analytics-id]')).toBeNull()
})
it.each(['hide', 'restore', 'archive', 'unarchive', 'delete'] as const)('suite %s confirmation and cancel preserve the handler', async action => {
const suite = { id: 7, versionId: 70, namespace: 'private-team', slug: 'private-suite', displayName: 'Private name', version: '1', status: 'PUBLISHED', suiteStatus: action === 'unarchive' ? 'ARCHIVED' : 'ACTIVE', hidden: action === 'restore', allowedActions: [action.toUpperCase()] } as SkillSuite
render(<SuiteManagementActions suite={suite} />)
const request = screen.getByRole('button', { name: `suite.${action}` })
expect(id(request)).toBe(`suite.${action}.request`)
fireEvent.click(request)
expect(id(screen.getByRole('button', { name: 'dialog.cancel' }))).toBe(`suite.${action}.cancel`)
expect(id(screen.getByRole('button', { name: 'Close' }))).toBe(`suite.${action}.cancel`)
const confirm = screen.getAllByRole('button', { name: `suite.${action}` }).find(node => id(node) === `suite.${action}.confirm`)!
expect(confirm).toBeDefined()
fireEvent.click(confirm)
if (action === 'hide' || action === 'restore') await waitFor(() => expect(state.hidden).toHaveBeenCalledWith({ suiteId: 7, hidden: action === 'hide' }))
else if (action === 'archive' || action === 'unarchive') await waitFor(() => expect(state.archived).toHaveBeenCalledWith({ suiteId: 7, archived: action === 'archive' }))
else await waitFor(() => expect(state.remove).toHaveBeenCalledWith({ suiteId: 7 }))
assertNoSensitiveAttributes()
})
it.each([
['dismiss', 'dismiss', undefined], ['resolve', 'resolve', 'RESOLVE_ONLY'],
['resolveAndHide', 'hide', 'RESOLVE_AND_HIDE'], ['resolveAndArchive', 'archive', 'RESOLVE_AND_ARCHIVE'],
] as const)('report %s keeps its disposition and abandonment', async (label, action, disposition) => {
render(<ReportsPage />)
const request = screen.getByRole('button', { name: `reports.${label}` })
expect(id(request)).toBe(`report.${action}.request`)
fireEvent.click(request)
expect(id(screen.getByRole('button', { name: 'dialog.cancel' }))).toBe(`report.${action}.cancel`)
fireEvent.click(screen.getByRole('button', { name: 'Close' }))
expect(state.resolve).not.toHaveBeenCalled()
expect(state.dismiss).not.toHaveBeenCalled()
fireEvent.click(request)
const confirm = document.querySelector(`[data-analytics-id="report.${action}.confirm"]`)!
fireEvent.click(confirm)
if (disposition) await waitFor(() => expect(state.resolve).toHaveBeenCalledWith({ id: 1, disposition }))
else await waitFor(() => expect(state.dismiss).toHaveBeenCalledWith({ id: 1 }))
assertNoSensitiveAttributes()
})
it.each([false, true])('platform paused=%s uses finite pause/resume values', async paused => {
state.paused = paused
render(<GithubSyncPlatformControl visible />)
const action = paused ? 'resume' : 'pause'
fireEvent.click(document.querySelector(`[data-analytics-id="github.platform.${action}.request"]`)!)
expect(id(screen.getByRole('button', { name: 'Close' }))).toBe(`github.platform.${action}.cancel`)
fireEvent.click(document.querySelector(`[data-analytics-id="github.platform.${action}.confirm"]`)!)
await waitFor(() => expect(state.platform).toHaveBeenCalledWith({ expectedVersion: 1, paused: !paused }))
})
it.each(['create', 'replace'] as const)('credential %s marks submit only, never the secret fields', action => {
render(<GithubCredentialConfig />)
fireEvent.click(document.querySelector(`[data-analytics-id="github.credential.${action}"]`)!)
const form = document.querySelector('form')!
expect(id(form)).toBe(`github.credential.${action}.submit`)
expect(id(screen.getByRole('button', { name: 'Close' }))).toBe(`github.credential.${action}.cancel`)
expect(form.querySelector('button[type="submit"]')?.hasAttribute('data-analytics-id')).toBe(false)
for (const field of form.querySelectorAll('input')) expect(id(field)).toBeNull()
expect(document.querySelector('[data-analytics-id="github.credential.disable"]')).not.toBeNull()
assertNoSensitiveAttributes()
})
})

View file

@ -0,0 +1,71 @@
import { buildManifest } from '../../scripts/analytics-manifest.mjs'
import manifestText from '../../../docs/frontend-analytics-manifest.json?raw'
import { describe, expect, it } from 'vitest'
interface Site { file: string; host: string; prop: string; event: string; ids?: string[]; forward?: string }
const manifest = JSON.parse(manifestText) as {
counts: { routes: number; uniqueIds: number; literalJsxSites: number; forwardingSites: number }
routes: Array<{ name: string; declaration: { file: string; line: number }; implementation: { file: string; line: number } | null }>
definitions: Array<{ ids: string[] }>
sites: Site[]
}
const ids = new Set([...manifest.sites.flatMap(site => site.ids ?? []), ...manifest.definitions.flatMap(site => site.ids)])
describe('frontend semantic marker source contract', () => {
it('detects marker/host/forwarding and registered-route drift using the actual TypeScript AST', () => {
expect(buildManifest()).toEqual(manifest)
})
it('keeps static lowercase categories and precise, separate route/page source anchors', () => {
expect(ids.size).toBe(manifest.counts.uniqueIds)
expect(manifest.routes).toHaveLength(manifest.counts.routes)
expect(new Set(manifest.routes.map(route => route.name)).size).toBe(manifest.routes.length)
for (const id of ids) expect(id).toMatch(/^[a-z]+(?:\.[a-z]+){2,}$/)
for (const route of manifest.routes) {
expect(route.declaration.file).toBe('web/src/app/router.tsx')
if (route.implementation) {
expect(route.implementation.file).toMatch(/^web\/src\/pages\//)
expect(route.implementation.line).toBeGreaterThan(0)
expect(route.implementation.file).not.toBe(route.declaration.file)
}
}
expect(ids.has('navigation.primary.open')).toBe(false)
expect(['navigation.skills.open', 'navigation.suites.open', 'navigation.github.open'].every(id => ids.has(id))).toBe(true)
})
it('retains the original eight meanings and explicit meaningful cancellation categories', () => {
for (const id of ['search.query.submit', 'skill.card.open', 'skill.detail.render', 'skill.download.request', 'skill.command.copy', 'skill.prompt.copy', 'skill.publish.request', 'skill.publish.confirm', 'skill.publish.cancel', 'skill.delete.cancel', 'review.reject.cancel', 'github.admission.cancel', 'suite.draft.cancel']) expect(ids.has(id)).toBe(true)
expect(manifest.sites.filter(site => site.ids?.includes('skill.detail.render')).map(site => [site.file, site.host, site.event])).toEqual([['web/src/pages/skill-detail.tsx', 'div', 'structural']])
expect(manifest.sites.some(site => site.host === 'ConfirmDialog' && site.prop === 'cancelAnalyticsId' && site.ids?.includes('skill.publish.cancel'))).toBe(true)
})
it('has no guessed business defaults in generic UI and forwards only caller-scoped props', () => {
const primitives = manifest.sites.filter(site => site.file.startsWith('web/src/shared/ui/'))
expect(primitives.length).toBeGreaterThan(0)
expect(primitives.every(site => site.forward && !site.ids?.length)).toBe(true)
for (const [file, prop] of [
['features/search/search-bar.tsx', 'analyticsId'],
['features/skill/skill-card.tsx', 'analyticsId'],
['shared/components/confirm-dialog.tsx', 'confirmAnalyticsId'],
['shared/components/confirm-dialog.tsx', 'cancelAnalyticsId'],
['features/skill/file-preview-dialog.tsx', 'downloadAnalyticsId'],
['features/skill/file-preview-dialog.tsx', 'copyAnalyticsId'],
]) expect(manifest.sites.some(site => site.file === 'web/src/' + file && site.forward === prop)).toBe(true)
expect(manifest.sites.some(site => /pages\/(dashboard\/github-deep-discovery|settings\/accounts)\.tsx$/.test(site.file))).toBe(false)
})
it('keeps destructive and finite business branches separate without generic lifecycle fallbacks', () => {
for (const domain of ['namespace', 'suite']) {
const actions = domain === 'namespace' ? ['freeze', 'unfreeze', 'archive', 'restore', 'delete'] : ['hide', 'restore', 'archive', 'unarchive', 'delete']
for (const action of actions) for (const phase of ['request', 'confirm', 'cancel']) expect(ids.has(`${domain}.${action}.${phase}`)).toBe(true)
}
for (const action of ['dismiss', 'resolve', 'hide', 'archive']) for (const phase of ['request', 'confirm', 'cancel']) expect(ids.has(`report.${action}.${phase}`)).toBe(true)
for (const action of ['pause', 'resume']) for (const phase of ['request', 'confirm', 'cancel']) expect(ids.has(`github.platform.${action}.${phase}`)).toBe(true)
for (const action of ['create', 'update']) for (const phase of ['request', 'confirm', 'cancel']) expect(ids.has(`skill.promotion.${action}.${phase}`)).toBe(true)
for (const action of ['direct', 'request']) for (const phase of ['submit', 'cancel']) expect(ids.has(`skill.revocation.${action}.${phase}`)).toBe(true)
for (const generic of ['namespace.lifecycle.confirm', 'suite.lifecycle.confirm', 'report.action.confirm', 'github.platform.control', 'github.credential.toggle', 'skill.promotion.confirm', 'skill.revocation.submit']) expect(ids.has(generic)).toBe(false)
expect(manifest.sites.some(site => site.file.endsWith('/github-deep-discovery-repository-drawer.tsx'))).toBe(false)
expect(manifest.sites.some(site => site.file.endsWith('/github-deep-discovery-pagination.tsx'))).toBe(false)
})
})

View file

@ -0,0 +1,174 @@
/** @vitest-environment jsdom */
import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
import { afterEach, describe, expect, it, vi } from 'vitest'
import { SearchBar } from '@/features/search/search-bar'
import { SkillCard } from '@/features/skill/skill-card'
import { InstallCommand } from '@/features/skill/install-command'
import { InstallForAgentButton } from '@/features/skill/install-for-agent-button'
import { ConfirmDialog } from '@/shared/components/confirm-dialog'
import { Pagination } from '@/shared/components/pagination'
import { UploadZone } from '@/features/publish/upload-zone'
import type { SkillSummary } from '@/api/types'
const mocks = vi.hoisted(() => ({ copy: vi.fn(), language: 'en' }))
vi.mock('react-i18next', async () => ({ ...await vi.importActual<typeof import('react-i18next')>('react-i18next'), useTranslation: () => ({ t: (key: string) => key, i18n: { language: mocks.language } }) }))
vi.mock('@/features/auth/use-auth', () => ({ useAuth: () => ({ isAuthenticated: false }) }))
vi.mock('@/features/social/use-star', () => ({ useStarredIdSet: () => ({ starredIds: new Set() }) }))
vi.mock('@/shared/lib/clipboard', () => ({ useCopyToClipboard: () => [false, mocks.copy] }))
const skill = { id: 1, namespace: 'fixture', slug: 'private-fixture', displayName: 'Private fixture', starCount: 0, downloadCount: 0, ratingCount: 0 } as SkillSummary
const attr = (element: Element) => element.getAttribute('data-analytics-id')
afterEach(() => { cleanup(); vi.clearAllMocks(); mocks.language = 'en' })
describe('passive, caller-scoped analytics attributes', () => {
it('omits disabled dropzone intents without changing dropzone or native folder guards', () => {
const select = vi.fn()
const view = render(<UploadZone analyticsId="skill.package.select" folderAnalyticsId="skill.package.folder.select" onFileSelect={select} onFolderSelect={vi.fn()} />)
const drop = view.container.querySelector('.upload-zone')!
expect(attr(drop)).toBe('skill.package.select')
view.rerender(<UploadZone analyticsId="skill.package.select" folderAnalyticsId="skill.package.folder.select" onFileSelect={select} onFolderSelect={vi.fn()} disabled />)
expect(attr(drop)).toBeNull()
const file = view.container.querySelector('.upload-zone input')!
expect(attr(file)).toBeNull()
expect(view.container.querySelector('[data-analytics-id="skill.package.folder.select"]')?.hasAttribute('disabled')).toBe(true)
fireEvent.change(file, { target: { files: [new File(['synthetic'], 'synthetic.zip', { type: 'application/zip' })] } })
fireEvent.click(drop)
expect(select).not.toHaveBeenCalled()
view.rerender(<UploadZone onFileSelect={select} />)
expect(view.container.querySelector('[data-analytics-id]')).toBeNull()
})
it('marks only opted-in search forms and keeps typing/clear separate from submit', () => {
const search = vi.fn()
const view = render(<SearchBar analyticsId="search.query.submit" onSearch={search} />)
const form = screen.getByRole('textbox').closest('form')!
expect(attr(form)).toBe('search.query.submit')
expect(attr(screen.getByRole('button', { name: 'searchBar.button' }))).toBeNull()
fireEvent.change(screen.getByRole('textbox'), { target: { value: 'not-an-analytics-field' } })
fireEvent.click(screen.getByRole('button', { name: 'searchBar.clear' }))
expect(search).not.toHaveBeenCalled()
fireEvent.click(screen.getByRole('button', { name: 'searchBar.button' }))
expect(search).toHaveBeenCalledTimes(1)
fireEvent.submit(form)
expect(search).toHaveBeenCalledTimes(2)
view.rerender(<SearchBar onSearch={search} />)
expect(attr(form)).toBeNull()
view.rerender(<SearchBar analyticsId="search.query.submit" />)
expect(attr(form)).toBeNull()
})
it('retains card click/Enter/Space handlers and omits inactive/unopted markers', () => {
const open = vi.fn()
const view = render(<SkillCard skill={skill} onClick={open} analyticsId="skill.card.open" />)
const card = screen.getByRole('link')
expect(attr(card)).toBe('skill.card.open')
fireEvent.click(card)
fireEvent.keyDown(card, { key: 'Enter' })
fireEvent.keyDown(card, { key: ' ' })
fireEvent.keyDown(card, { key: 'Escape' })
expect(open).toHaveBeenCalledTimes(3)
view.rerender(<SkillCard skill={skill} analyticsId="skill.card.open" />)
expect(view.container.querySelector('[data-analytics-id]')).toBeNull()
view.rerender(<SkillCard skill={skill} onClick={open} />)
expect(view.container.querySelector('[data-analytics-id]')).toBeNull()
})
it.each(['en', 'zh'])('marks copy intents in %s without resource/command/prompt values', async language => {
mocks.language = language
mocks.copy.mockResolvedValue(undefined)
render(<InstallCommand namespace="fixture" slug="private-fixture" version="1.0" analyticsId="skill.command.copy" skillhubAnalyticsId="skill.command.skillhub.select" clawhubAnalyticsId="skill.command.clawhub.select" />)
expect(attr(screen.getByRole('tab', { name: 'skillDetail.installMethodSkillhub' }))).toBe('skill.command.skillhub.select')
expect(attr(screen.getByRole('tab', { name: 'skillDetail.installMethodClawhub' }))).toBe('skill.command.clawhub.select')
const copy = screen.getByRole('button', { name: 'copyButton.copy' })
expect(attr(copy)).toBe('skill.command.copy')
fireEvent.click(copy)
await waitFor(() => expect(mocks.copy).toHaveBeenCalledTimes(1))
fireEvent.click(screen.getByRole('tab', { name: 'skillDetail.installMethodClawhub' }))
expect(attr(screen.getByRole('button', { name: 'copyButton.copy' }))).toBe('skill.command.copy')
fireEvent.click(screen.getByRole('button', { name: 'copyButton.copy' }))
await waitFor(() => expect(mocks.copy).toHaveBeenCalledTimes(2))
cleanup()
render(<InstallForAgentButton namespace="fixture" slug="private-fixture" version="1.0" analyticsId="skill.prompt.copy" />)
const prompt = screen.getByTestId('install-for-agent-button')
expect(attr(prompt)).toBe('skill.prompt.copy')
fireEvent.click(prompt)
await waitFor(() => expect(mocks.copy).toHaveBeenCalledTimes(3))
for (const node of document.querySelectorAll('[data-analytics-id]')) {
expect(attr(node)).not.toMatch(/fixture|1\.0|https|npx/)
}
})
it('keeps disabled and unsafe-version prompt copy disabled', () => {
const view = render(<InstallForAgentButton namespace="fixture" slug="fixture" version="unsafe version" analyticsId="skill.prompt.copy" />)
const prompt = screen.getByTestId('install-for-agent-button')
expect(prompt.hasAttribute('disabled')).toBe(true)
fireEvent.click(prompt)
expect(mocks.copy).not.toHaveBeenCalled()
view.rerender(<InstallForAgentButton namespace="fixture" slug="fixture" version="1.0" disabled analyticsId="skill.prompt.copy" />)
fireEvent.click(prompt)
expect(mocks.copy).not.toHaveBeenCalled()
view.rerender(<InstallForAgentButton namespace="fixture" slug="fixture" version="1.0" />)
expect(attr(prompt)).toBeNull()
})
it('does not turn clipboard rejection into success or another activation', async () => {
mocks.copy.mockRejectedValue(new Error('synthetic clipboard failure'))
const error = vi.spyOn(console, 'error').mockImplementation(() => {})
render(<InstallCommand namespace="fixture" slug="fixture" analyticsId="skill.command.copy" />)
fireEvent.click(screen.getByRole('button', { name: 'copyButton.copy' }))
await waitFor(() => expect(error).toHaveBeenCalledTimes(1))
expect(mocks.copy).toHaveBeenCalledTimes(1)
expect(attr(screen.getByRole('button', { name: 'copyButton.copy' }))).toBe('skill.command.copy')
error.mockRestore()
})
it('forwards confirmation only to the requested confirm button and retains pending guard', async () => {
let finish!: () => void
const confirm = vi.fn(() => new Promise<void>(resolve => { finish = resolve }))
const close = vi.fn()
const view = render(<ConfirmDialog open onOpenChange={close} title="Fixture warning" confirmText="continue" cancelText="cancel" onConfirm={confirm} confirmAnalyticsId="skill.publish.confirm" />)
const button = screen.getByRole('button', { name: 'continue' })
expect(attr(button)).toBe('skill.publish.confirm')
expect(attr(screen.getByRole('button', { name: 'cancel' }))).toBeNull()
fireEvent.click(button)
fireEvent.click(button)
expect(confirm).toHaveBeenCalledTimes(1)
expect(button.hasAttribute('disabled')).toBe(true)
finish()
await waitFor(() => expect(close).toHaveBeenCalledWith(false))
view.rerender(<ConfirmDialog open onOpenChange={close} title="Other dialog" confirmText="continue" onConfirm={confirm} />)
expect(attr(screen.getByRole('button', { name: 'continue' }))).toBeNull()
})
it('pagination forwards intent to native controls, not its structural nav or disabled activation', () => {
const change = vi.fn()
const view = render(<Pagination page={0} totalPages={3} onPageChange={change} analyticsId="search.results.paginate" />)
expect(attr(screen.getByRole('navigation'))).toBeNull()
fireEvent.click(screen.getByRole('button', { name: 'pagination.prev' }))
expect(change).not.toHaveBeenCalled()
const next = screen.getByRole('button', { name: 'pagination.next' })
expect(attr(next)).toBe('search.results.paginate')
fireEvent.click(next)
expect(change).toHaveBeenCalledExactlyOnceWith(1)
view.rerender(<Pagination page={0} totalPages={3} onPageChange={change} />)
expect(view.container.querySelector('[data-analytics-id]')).toBeNull()
})
it('opts destructive/configuration cancellation in per caller, including the close button', () => {
const close = vi.fn()
const confirm = vi.fn()
const view = render(<ConfirmDialog open onOpenChange={close} title="Delete fixture" confirmText="delete" cancelText="cancel" onConfirm={confirm} confirmAnalyticsId="skill.delete.confirm" cancelAnalyticsId="skill.delete.cancel" />)
expect(attr(screen.getByRole('button', { name: 'delete' }))).toBe('skill.delete.confirm')
expect(attr(screen.getByRole('button', { name: 'cancel' }))).toBe('skill.delete.cancel')
const dismiss = screen.getByRole('button', { name: 'Close' })
expect(attr(dismiss)).toBe('skill.delete.cancel')
fireEvent.click(dismiss)
expect(close).toHaveBeenCalledExactlyOnceWith(false)
expect(confirm).not.toHaveBeenCalled()
view.rerender(<ConfirmDialog open onOpenChange={close} title="Other configuration" confirmText="save" cancelText="cancel" onConfirm={confirm} cancelAnalyticsId="github.admission.cancel" />)
expect(attr(screen.getByRole('button', { name: 'cancel' }))).toBe('github.admission.cancel')
expect(attr(screen.getByRole('button', { name: 'save' }))).toBeNull()
view.rerender(<ConfirmDialog open onOpenChange={close} title="Uninstrumented" onConfirm={confirm} />)
expect(document.querySelector('[data-analytics-id]')).toBeNull()
})
})

View file

@ -0,0 +1,76 @@
/** @vitest-environment jsdom */
import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/shared/ui/select'
beforeEach(() => {
vi.stubGlobal('ResizeObserver', class { observe() {} unobserve() {} disconnect() {} })
Element.prototype.scrollIntoView ??= () => {}
})
afterEach(() => { cleanup(); vi.unstubAllGlobals() })
function fixture(onValueChange: (value: string) => void, open = true) {
return render(<Select defaultValue="alpha" defaultOpen={open} onValueChange={onValueChange}>
<SelectTrigger data-analytics-id="search.fixture.interact" aria-label="Fixture filter"><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem value="alpha" data-analytics-id="search.fixture.filter">Alpha</SelectItem>
<SelectItem value="beta" data-analytics-id="search.fixture.filter">Beta</SelectItem>
<SelectItem value="gamma" data-analytics-id="search.fixture.filter" disabled>Gamma</SelectItem>
</SelectContent>
</Select>)
}
describe('actual Radix item activation with passive caller attributes', () => {
it.each(['Enter', ' '])('retains %s keyboard selection and the item marker', async key => {
const change = vi.fn()
fixture(change)
const option = await screen.findByRole('option', { name: 'Beta' })
expect(option.getAttribute('data-analytics-id')).toBe('search.fixture.filter')
fireEvent.keyDown(option, { key })
await waitFor(() => expect(change).toHaveBeenCalledExactlyOnceWith('beta'))
expect(screen.queryByRole('option', { name: 'Beta' })).toBeNull()
})
it('selects mouse items on pointerup, not pointerdown, without requiring a click', async () => {
const change = vi.fn()
fixture(change)
const option = await screen.findByRole('option', { name: 'Beta' })
fireEvent.pointerDown(option, { pointerType: 'mouse', button: 0 })
expect(change).not.toHaveBeenCalled()
fireEvent.pointerUp(option, { pointerType: 'mouse', button: 0 })
await waitFor(() => expect(change).toHaveBeenCalledExactlyOnceWith('beta'))
})
it.each(['touch', 'pen'])('selects %s items on click, not pointerup', async pointerType => {
const change = vi.fn()
fixture(change)
const option = await screen.findByRole('option', { name: 'Beta' })
fireEvent.pointerDown(option, { pointerType })
fireEvent.pointerUp(option, { pointerType })
expect(change).not.toHaveBeenCalled()
fireEvent.click(option)
await waitFor(() => expect(change).toHaveBeenCalledExactlyOnceWith('beta'))
})
it('retains disabled selection guards', async () => {
const change = vi.fn()
fixture(change)
const option = await screen.findByRole('option', { name: 'Gamma' })
expect(option.getAttribute('data-disabled')).toBe('')
fireEvent.keyDown(option, { key: 'Enter' })
fireEvent.pointerDown(option, { pointerType: 'mouse' })
fireEvent.pointerUp(option, { pointerType: 'mouse' })
fireEvent.click(option)
expect(change).not.toHaveBeenCalled()
})
it('documents closed-trigger typeahead as a real change with no item-activation event', async () => {
const change = vi.fn()
fixture(change, false)
const trigger = screen.getByRole('combobox')
expect(trigger.getAttribute('data-analytics-id')).toBe('search.fixture.interact')
expect(screen.queryByRole('option')).toBeNull()
fireEvent.keyDown(trigger, { key: 'b' })
await waitFor(() => expect(change).toHaveBeenCalledExactlyOnceWith('beta'))
expect(screen.queryByRole('option')).toBeNull()
})
})

View file

@ -82,15 +82,16 @@ export function Layout() {
const navItems: Array<{
label: string
to: string
analyticsId?: string
exact?: boolean
auth?: boolean
}> = [
{ label: t('nav.landing'), to: '/', exact: true },
{ label: t('nav.publish'), to: '/dashboard/publish', auth: true },
{ label: t('nav.marketplace'), to: '/search' },
{ label: t('nav.githubSkills'), to: '/github' },
{ label: t('nav.suites'), to: '/suites' },
{ label: t('nav.dashboard'), to: '/dashboard', auth: true },
{ label: t('nav.landing'), to: '/', analyticsId: 'navigation.home.open', exact: true },
{ label: t('nav.publish'), to: '/dashboard/publish', analyticsId: 'skill.publish.open', auth: true },
{ label: t('nav.marketplace'), to: '/search', analyticsId: 'navigation.skills.open' },
{ label: t('nav.githubSkills'), to: '/github', analyticsId: 'navigation.github.open' },
{ label: t('nav.suites'), to: '/suites', analyticsId: 'navigation.suites.open' },
{ label: t('nav.dashboard'), to: '/dashboard', analyticsId: 'navigation.dashboard.open', auth: true },
]
const isActive = (to: string, exact?: boolean) => {
@ -122,7 +123,7 @@ export function Layout() {
style={isSplitAuthRoute ? undefined : { borderColor: 'hsl(var(--border))' }}
>
{!isSplitAuthRoute ? (
<Link to="/" className="text-xl font-semibold tracking-tight flex-shrink-0" style={{ color: 'hsl(var(--foreground))' }}>
<Link data-analytics-id="navigation.home.open" to="/" className="text-xl font-semibold tracking-tight flex-shrink-0" style={{ color: 'hsl(var(--foreground))' }}>
SkillHub
</Link>
) : null}
@ -135,7 +136,7 @@ export function Layout() {
const active = isActive(item.to, item.exact)
return (
<Link
<Link data-analytics-id={item.analyticsId}
key={item.to}
to={item.to}
className={
@ -155,7 +156,7 @@ export function Layout() {
<div className="flex items-center gap-1 sm:gap-2 flex-shrink-0" style={{ color: 'hsl(var(--text-secondary))' }}>
{/* Hamburger — visible below lg */}
{!isAuthEntryRoute ? (
<button
<button data-analytics-id="navigation.menu.toggle"
type="button"
className="lg:hidden inline-flex items-center justify-center rounded-lg p-2 hover:bg-accent transition-colors"
onClick={() => setMobileMenuOpen((prev) => !prev)}
@ -171,7 +172,7 @@ export function Layout() {
{isLoading ? null : user ? (
<UserMenu user={user} />
) : !isAuthEntryRoute ? (
<Link
<Link data-analytics-id="auth.login.open"
to="/login"
className="hover:opacity-80 transition-opacity"
>
@ -189,7 +190,7 @@ export function Layout() {
if (item.auth && !user) return null
const active = isActive(item.to, item.exact)
return (
<Link
<Link data-analytics-id={item.analyticsId}
key={item.to}
to={item.to}
className={`px-4 py-2.5 rounded-lg text-sm font-medium transition-colors ${
@ -247,37 +248,37 @@ export function Layout() {
<div>
<h4 className="mb-4 text-sm font-semibold text-foreground">{t('footer.product')}</h4>
<ul className="space-y-2.5 text-sm text-muted-foreground">
<li><Link to="/search" search={{ q: '', sort: 'relevance', page: 0, starredOnly: false }} className={FOOTER_LINK_CLASS_NAME}>{t('footer.marketplace')}</Link></li>
<li><Link to="/dashboard/publish" className={FOOTER_LINK_CLASS_NAME}>{t('footer.publish')}</Link></li>
<li><Link to="/dashboard" className={FOOTER_LINK_CLASS_NAME}>{t('nav.dashboard')}</Link></li>
<li><Link data-analytics-id="navigation.skills.open" to="/search" search={{ q: '', sort: 'relevance', page: 0, starredOnly: false }} className={FOOTER_LINK_CLASS_NAME}>{t('footer.marketplace')}</Link></li>
<li><Link data-analytics-id="skill.publish.open" to="/dashboard/publish" className={FOOTER_LINK_CLASS_NAME}>{t('footer.publish')}</Link></li>
<li><Link data-analytics-id="navigation.dashboard.open" to="/dashboard" className={FOOTER_LINK_CLASS_NAME}>{t('nav.dashboard')}</Link></li>
</ul>
</div>
<div>
<h4 className="mb-4 text-sm font-semibold text-foreground">{t('footer.developers')}</h4>
<ul className="space-y-2.5 text-sm text-muted-foreground">
<li><a href="https://github.com/iflytek/skillhub/tree/main/docs/skillhub" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>{t('footer.docs')}</a></li>
<li><a href="https://www.npmjs.com/package/@astron-team/skillhub" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>CLI</a></li>
<li><a href="https://github.com/iflytek/skillhub" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>GitHub</a></li>
<li><a data-analytics-id="navigation.documentation.open" href="https://github.com/iflytek/skillhub/tree/main/docs/skillhub" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>{t('footer.docs')}</a></li>
<li><a data-analytics-id="navigation.cli.open" href="https://www.npmjs.com/package/@astron-team/skillhub" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>CLI</a></li>
<li><a data-analytics-id="navigation.repository.open" href="https://github.com/iflytek/skillhub" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>GitHub</a></li>
</ul>
</div>
<div>
<h4 className="mb-4 text-sm font-semibold text-foreground">{t('footer.project')}</h4>
<ul className="space-y-2.5 text-sm text-muted-foreground">
<li><a href="https://github.com/iflytek/skillhub/blob/main/LICENSE" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>License</a></li>
<li><a href="https://github.com/iflytek/skillhub/blob/main/CONTRIBUTING.md" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>Contributing</a></li>
<li><a href="https://github.com/iflytek/skillhub/releases" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>Changelog</a></li>
<li><a href="https://github.com/iflytek/skillhub/blob/main/CODE_OF_CONDUCT.md" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>{t('footer.codeOfConduct')}</a></li>
<li><a data-analytics-id="navigation.license.open" href="https://github.com/iflytek/skillhub/blob/main/LICENSE" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>License</a></li>
<li><a data-analytics-id="navigation.contributing.open" href="https://github.com/iflytek/skillhub/blob/main/CONTRIBUTING.md" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>Contributing</a></li>
<li><a data-analytics-id="navigation.changelog.open" href="https://github.com/iflytek/skillhub/releases" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>Changelog</a></li>
<li><a data-analytics-id="navigation.conduct.open" href="https://github.com/iflytek/skillhub/blob/main/CODE_OF_CONDUCT.md" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>{t('footer.codeOfConduct')}</a></li>
</ul>
</div>
<div>
<h4 className="mb-4 text-sm font-semibold text-foreground">{t('footer.resources')}</h4>
<ul className="space-y-2.5 text-sm text-muted-foreground">
<li><a href="https://github.com/iflytek/skillhub/discussions" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>{t('footer.community')}</a></li>
<li><Link to="/privacy" className={FOOTER_LINK_CLASS_NAME}>{t('footer.privacy')}</Link></li>
<li><Link to="/terms" className={FOOTER_LINK_CLASS_NAME}>{t('footer.terms')}</Link></li>
<li><a data-analytics-id="navigation.community.open" href="https://github.com/iflytek/skillhub/discussions" target="_blank" rel="noreferrer" className={FOOTER_LINK_CLASS_NAME}>{t('footer.community')}</a></li>
<li><Link data-analytics-id="navigation.privacy.open" to="/privacy" className={FOOTER_LINK_CLASS_NAME}>{t('footer.privacy')}</Link></li>
<li><Link data-analytics-id="navigation.terms.open" to="/terms" className={FOOTER_LINK_CLASS_NAME}>{t('footer.terms')}</Link></li>
</ul>
</div>
</div>

View file

@ -16,7 +16,7 @@ export function AuthShell({ children, className }: AuthShellProps) {
return (
<section className={cn('relative w-full', className)}>
<a
<a data-analytics-id="navigation.home.open"
href={withBasePath('/')}
className="absolute left-5 top-5 z-20 inline-flex items-center gap-2 text-sm font-medium text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-500 xl:hidden"
>
@ -25,7 +25,7 @@ export function AuthShell({ children, className }: AuthShellProps) {
</a>
<div className="grid min-h-svh w-full bg-background xl:grid-cols-[53fr_47fr]">
<aside className="sticky top-0 hidden h-svh overflow-hidden border-r border-slate-200 bg-slate-50/60 text-zinc-950 dark:border-slate-800 dark:bg-slate-950 dark:text-zinc-50 xl:block">
<a
<a data-analytics-id="navigation.home.open"
href={withBasePath('/')}
className="absolute left-12 top-10 z-20 inline-flex items-center gap-2 text-sm font-medium text-zinc-700 transition-colors hover:text-zinc-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-current dark:text-zinc-300 dark:hover:text-white 2xl:left-16"
>

View file

@ -68,7 +68,7 @@ export function AuthMethodButtonList({
return (
<div className={cn(compact ? 'grid grid-cols-2 gap-2 sm:grid-cols-4' : 'space-y-3')}>
{providers.map((provider) => (
<Button
<Button data-analytics-id="auth.oauth.request"
key={provider.id}
className={cn(
compact ? 'h-11 justify-center px-2 text-sm xl:h-10' : 'w-full h-12 text-base',

View file

@ -51,7 +51,7 @@ export function SessionBootstrapEntry({ onAuthenticated, methodDisplayName, comp
if (compact) {
return (
<div className="space-y-3">
<Button
<Button data-analytics-id="auth.sso.request"
className="h-11 w-full rounded-xl bg-[#315b86] text-white hover:bg-[#25496d] dark:bg-sky-300 dark:text-sky-950 dark:hover:bg-sky-200 xl:h-10"
type="button"
disabled={bootstrapMutation.isPending}
@ -91,7 +91,7 @@ export function SessionBootstrapEntry({ onAuthenticated, methodDisplayName, comp
</p>
</div>
<Button
<Button data-analytics-id="auth.sso.request"
className="w-full"
type="button"
variant="outline"

View file

@ -49,7 +49,7 @@ export function GithubAdmissionConfig({ policy }: { policy: GithubSyncAdmissionP
return <Card className="sync-section space-y-3 p-4 sm:p-5">
<div className="flex flex-wrap items-start justify-between gap-3">
<div className="min-w-0 flex-1"><h2 className="font-semibold">{t('githubSync.capacityTitle')}</h2><p className="text-sm text-muted-foreground">{t('githubSync.capacityHint')}</p></div>
<Button size="sm" variant="outline" className="sync-action" onClick={openEditor}>{t('githubSync.edit')}</Button>
<Button data-analytics-id="github.admission.edit" size="sm" variant="outline" className="sync-action" onClick={openEditor}>{t('githubSync.edit')}</Button>
</div>
<div className="grid gap-3 text-sm sm:grid-cols-2 lg:grid-cols-4">
<div><span className="text-muted-foreground">{t('githubSync.platformWatermark')}</span><p className="font-semibold">{policy.globalLow ?? '—'} / {policy.globalHigh ?? '—'}</p></div>
@ -58,16 +58,16 @@ export function GithubAdmissionConfig({ policy }: { policy: GithubSyncAdmissionP
<div><span className="text-muted-foreground">{t('githubSync.platformPendingCandidates')}</span><p className="font-semibold">{policy.platformPendingCandidateCount ?? '—'} / {policy.candidatePendingLimit}</p></div>
</div>
<Dialog open={open} onOpenChange={setOpen}>
<DialogContent className="github-sync-surface w-[min(calc(100vw-2rem),42rem)] rounded-md">
<DialogContent closeAnalyticsId="github.admission.cancel" className="github-sync-surface w-[min(calc(100vw-2rem),42rem)] rounded-md">
<DialogHeader><DialogTitle>{t('githubSync.capacityTitle')}</DialogTitle><DialogDescription>{t('githubSync.capacityConfigHelp')}</DialogDescription></DialogHeader>
<form onSubmit={save} className="space-y-4">
<form data-analytics-id="github.admission.save" onSubmit={save} className="space-y-4">
<div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
{fields.map((field) => <label key={field} className="block text-sm">{t(`githubSync.${field}`)}
<Input type="number" min={field.endsWith('Low') ? 0 : 1} step={1} value={values[field]}
onChange={(event) => setValues((current) => ({ ...current, [field]: event.target.value }))} required />
</label>)}
</div>
<div className="flex justify-end gap-2"><Button type="button" size="sm" variant="outline" className="sync-action" onClick={() => setOpen(false)}>{t('githubSync.cancel')}</Button><Button type="submit" size="sm" className="sync-action" disabled={mutation.isPending}>{t('githubSync.save')}</Button></div>
<div className="flex justify-end gap-2"><Button data-analytics-id="github.admission.cancel" type="button" size="sm" variant="outline" className="sync-action" onClick={() => setOpen(false)}>{t('githubSync.cancel')}</Button><Button type="submit" size="sm" className="sync-action" disabled={mutation.isPending}>{t('githubSync.save')}</Button></div>
</form>
</DialogContent>
</Dialog>

View file

@ -66,12 +66,12 @@ export function GithubCredentialConfig() {
<div className="space-y-5">
<div className="flex flex-wrap items-start justify-between gap-3">
<div><h2 className="font-semibold">{t('githubSync.credentials')}</h2><p className="text-sm text-muted-foreground">{t('githubSync.credentialHelp')}</p></div>
<Button size="sm" className="sync-action" onClick={openCreate}>{t('githubSync.addCredential')}</Button>
<Button data-analytics-id="github.credential.create" size="sm" className="sync-action" onClick={openCreate}>{t('githubSync.addCredential')}</Button>
</div>
<Dialog open={open} onOpenChange={(nextOpen) => { setOpen(nextOpen); if (!nextOpen) reset() }}>
<DialogContent className="github-sync-surface rounded-md">
<DialogContent closeAnalyticsId={editingId ? 'github.credential.replace.cancel' : 'github.credential.create.cancel'} className="github-sync-surface rounded-md">
<DialogHeader><DialogTitle>{editingId ? t('githubSync.replaceCredential') : t('githubSync.addCredential')}</DialogTitle><DialogDescription>{t('githubSync.credentialHelp')}</DialogDescription></DialogHeader>
<form onSubmit={save} className="space-y-3">
<form data-analytics-id={editingId ? 'github.credential.replace.submit' : 'github.credential.create.submit'} onSubmit={save} className="space-y-3">
<label className="block text-sm">{t('githubSync.credentialLabel')}
<Input autoComplete="off" maxLength={100} value={label} onChange={(event) => setLabel(event.target.value)} required />
</label>
@ -79,7 +79,7 @@ export function GithubCredentialConfig() {
<Input type="password" autoComplete="new-password" minLength={20} maxLength={512}
value={token} onChange={(event) => setToken(event.target.value)} required />
</label>
<div className="flex justify-end gap-2"><Button type="button" size="sm" variant="outline" className="sync-action" onClick={() => setOpen(false)}>{t('githubSync.cancel')}</Button><Button type="submit" size="sm" className="sync-action" disabled={mutations.create.isPending || mutations.replace.isPending}>{editingId ? t('githubSync.replaceCredential') : t('githubSync.addCredential')}</Button></div>
<div className="flex justify-end gap-2"><Button data-analytics-id={editingId ? 'github.credential.replace.cancel' : 'github.credential.create.cancel'} type="button" size="sm" variant="outline" className="sync-action" onClick={() => setOpen(false)}>{t('githubSync.cancel')}</Button><Button type="submit" size="sm" className="sync-action" disabled={mutations.create.isPending || mutations.replace.isPending}>{editingId ? t('githubSync.replaceCredential') : t('githubSync.addCredential')}</Button></div>
</form>
</DialogContent>
</Dialog>
@ -111,10 +111,10 @@ export function GithubCredentialConfig() {
)) : '—'}</TableCell>
<TableCell>{formatLocalDateTime(credential.lastUsedAt, i18n.language)}</TableCell>
<TableCell className="space-x-2 whitespace-nowrap">
<Button size="sm" variant="outline" className="sync-action" disabled={!credential.id} onClick={() => credential.id && openReplace(credential.id, credential.label ?? '')}>
<Button data-analytics-id="github.credential.replace" size="sm" variant="outline" className="sync-action" disabled={!credential.id} onClick={() => credential.id && openReplace(credential.id, credential.label ?? '')}>
{t('githubSync.replaceCredential')}
</Button>
<Button size="sm" variant="outline" className="sync-action" disabled={!credential.id || mutations.setEnabled.isPending || credential.status === 'INVALID' || credential.status !== 'ACTIVE' && credential.keyAvailable === false}
<Button data-analytics-id={credential.status === 'ACTIVE' ? 'github.credential.disable' : 'github.credential.enable'} size="sm" variant="outline" className="sync-action" disabled={!credential.id || mutations.setEnabled.isPending || credential.status === 'INVALID' || credential.status !== 'ACTIVE' && credential.keyAvailable === false}
onClick={() => credential.id && setEnabled(credential.id, credential.status !== 'ACTIVE')}>
{credential.status === 'ACTIVE' ? t('githubSync.disable') : t('githubSync.enable')}
</Button>

View file

@ -62,14 +62,14 @@ export function GithubDeepDiscoveryConfig({ configuration, onClose, embedded = f
<div className="space-y-5">
<label className="flex items-start justify-between gap-4 border-b pb-4">
<span><span className="block font-medium">{t('deepDiscovery.enabled')}</span><span className="mt-1 block text-sm text-muted-foreground">{t('deepDiscovery.enabledHelp')}</span></span>
<input type="checkbox" checked={enabled} onChange={(event) => setEnabled(event.target.checked)} className="mt-1 h-5 w-5 accent-primary" />
<input data-analytics-id="github.discovery.toggle" type="checkbox" checked={enabled} onChange={(event) => setEnabled(event.target.checked)} className="mt-1 h-5 w-5 accent-primary" />
</label>
<fieldset className="space-y-3 border-b pb-4">
<legend className="font-medium">{t('deepDiscovery.budget')}</legend>
<div className="grid gap-2 sm:grid-cols-3">
{(['ECONOMY', 'BALANCED', 'ACCELERATED'] as const).map((profile) => <label key={profile}
className={`flex cursor-pointer items-start gap-2 rounded border p-3 ${budgetProfile === profile ? 'border-primary bg-primary/5' : 'border-border'}`}>
<input type="radio" name="deep-discovery-budget" value={profile} checked={budgetProfile === profile}
<input data-analytics-id={profile === 'ECONOMY' ? 'github.discovery.budget.economy' : profile === 'BALANCED' ? 'github.discovery.budget.balanced' : 'github.discovery.budget.accelerated'} type="radio" name="deep-discovery-budget" value={profile} checked={budgetProfile === profile}
onChange={() => setBudgetProfile(profile)} className="mt-1 accent-primary" />
<span><span className="block text-sm font-medium">{t(`deepDiscovery.budgets.${profile}`)}</span><span className="block text-xs text-muted-foreground">{t(`deepDiscovery.budgetHelp.${profile}`)}</span></span>
</label>)}
@ -79,8 +79,8 @@ export function GithubDeepDiscoveryConfig({ configuration, onClose, embedded = f
<div className="space-y-3">
<h3 className="font-medium">{t('deepDiscovery.exclusions')}</h3>
<p className="text-sm text-muted-foreground">{t('deepDiscovery.exclusionsHelp')}</p>
<form onSubmit={addExclusion} className="flex flex-wrap gap-2">
<select aria-label={t('deepDiscovery.exclusionKind')} value={kind} onChange={(event) => setKind(event.target.value as Exclusion['kind'])}
<form data-analytics-id="github.exclusion.add" onSubmit={addExclusion} className="flex flex-wrap gap-2">
<select data-analytics-id="github.exclusion.kind" aria-label={t('deepDiscovery.exclusionKind')} value={kind} onChange={(event) => setKind(event.target.value as Exclusion['kind'])}
className="h-9 rounded border bg-background px-2 text-sm">
<option value="REPOSITORY">{t('deepDiscovery.exclusionRepository')}</option>
<option value="OWNER">{t('deepDiscovery.exclusionOwner')}</option>
@ -93,17 +93,17 @@ export function GithubDeepDiscoveryConfig({ configuration, onClose, embedded = f
<div className="max-h-40 space-y-1 overflow-y-auto">
{exclusions.map((item, index) => <div key={`${item.kind}:${item.value}`} className="flex items-center justify-between gap-2 rounded border px-3 py-2 text-sm">
<span className="min-w-0 break-all">{t(item.kind === 'OWNER' ? 'deepDiscovery.exclusionOwner' : 'deepDiscovery.exclusionRepository')}: {item.value}</span>
<Button type="button" size="sm" variant="ghost" aria-label={t('deepDiscovery.removeExclusion', { value: item.value })}
<Button data-analytics-id="github.exclusion.remove" type="button" size="sm" variant="ghost" aria-label={t('deepDiscovery.removeExclusion', { value: item.value })}
onClick={() => setExclusions((current) => current.filter((_, at) => at !== index))}><Trash2 className="h-4 w-4" /></Button>
</div>)}
{exclusions.length === 0 ? <p className="text-sm text-muted-foreground">{t('deepDiscovery.noExclusions')}</p> : null}
</div>
</div>
</div>
{conflict ? <div role="alert" className="flex flex-wrap items-center justify-between gap-2 rounded border border-destructive/40 p-3 text-sm text-destructive"><span>{t('deepDiscovery.configConflict')}</span><Button type="button" variant="outline" size="sm" onClick={() => { void queryClient.invalidateQueries({ queryKey: DEEP_DISCOVERY_QUERY_KEY }); onClose() }}>{t('deepDiscovery.reloadConfiguration')}</Button></div> : null}
{conflict ? <div role="alert" className="flex flex-wrap items-center justify-between gap-2 rounded border border-destructive/40 p-3 text-sm text-destructive"><span>{t('deepDiscovery.configConflict')}</span><Button data-analytics-id="github.discovery.reload" type="button" variant="outline" size="sm" onClick={() => { void queryClient.invalidateQueries({ queryKey: DEEP_DISCOVERY_QUERY_KEY }); onClose() }}>{t('deepDiscovery.reloadConfiguration')}</Button></div> : null}
<DialogFooter className="justify-end sm:justify-end">
<Button type="button" variant="outline" onClick={onClose}>{t('deepDiscovery.cancel')}</Button>
<Button type="button" disabled={update.isPending || conflict} onClick={save}>{t('deepDiscovery.save')}</Button>
<Button data-analytics-id="github.discovery.cancel" type="button" variant="outline" onClick={onClose}>{t('deepDiscovery.cancel')}</Button>
<Button data-analytics-id="github.discovery.save" type="button" disabled={update.isPending || conflict} onClick={save}>{t('deepDiscovery.save')}</Button>
</DialogFooter>
</>

View file

@ -168,12 +168,12 @@ export function GithubDiscoveryConfig({ layout = 'default' }: { layout?: 'defaul
</div>
<div className="flex flex-wrap gap-2" role="group" aria-label={t('githubSync.discoveryMode')}>
{layout === 'default' ? <Button size="sm" className="sync-action" onClick={() => openForm('repository')}>{t('githubSync.addRepository')}</Button> : null}
<Button size="sm" variant="outline" className="sync-action" onClick={() => openForm('owner')}>{t('githubSync.addOwner')}</Button>
<Button size="sm" variant="outline" className="sync-action" onClick={() => openForm('rule')}>{t('githubSync.addRule')}</Button>
<Button data-analytics-id="github.owner.create" size="sm" variant="outline" className="sync-action" onClick={() => openForm('owner')}>{t('githubSync.addOwner')}</Button>
<Button data-analytics-id="github.rule.create" size="sm" variant="outline" className="sync-action" onClick={() => openForm('rule')}>{t('githubSync.addRule')}</Button>
</div>
</div>
<Dialog open={mode !== null} onOpenChange={(open) => { if (!open) closeForm() }}>
<DialogContent className="github-sync-surface w-[min(calc(100vw-2rem),60rem)] rounded-md">
<DialogContent closeAnalyticsId={mode === 'owner' ? 'github.owner.cancel' : editingRuleId ? 'github.rule.edit.cancel' : 'github.rule.create.cancel'} className="github-sync-surface w-[min(calc(100vw-2rem),60rem)] rounded-md">
<DialogHeader>
<DialogTitle>{t(mode === 'repository' ? 'githubSync.addRepository' : mode === 'owner' ? 'githubSync.addOwner' : editingRuleId ? 'githubSync.editRule' : 'githubSync.addRule')}</DialogTitle>
<DialogDescription>{t(mode === 'repository' ? 'githubSync.repositoryHelp' : mode === 'owner' ? 'githubSync.ownerHelp' : 'githubSync.ruleHelp')}</DialogDescription>
@ -188,7 +188,7 @@ export function GithubDiscoveryConfig({ layout = 'default' }: { layout?: 'defaul
) : null}
{mode === 'owner' ? (
<div>
<form onSubmit={addOwner} className="space-y-3">
<form data-analytics-id="github.owner.add" onSubmit={addOwner} className="space-y-3">
<Input aria-label={t('githubSync.owner')} placeholder="owner" value={owner} onChange={(event) => setOwner(event.target.value)} required />
<label className="block text-sm">{t('githubSync.targetHours')}
<Input type="number" min={1} max={720} value={ownerHours}
@ -203,7 +203,7 @@ export function GithubDiscoveryConfig({ layout = 'default' }: { layout?: 'defaul
{mode === 'rule' ? (
<div>
<div className="grid gap-6 lg:grid-cols-2">
<form onSubmit={saveRule} className="space-y-3">
<form data-analytics-id={editingRuleId ? 'github.rule.edit.submit' : 'github.rule.create.submit'} onSubmit={saveRule} className="space-y-3">
<Input aria-label={t('githubSync.ruleTitle')} placeholder={t('githubSync.ruleTitle')} value={ruleTitle} onChange={(event) => setRuleTitle(event.target.value)} required />
<label className="block text-sm">{t('githubSync.targetHours')}
<Input type="number" min={1} max={720} value={ruleHours}
@ -216,12 +216,12 @@ export function GithubDiscoveryConfig({ layout = 'default' }: { layout?: 'defaul
<div className="grid gap-3 sm:grid-cols-2">
<label className="block text-sm">{t('githubSync.selectorKind')}
<select className="mt-1 w-full px-2 text-sm" value={selector.kind} onChange={(event) => setSelectors((current) => current.map((item, at) => at === index ? { ...item, kind: event.target.value as Selector['kind'] } : item))}>
<option value="KEYWORD">{t('githubSync.keyword')}</option><option value="TOPIC">{t('githubSync.topic')}</option>
<option data-analytics-id="github.selector.kind.keyword" value="KEYWORD">{t('githubSync.keyword')}</option><option data-analytics-id="github.selector.kind.topic" value="TOPIC">{t('githubSync.topic')}</option>
</select>
</label>
<label className="block text-sm">{t('githubSync.selectorPriority')}
<select className="mt-1 w-full px-2 text-sm" value={selector.priority} onChange={(event) => setSelectors((current) => current.map((item, at) => at === index ? { ...item, priority: event.target.value as Selector['priority'] } : item))}>
<option value="CORE">{t('githubSync.core')}</option><option value="EXTENSION">{t('githubSync.extension')}</option>
<option data-analytics-id="github.selector.priority.core" value="CORE">{t('githubSync.core')}</option><option data-analytics-id="github.selector.priority.extension" value="EXTENSION">{t('githubSync.extension')}</option>
</select>
</label>
</div>
@ -229,15 +229,15 @@ export function GithubDiscoveryConfig({ layout = 'default' }: { layout?: 'defaul
<label className="min-w-40 flex-1 text-sm">{t(selector.kind === 'TOPIC' ? 'githubSync.topic' : 'githubSync.keyword')}
<Input className="mt-1" value={selector.value} onChange={(event) => setSelectors((current) => current.map((item, at) => at === index ? { ...item, value: event.target.value } : item))} required />
</label>
{selectors.length > 1 ? <Button type="button" size="sm" className="sync-action" variant="outline" onClick={() => setSelectors((current) => current.filter((_, at) => at !== index))}>{t('githubSync.remove')}</Button> : null}
{selectors.length > 1 ? <Button data-analytics-id="github.selector.remove" type="button" size="sm" className="sync-action" variant="outline" onClick={() => setSelectors((current) => current.filter((_, at) => at !== index))}>{t('githubSync.remove')}</Button> : null}
</div>
</div>
))}
{selectors.length < 20 ? <Button type="button" size="sm" className="sync-action" variant="outline" onClick={() => setSelectors((current) => [...current, initialSelector])}>{t('githubSync.addSelector')}</Button> : null}
{selectors.length < 20 ? <Button data-analytics-id="github.selector.add" type="button" size="sm" className="sync-action" variant="outline" onClick={() => setSelectors((current) => [...current, initialSelector])}>{t('githubSync.addSelector')}</Button> : null}
<div className="flex flex-wrap gap-2">
<Button type="submit" size="sm" className="sync-action" disabled={mutations.addSearchRule.isPending || mutations.updateSearchRule.isPending}>{t(editingRuleId ? 'githubSync.save' : 'githubSync.add')}</Button>
<Button type="button" size="sm" className="sync-action" variant="outline" disabled={previewPending || workerStatus.data?.online !== true || !ruleTitle.trim() || selectors.some((selector) => !selector.value.trim())} onClick={previewRule}>{t('githubSync.previewRule')}</Button>
<Button type="button" size="sm" className="sync-action" variant="outline" onClick={closeForm}>{t('githubSync.cancel')}</Button>
<Button data-analytics-id="github.rule.preview" type="button" size="sm" className="sync-action" variant="outline" disabled={previewPending || workerStatus.data?.online !== true || !ruleTitle.trim() || selectors.some((selector) => !selector.value.trim())} onClick={previewRule}>{t('githubSync.previewRule')}</Button>
<Button data-analytics-id={editingRuleId ? 'github.rule.edit.cancel' : 'github.rule.create.cancel'} type="button" size="sm" className="sync-action" variant="outline" onClick={closeForm}>{t('githubSync.cancel')}</Button>
</div>
</form>
<div className="sync-preview p-4" aria-live="polite">
@ -292,8 +292,8 @@ export function GithubDiscoveryConfig({ layout = 'default' }: { layout?: 'defaul
<TableCell>{formatLocalDateTime(entry.nextDueAt, i18n.language)}</TableCell>
<TableCell><span className="sync-state" data-tone={entry.enabled ? 'teal' : 'amber'}>{entry.enabled ? t('githubSync.active') : t('githubSync.paused')}</span></TableCell>
<TableCell className="space-x-2">
{entry.entryType === 'SEARCH_RULE' ? <Button size="sm" className="sync-action" variant="outline" onClick={() => editRule(entry)}>{t('githubSync.edit')}</Button> : null}
<Button size="sm" className="sync-action" variant="outline" disabled={!entry.id || mutations.setEnabled.isPending} onClick={() => entry.id && setEnabled(entry.id, !entry.enabled)}>{entry.enabled ? t('githubSync.disable') : t('githubSync.enable')}</Button>
{entry.entryType === 'SEARCH_RULE' ? <Button data-analytics-id="github.rule.edit" size="sm" className="sync-action" variant="outline" onClick={() => editRule(entry)}>{t('githubSync.edit')}</Button> : null}
<Button data-analytics-id={entry.entryType === 'SEARCH_RULE' ? entry.enabled ? 'github.rule.disable' : 'github.rule.enable' : entry.enabled ? 'github.owner.disable' : 'github.owner.enable'} size="sm" className="sync-action" variant="outline" disabled={!entry.id || mutations.setEnabled.isPending} onClick={() => entry.id && setEnabled(entry.id, !entry.enabled)}>{entry.enabled ? t('githubSync.disable') : t('githubSync.enable')}</Button>
</TableCell>
</TableRow>
))}</TableBody>

View file

@ -27,7 +27,7 @@ export function GithubRetryRejectedSkillButton({ sourceId, path, namespaceSlug }
if (!skillPath || (path.latestBindingIngestionStatus !== 'REJECTED' && !path.retryRequested)) return null
return <div className="space-y-1">
<Button size="sm" className="sync-action" variant="outline" disabled={!!path.retryInProgress || !!path.ignoredByCurrentPolicy || retry.isPending}
<Button data-analytics-id="github.rejected.retry" size="sm" className="sync-action" variant="outline" disabled={!!path.retryInProgress || !!path.ignoredByCurrentPolicy || retry.isPending}
onClick={() => { setFeedback(''); retry.mutate() }}>
{path.retryInProgress ? t('githubSync.retryRejectedPending') : t('githubSync.retryRejected')}
</Button>

View file

@ -53,16 +53,16 @@ export function GithubScheduleConfig({ policy }: { policy: GithubSyncSchedulePol
return <Card className="sync-section space-y-3 p-4 sm:p-5">
<div className="flex flex-wrap items-start justify-between gap-3">
<div className="min-w-0 flex-1"><h2 className="font-semibold">{t('githubSync.scheduleTitle')}</h2><p className="text-sm text-muted-foreground">{t('githubSync.scheduleHelp')}</p></div>
<Button size="sm" variant="outline" className="sync-action" onClick={openEditor}>{t('githubSync.edit')}</Button>
<Button data-analytics-id="github.schedule.edit" size="sm" variant="outline" className="sync-action" onClick={openEditor}>{t('githubSync.edit')}</Button>
</div>
<div className="grid gap-3 text-sm sm:grid-cols-3">
{fields.map((field) => <div key={field}><span className="text-muted-foreground">{t(`githubSync.${field}`)}</span><p className="font-semibold">{policy[field] == null ? '—' : `${policy[field]} ${t('githubSync.hoursUnit')}`}</p></div>)}
</div>
{policy.repositoryHours == null ? <p className="text-xs text-muted-foreground">{t('githubSync.scheduleLegacy', { interval: policy.effectiveRepositoryInterval })}</p> : null}
<Dialog open={open} onOpenChange={setOpen}>
<DialogContent className="github-sync-surface w-[min(calc(100vw-2rem),38rem)] rounded-md">
<DialogContent closeAnalyticsId="github.schedule.cancel" className="github-sync-surface w-[min(calc(100vw-2rem),38rem)] rounded-md">
<DialogHeader><DialogTitle>{t('githubSync.scheduleTitle')}</DialogTitle><DialogDescription>{t('githubSync.scheduleHelp')}</DialogDescription></DialogHeader>
<form onSubmit={save} className="space-y-4">
<form data-analytics-id="github.schedule.save" onSubmit={save} className="space-y-4">
<div className="grid gap-3 sm:grid-cols-3">
{fields.map((field) => <label key={field} className="block text-sm">
{t(`githubSync.${field}`)}
@ -71,7 +71,7 @@ export function GithubScheduleConfig({ policy }: { policy: GithubSyncSchedulePol
onChange={(event) => setHours((current) => ({ ...current, [field]: event.target.value }))} required />
</label>)}
</div>
<div className="flex justify-end gap-2"><Button type="button" size="sm" variant="outline" className="sync-action" onClick={() => setOpen(false)}>{t('githubSync.cancel')}</Button><Button type="submit" size="sm" className="sync-action" disabled={mutation.isPending}>{t('githubSync.save')}</Button></div>
<div className="flex justify-end gap-2"><Button data-analytics-id="github.schedule.cancel" type="button" size="sm" variant="outline" className="sync-action" onClick={() => setOpen(false)}>{t('githubSync.cancel')}</Button><Button type="submit" size="sm" className="sync-action" disabled={mutation.isPending}>{t('githubSync.save')}</Button></div>
</form>
</DialogContent>
</Dialog>

View file

@ -57,7 +57,7 @@ function IgnoreForm({ initial, saving, onSave }: {
void onSave(value.split('\n').map((line) => line.trim()).filter(Boolean))
}
return (
<form className="space-y-2 border-t pt-4" onSubmit={submit}>
<form data-analytics-id="github.ignore.save" className="space-y-2 border-t pt-4" onSubmit={submit}>
<label htmlFor="github-source-ignore-patterns" className="block text-sm font-medium">{t('githubSync.ignorePaths')}</label>
<Textarea id="github-source-ignore-patterns" value={value} onChange={(event) => setValue(event.target.value)}
placeholder="examples/legacy\narchive" rows={4} />

View file

@ -27,7 +27,7 @@ export function GithubSourceRescanButton({ sourceId, status, namespaceSlug }: {
})
return <div className="space-y-1">
<Button size="sm" className="sync-action" variant="outline" disabled={status === 'PAUSED' || rescan.isPending}
<Button data-analytics-id="github.source.rescan" size="sm" className="sync-action" variant="outline" disabled={status === 'PAUSED' || rescan.isPending}
onClick={() => { setFeedback(''); rescan.mutate() }}>
{t('githubSync.rescan')}
</Button>

View file

@ -54,7 +54,7 @@ export function GithubSyncCollectionDrawer({ onClose, onRepository, visible }: {
const specified = entries.data?.filter((entry) => entry.entryType === 'CURATED_REPOSITORY')
return <Dialog open onOpenChange={(open) => { if (!open) onClose() }}>
<DialogContent className="github-sync-surface !left-auto !right-0 !top-0 !h-dvh !max-h-dvh !grid-rows-[auto_minmax(0,1fr)] !gap-0 !overflow-hidden w-[min(100vw,44rem)] !translate-x-0 !translate-y-0 !rounded-none p-0">
<DialogContent closeAnalyticsId="github.collection.close" className="github-sync-surface !left-auto !right-0 !top-0 !h-dvh !max-h-dvh !grid-rows-[auto_minmax(0,1fr)] !gap-0 !overflow-hidden w-[min(100vw,44rem)] !translate-x-0 !translate-y-0 !rounded-none p-0">
<DialogHeader className="border-b px-5 py-4 text-left">
<DialogTitle>{t('githubSync.collectionConfig')}</DialogTitle>
<DialogDescription>{t('githubSync.collectionScope')}</DialogDescription>
@ -72,10 +72,10 @@ export function GithubSyncCollectionDrawer({ onClose, onRepository, visible }: {
</div>
{summary.data?.recent ? <p className="text-sm text-muted-foreground">{t('githubSync.officialRecentResult', { candidates: summary.data.recent.newCandidateRepositories ?? '—', skills: summary.data.recent.newSkills ?? '—' })}{summary.data.recent.complete === false ? ` · ${t('githubSync.partialHistory')}` : ''}</p> : null}
{summary.error ? <p role="alert" className="text-sm text-destructive">{t('githubSync.loadFailed')}: {summary.error.message}</p> : null}
<Button size="sm" variant="outline" aria-expanded={configExpanded} onClick={() => setConfigExpanded(!configExpanded)}>{t('githubSync.editAutomaticDiscovery')}</Button>
<Button data-analytics-id="github.discovery.edit" size="sm" variant="outline" aria-expanded={configExpanded} onClick={() => setConfigExpanded(!configExpanded)}>{t('githubSync.editAutomaticDiscovery')}</Button>
{configExpanded ? <GithubDeepDiscoveryConfig key={configuration.data.version} configuration={configuration.data} onClose={onClose} embedded /> : null}
</> : null}
<div className="border-t pt-3"><button type="button" className="flex w-full items-center justify-between text-left text-sm font-medium" aria-expanded={progressExpanded} onClick={() => setProgressExpanded(!progressExpanded)}>{t('githubSync.discoveryProgress')}<span aria-hidden="true">{progressExpanded ? '−' : '+'}</span></button>
<div className="border-t pt-3"><button data-analytics-id="github.progress.toggle" type="button" className="flex w-full items-center justify-between text-left text-sm font-medium" aria-expanded={progressExpanded} onClick={() => setProgressExpanded(!progressExpanded)}>{t('githubSync.discoveryProgress')}<span aria-hidden="true">{progressExpanded ? '−' : '+'}</span></button>
{progressExpanded ? <div className="mt-3 space-y-2 text-sm">
{progress.error ? <p role="alert" className="text-destructive">{t('githubSync.loadFailed')}: {progress.error.message}</p> : null}
{progress.data?.channels?.length ? <div className="divide-y rounded border">{progress.data.channels.map((channel) => <div key={channel.channel} className="space-y-1 p-2"><div className="flex flex-wrap justify-between gap-2"><span>{t(`deepDiscovery.channel.${channel.channel}`, { defaultValue: channel.channel ?? '—' })}</span><span>{t(`deepDiscovery.state.${channel.state}`, { defaultValue: channel.state ?? '—' })}</span></div><p className="text-xs text-muted-foreground">{t('deepDiscovery.completedShards')}: {channel.completedShards ?? '—'} · {t('deepDiscovery.pendingShards')}: {channel.pendingShards ?? '—'} · {t('deepDiscovery.gapShards')}: {channel.gapShards ?? '—'} · {t('deepDiscovery.lastProgress')}: {formatLocalDateTime(channel.lastProgressAt, i18n.language)}</p></div>)}</div> : <p className="text-muted-foreground">{t('githubSync.empty')}</p>}
@ -85,7 +85,7 @@ export function GithubSyncCollectionDrawer({ onClose, onRepository, visible }: {
</section>
<section className="space-y-4 rounded border p-4">
<div><h2 className="font-semibold">{t('githubSync.specifiedRepository')}</h2><p className="text-sm text-muted-foreground">{t('githubSync.specifiedRepositoryHelp')}</p></div>
<form onSubmit={addRepository} className="flex flex-wrap gap-2">
<form data-analytics-id="github.repository.add" onSubmit={addRepository} className="flex flex-wrap gap-2">
<Input className="min-w-52 flex-1" aria-label={t('githubSync.repository')} placeholder="https://github.com/owner/repository" value={repository} onChange={(event) => setRepository(event.target.value)} required />
<Button size="sm" type="submit" disabled={mutations.addRepository.isPending}>{t('githubSync.addRepository')}</Button>
</form>
@ -95,11 +95,11 @@ export function GithubSyncCollectionDrawer({ onClose, onRepository, visible }: {
<div className="flex flex-wrap items-center justify-between gap-2"><span className="break-all font-medium">{entry.ownerLogin}/{entry.repositoryName}</span><span className="sync-state" data-tone={entry.enabled ? 'teal' : 'amber'}>{entry.enabled ? t('githubSync.enabled') : t('githubSync.disabled')}</span></div>
<p className="text-xs text-muted-foreground">{entry.repositoryId ? `#${entry.repositoryId}` : t('githubSync.unresolved')} · {t('githubSync.nextCheck')}: {entry.nextDueAt ? formatLocalDateTime(entry.nextDueAt, i18n.language) : '—'}</p>
{entry.latestExecution ? <p className="text-xs text-muted-foreground">{t('githubSync.latestExecution')}: {entry.latestExecution.status ? t(`githubSync.codes.${entry.latestExecution.status}`, { defaultValue: entry.latestExecution.status }) : '—'}{entry.latestExecution.errorCode ? ` · ${t(`githubSync.codes.${entry.latestExecution.errorCode}`, { defaultValue: entry.latestExecution.errorCode })}` : ''}{entry.latestExecution.retryAt ? ` · ${t('githubSync.retryAt')}: ${formatLocalDateTime(entry.latestExecution.retryAt, i18n.language)}` : ''}</p> : null}
<div className="flex flex-wrap gap-2">{entry.repositoryId ? <Button size="sm" variant="outline" onClick={() => onRepository(entry.repositoryId!)}>{t('githubSync.viewRepository')}</Button> : null}<Button size="sm" variant="outline" disabled={!entry.id || mutations.setEnabled.isPending} onClick={() => entry.id && void setEnabled(entry.id, !entry.enabled)}>{entry.enabled ? t('githubSync.disable') : t('githubSync.enable')}</Button></div>
<div className="flex flex-wrap gap-2">{entry.repositoryId ? <Button data-analytics-id="github.repository.open" size="sm" variant="outline" onClick={() => onRepository(entry.repositoryId!)}>{t('githubSync.viewRepository')}</Button> : null}<Button data-analytics-id="github.repository.toggle" size="sm" variant="outline" disabled={!entry.id || mutations.setEnabled.isPending} onClick={() => entry.id && void setEnabled(entry.id, !entry.enabled)}>{entry.enabled ? t('githubSync.disable') : t('githubSync.enable')}</Button></div>
</div>)}</div> : !entries.isLoading && !entries.error ? <p className="text-sm text-muted-foreground">{t('githubSync.noSpecifiedRepositories')}</p> : null}
</section>
<section className="rounded border p-4">
<button type="button" className="flex w-full items-center justify-between text-left font-semibold" aria-expanded={expanded} onClick={() => setExpanded(!expanded)}>{t('githubSync.otherAcquisition')}<span aria-hidden="true">{expanded ? '−' : '+'}</span></button>
<button data-analytics-id="github.acquisition.toggle" type="button" className="flex w-full items-center justify-between text-left font-semibold" aria-expanded={expanded} onClick={() => setExpanded(!expanded)}>{t('githubSync.otherAcquisition')}<span aria-hidden="true">{expanded ? '−' : '+'}</span></button>
{expanded ? <div className="mt-4"><GithubDiscoveryConfig layout="other" /></div> : <p className="mt-1 text-sm text-muted-foreground">{t('githubSync.otherAcquisitionHelp')}</p>}
</section>
{progress.error ? <p role="alert" className="text-sm text-destructive">{t('githubSync.loadFailed')}: {progress.error.message}</p> : null}

View file

@ -46,18 +46,18 @@ export function GithubSyncConflictBinder({ path, namespaceSlug }: {
return (
<>
<Button size="sm" className="sync-action" variant="outline" onClick={() => setOpen(true)}>
<Button data-analytics-id={pathMove ? 'github.binding.pathmove.open' : 'github.binding.conflict.open'} size="sm" className="sync-action" variant="outline" onClick={() => setOpen(true)}>
{t(pathMove ? 'githubSync.resolvePathMove' : 'githubSync.resolveConflict')}
</Button>
<Dialog open={open} onOpenChange={setOpen}>
<DialogContent className="github-sync-surface rounded-md">
<DialogContent closeAnalyticsId={pathMove ? 'github.binding.pathmove.cancel' : 'github.binding.conflict.cancel'} className="github-sync-surface rounded-md">
<DialogHeader>
<DialogTitle>{t(pathMove ? 'githubSync.confirmPathMoveTitle' : 'githubSync.bindExistingTitle')}</DialogTitle>
<DialogDescription>{pathMove
? t('githubSync.confirmPathMoveHelp', { path: path.skillPath })
: t('githubSync.bindExistingHelp', { slug: path.targetSkillSlug, path: path.skillPath })}</DialogDescription>
</DialogHeader>
<form onSubmit={submit} className="space-y-4">
<form data-analytics-id={pathMove ? 'github.binding.pathmove.confirm' : 'github.binding.conflict.confirm'} onSubmit={submit} className="space-y-4">
<label className="block space-y-1 text-sm">{t('githubSync.targetSkillId')}
<Input type="number" min="1" step="1" required value={skillId} onChange={(event) => setSkillId(event.target.value)} />
</label>
@ -65,7 +65,7 @@ export function GithubSyncConflictBinder({ path, namespaceSlug }: {
<Textarea required minLength={10} maxLength={1000} value={reason} onChange={(event) => setReason(event.target.value)} />
</label>
<DialogFooter>
<Button type="button" size="sm" className="sync-action" variant="outline" onClick={() => setOpen(false)}>{t('githubSync.cancel')}</Button>
<Button data-analytics-id={pathMove ? 'github.binding.pathmove.cancel' : 'github.binding.conflict.cancel'} type="button" size="sm" className="sync-action" variant="outline" onClick={() => setOpen(false)}>{t('githubSync.cancel')}</Button>
<Button type="submit" size="sm" className="sync-action" disabled={bind.isPending || !Number.isSafeInteger(Number(skillId)) || Number(skillId) < 1 || reason.trim().length < 10}>{t('githubSync.confirmBinding')}</Button>
</DialogFooter>
</form>

View file

@ -47,16 +47,16 @@ export function GithubSyncOverview({ visible, onCollection, onSettings, onRuns,
<p className="mt-1 text-sm text-muted-foreground">{t('githubSync.preparationHelp')}</p>
<div className="mt-4 grid gap-3 sm:grid-cols-2">
<div className="sync-rail p-3 text-sm"><strong>{t('githubSync.compatibleWorker')}</strong><p className="mt-1 text-muted-foreground">{progress.error || summary.error ? t('githubSync.statusUnknown') : summary.isLoading || progress.isLoading ? t('githubSync.loading') : t(`deepDiscovery.workerState.${summary.data?.worker?.state}`, { defaultValue: summary.data?.worker?.state ?? t('githubSync.statusUnknown') })}</p></div>
<div className="sync-rail p-3 text-sm"><strong>{t('githubSync.capacityTitle')}</strong><p className="mt-1 text-muted-foreground">{policy.error ? t('githubSync.statusUnknown') : policy.isLoading ? t('githubSync.loading') : capacityReady ? t('githubSync.configured') : t('githubSync.unconfigured')}</p><Button size="sm" variant="link" onClick={onSettings}>{t('githubSync.systemSettings')}</Button></div>
<div className="sync-rail p-3 text-sm"><strong>{t('githubSync.credentials')}</strong><p className="mt-1 text-muted-foreground">{credentials.error ? t('githubSync.statusUnknown') : credentials.isLoading ? t('githubSync.loading') : credentials.data?.some((item) => item.status === 'ACTIVE') ? t('githubSync.credentialConfigured') : t('githubSync.anonymousQuota')}</p><Button size="sm" variant="link" onClick={onSettings}>{t('githubSync.systemSettings')}</Button></div>
<div className="sync-rail p-3 text-sm"><strong>{t('githubSync.acquisitionMethod')}</strong><p className="mt-1 text-muted-foreground">{entries.error || configuration.error ? t('githubSync.statusUnknown') : entries.isLoading || configuration.isLoading ? t('githubSync.loading') : acquisitionReady ? t('githubSync.configured') : t('githubSync.noEnabledAcquisition')}</p><Button size="sm" variant="link" onClick={onCollection}>{t('githubSync.collectionConfig')}</Button></div>
<div className="sync-rail p-3 text-sm"><strong>{t('githubSync.capacityTitle')}</strong><p className="mt-1 text-muted-foreground">{policy.error ? t('githubSync.statusUnknown') : policy.isLoading ? t('githubSync.loading') : capacityReady ? t('githubSync.configured') : t('githubSync.unconfigured')}</p><Button data-analytics-id="github.settings.open" size="sm" variant="link" onClick={onSettings}>{t('githubSync.systemSettings')}</Button></div>
<div className="sync-rail p-3 text-sm"><strong>{t('githubSync.credentials')}</strong><p className="mt-1 text-muted-foreground">{credentials.error ? t('githubSync.statusUnknown') : credentials.isLoading ? t('githubSync.loading') : credentials.data?.some((item) => item.status === 'ACTIVE') ? t('githubSync.credentialConfigured') : t('githubSync.anonymousQuota')}</p><Button data-analytics-id="github.settings.open" size="sm" variant="link" onClick={onSettings}>{t('githubSync.systemSettings')}</Button></div>
<div className="sync-rail p-3 text-sm"><strong>{t('githubSync.acquisitionMethod')}</strong><p className="mt-1 text-muted-foreground">{entries.error || configuration.error ? t('githubSync.statusUnknown') : entries.isLoading || configuration.isLoading ? t('githubSync.loading') : acquisitionReady ? t('githubSync.configured') : t('githubSync.noEnabledAcquisition')}</p><Button data-analytics-id="github.collection.open" size="sm" variant="link" onClick={onCollection}>{t('githubSync.collectionConfig')}</Button></div>
</div>
</Card> : null}
<div className="grid gap-4 md:grid-cols-2 xl:grid-cols-5">
<Card className="sync-section p-4"><p className="text-xs text-muted-foreground">{t('githubSync.workerStatusTitle')}</p><p className="mt-2 text-lg font-semibold">{worker.error ? t('githubSync.statusUnknown') : worker.data ? worker.data.online ? t('githubSync.workerOnline') : t('githubSync.workerOffline') : '—'}</p><p className="mt-1 text-xs text-muted-foreground">{t('githubSync.workerLastSeen')}: {date(worker.data?.lastSeenAt)}</p></Card>
<Card className="sync-section p-4"><p className="text-xs text-muted-foreground">{t('githubSync.registeredRepositories')}</p><p className="mt-2 text-2xl font-semibold tabular-nums">{registered.data?.total ?? '—'}</p><p className="mt-1 text-xs text-muted-foreground">{t('githubSync.registeredRepositoriesHelp')}</p></Card>
<Card className="sync-section p-4"><p className="text-xs text-muted-foreground">{t('githubSync.pendingLeads')}</p><p className="mt-2 text-2xl font-semibold tabular-nums">{pending.data?.total ?? '—'}</p><p className="mt-1 text-xs text-muted-foreground">{t('githubSync.pendingLeadsHelp')}</p></Card>
<Card className="sync-section p-4"><p className="text-xs text-muted-foreground">{t('githubSync.platformUnresolved')}</p><p className="mt-2 text-2xl font-semibold tabular-nums">{policy.data?.platformUnresolvedCount ?? '—'}</p><Link to="/dashboard/reviews" search={{ type: 'sync' }} className="mt-2 inline-flex items-center gap-1 text-sm text-primary hover:underline">{t('githubSync.openReviewQueue')}<ArrowRight className="h-4 w-4" /></Link></Card>
<Card className="sync-section p-4"><p className="text-xs text-muted-foreground">{t('githubSync.platformUnresolved')}</p><p className="mt-2 text-2xl font-semibold tabular-nums">{policy.data?.platformUnresolvedCount ?? '—'}</p><Link data-analytics-id="review.queue.open" to="/dashboard/reviews" search={{ type: 'sync' }} className="mt-2 inline-flex items-center gap-1 text-sm text-primary hover:underline">{t('githubSync.openReviewQueue')}<ArrowRight className="h-4 w-4" /></Link></Card>
<Card className="sync-section p-4"><p className="text-xs text-muted-foreground">{t('githubSync.admissionState')}</p><p className="mt-2 text-lg font-semibold">{policy.error ? t('githubSync.statusUnknown') : policy.data ? !capacityReady ? t('githubSync.unconfigured') : policy.data.globalPaused ? t('githubSync.paused') : t('githubSync.active') : '—'}</p><p className="mt-1 text-xs text-muted-foreground">{t('githubSync.capacityHint')}</p></Card>
</div>
{issues.length ? <Card className="sync-section p-4"><h2 className="font-semibold">{t('githubSync.actionItems')}</h2><p role="alert" className="mt-2 text-sm text-destructive">{t('githubSync.someStatusUnavailable')}</p></Card> : null}
@ -64,11 +64,11 @@ export function GithubSyncOverview({ visible, onCollection, onSettings, onRuns,
{capacityPaused ? <Card className="sync-section p-4 text-sm">{t('githubSync.capacityPauseNotice')}</Card> : null}
{waits.length ? <Card className="sync-section p-4"><h2 className="font-semibold">{t('githubSync.currentWaits')}</h2><div className="mt-3 divide-y">{waits.map((wait, index) => <div key={`${wait.reason}:${index}`} className="py-2 text-sm"><p className="font-medium">{t(`deepDiscovery.reason.${wait.reason}`, { defaultValue: wait.reason ?? '—' })}</p><p className="text-muted-foreground">{t(`deepDiscovery.recovery.${wait.reason}`, { defaultValue: t('deepDiscovery.autoResume') })}{wait.retryAt ? ` · ${t('deepDiscovery.retryAt')}: ${date(wait.retryAt)}` : ''}</p></div>)}</div></Card> : !issues.length && !checking && workerCompatible && capacityReady && acquisitionReady && !manuallyPaused && !capacityPaused ? <Card className="sync-section p-4 text-sm">{t('githubSync.operatingNormally')}</Card> : null}
<Card className="sync-section overflow-hidden">
<div className="sync-section-header flex items-center justify-between gap-2"><h2 className="font-semibold">{t('githubSync.recentRuns')}</h2><Button size="sm" variant="ghost" onClick={onRuns}>{t('githubSync.viewAllRuns')}<ArrowRight className="h-4 w-4" /></Button></div>
<div className="sync-section-header flex items-center justify-between gap-2"><h2 className="font-semibold">{t('githubSync.recentRuns')}</h2><Button data-analytics-id="github.runs.open" size="sm" variant="ghost" onClick={onRuns}>{t('githubSync.viewAllRuns')}<ArrowRight className="h-4 w-4" /></Button></div>
{runs.isLoading ? <p className="p-4 text-sm text-muted-foreground">{t('githubSync.loading')}</p> : null}
{runs.error ? <p role="alert" className="p-4 text-sm text-destructive">{t('githubSync.loadFailed')}: {runs.error.message}</p> : null}
{!runs.isLoading && !runs.error && !runs.data?.items?.length ? <p className="p-4 text-sm text-muted-foreground">{t('githubSync.empty')}</p> : null}
{runs.data?.items?.map((run) => <div key={run.id} className="sync-ledger-row text-sm"><div className="min-w-0"><p className="font-medium">{githubSyncStatusLabel(t, run.kind)} · <span className="font-mono text-xs">{run.id?.slice(0, 8)}</span></p><p className="text-xs text-muted-foreground">{t('githubSync.createdAt')}: {date(run.createdAt)}</p></div><div className="flex items-center gap-2"><span className="sync-state" data-tone={run.status === 'FAILED' ? 'red' : run.status === 'ACQUISITION_COMPLETE' ? 'teal' : 'amber'}>{githubSyncStatusLabel(t, run.status)}</span>{run.id ? <Button size="sm" variant="outline" onClick={() => onRun(run.id!)}>{t('githubSync.viewRun')}</Button> : null}</div></div>)}
{runs.data?.items?.map((run) => <div key={run.id} className="sync-ledger-row text-sm"><div className="min-w-0"><p className="font-medium">{githubSyncStatusLabel(t, run.kind)} · <span className="font-mono text-xs">{run.id?.slice(0, 8)}</span></p><p className="text-xs text-muted-foreground">{t('githubSync.createdAt')}: {date(run.createdAt)}</p></div><div className="flex items-center gap-2"><span className="sync-state" data-tone={run.status === 'FAILED' ? 'red' : run.status === 'ACQUISITION_COMPLETE' ? 'teal' : 'amber'}>{githubSyncStatusLabel(t, run.status)}</span>{run.id ? <Button data-analytics-id="github.run.open" size="sm" variant="outline" onClick={() => onRun(run.id!)}>{t('githubSync.viewRun')}</Button> : null}</div></div>)}
</Card>
</div>
}

View file

@ -37,11 +37,11 @@ export function GithubSyncPlatformControl({ visible }: { visible: boolean }) {
{control.data.state === 'PAUSING' ? <p className="text-xs text-muted-foreground">{t('githubSync.pendingStops', { count: control.data.pendingStopCount ?? 0 })}{control.data.expiredUnconfirmedCount ? ` · ${t('githubSync.expiredStops', { count: control.data.expiredUnconfirmedCount })}` : ''}</p> : null}
<p className="text-xs text-muted-foreground">{t('githubSync.platformControlScope')}</p></> : null}
</div>
<Button size="sm" variant={paused ? 'outline' : 'default'} disabled={!control.data || update.isPending} onClick={() => setConfirm(true)}>{t(paused ? 'githubSync.resumePlatform' : 'githubSync.pausePlatform')}</Button>
<Button data-analytics-id={paused ? 'github.platform.resume.request' : 'github.platform.pause.request'} size="sm" variant={paused ? 'outline' : 'default'} disabled={!control.data || update.isPending} onClick={() => setConfirm(true)}>{t(paused ? 'githubSync.resumePlatform' : 'githubSync.pausePlatform')}</Button>
</Card>
<Dialog open={confirm} onOpenChange={setConfirm}>
<DialogContent className="github-sync-surface rounded-md"><DialogHeader><DialogTitle>{t(paused ? 'githubSync.resumePlatform' : 'githubSync.pausePlatform')}</DialogTitle><DialogDescription>{t(paused ? 'githubSync.resumePlatformHelp' : 'githubSync.pausePlatformHelp')}</DialogDescription></DialogHeader>
<DialogFooter><Button variant="outline" onClick={() => setConfirm(false)}>{t('githubSync.cancel')}</Button><Button disabled={update.isPending} onClick={() => void save()}>{t('githubSync.confirmControl')}</Button></DialogFooter>
<DialogContent closeAnalyticsId={paused ? 'github.platform.resume.cancel' : 'github.platform.pause.cancel'} className="github-sync-surface rounded-md"><DialogHeader><DialogTitle>{t(paused ? 'githubSync.resumePlatform' : 'githubSync.pausePlatform')}</DialogTitle><DialogDescription>{t(paused ? 'githubSync.resumePlatformHelp' : 'githubSync.pausePlatformHelp')}</DialogDescription></DialogHeader>
<DialogFooter><Button data-analytics-id={paused ? 'github.platform.resume.cancel' : 'github.platform.pause.cancel'} variant="outline" onClick={() => setConfirm(false)}>{t('githubSync.cancel')}</Button><Button data-analytics-id={paused ? 'github.platform.resume.confirm' : 'github.platform.pause.confirm'} disabled={update.isPending} onClick={() => void save()}>{t('githubSync.confirmControl')}</Button></DialogFooter>
</DialogContent>
</Dialog>
</>

View file

@ -21,9 +21,9 @@ const SOURCE_STATUSES = ['ACTIVE', 'PAUSED', 'UNREACHABLE'] as const
type Search = { repositoryId?: number; page?: number; q?: string; originType?: GithubSyncRepositoryQuery['originType']; state?: GithubSyncRepositoryQuery['state']; sourceStatus?: GithubSyncRepositoryQuery['sourceStatus']; asOf?: string; runId?: string }
type Change = (changes: Partial<Search>) => void
function SelectFilter({ label, value, options, onChange }: { label: string; value?: string; options: readonly string[]; onChange: (value?: string) => void }) {
function SelectFilter({ label, value, options, onChange, analyticsId }: { label: string; value?: string; options: readonly string[]; onChange: (value?: string) => void; analyticsId?: string }) {
const { t } = useTranslation()
return <label className="text-sm">{label}<select className="mt-1 block h-9 w-full rounded border bg-background px-2" value={value ?? ''} onChange={(event) => onChange(event.target.value || undefined)}>
return <label className="text-sm">{label}<select data-analytics-id={analyticsId} className="mt-1 block h-9 w-full rounded border bg-background px-2" value={value ?? ''} onChange={(event) => onChange(event.target.value || undefined)}>
<option value="">{t('githubSync.all')}</option>
{options.map((option) => <option value={option} key={option}>{t(`githubSync.repositoryFilter.${option}`, { defaultValue: option })}</option>)}
</select></label>
@ -51,13 +51,13 @@ export function RepositoryDetail({ repositoryId, visible, onClose, onRun }: { re
}
return <Dialog open onOpenChange={(open) => { if (!open && !navigatingAway.current) onClose() }}>
<DialogContent className="github-sync-surface !left-auto !right-0 !top-0 !h-dvh !max-h-dvh !grid-rows-[auto_minmax(0,1fr)] !gap-0 !overflow-hidden w-[min(100vw,40rem)] !translate-x-0 !translate-y-0 !rounded-none p-0">
<DialogContent closeAnalyticsId="github.repository.close" className="github-sync-surface !left-auto !right-0 !top-0 !h-dvh !max-h-dvh !grid-rows-[auto_minmax(0,1fr)] !gap-0 !overflow-hidden w-[min(100vw,40rem)] !translate-x-0 !translate-y-0 !rounded-none p-0">
<DialogHeader className="border-b px-5 py-4 text-left"><DialogTitle>{t('githubSync.repositoryDetail')}</DialogTitle><DialogDescription>{t('githubSync.repositoryDetailHelp')}</DialogDescription></DialogHeader>
<div className="min-h-0 space-y-5 overflow-y-auto overscroll-contain px-5 py-5">
{detail.isLoading ? <p className="text-sm text-muted-foreground">{t('githubSync.loading')}</p> : null}
{detail.error ? <p role="alert" className="text-sm text-destructive">{t('githubSync.loadFailed')}: {detail.error.message}</p> : null}
{repository ? <>
<div className="space-y-2"><a className="inline-flex max-w-full items-center gap-1 break-all text-lg font-semibold text-primary hover:underline" href={`https://github.com/${encodeURIComponent(repository.owner ?? '')}/${encodeURIComponent(repository.name ?? '')}`} target="_blank" rel="noopener noreferrer">{repository.owner}/{repository.name}<ExternalLink className="h-4 w-4 shrink-0" /></a>
<div className="space-y-2"><a data-analytics-id="github.repository.external" className="inline-flex max-w-full items-center gap-1 break-all text-lg font-semibold text-primary hover:underline" href={`https://github.com/${encodeURIComponent(repository.owner ?? '')}/${encodeURIComponent(repository.name ?? '')}`} target="_blank" rel="noopener noreferrer">{repository.owner}/{repository.name}<ExternalLink className="h-4 w-4 shrink-0" /></a>
<p className="text-sm">{t(`githubSync.repositoryState.${repository.state}`, { defaultValue: repository.state ?? '—' })}{repository.sourceStatus ? ` · ${t(`githubSync.sourceStatus.${repository.sourceStatus}`, { defaultValue: repository.sourceStatus })}` : ''}</p>
<p className="text-xs text-muted-foreground">{t('githubSync.firstSeen')}: {date(repository.firstSeenAt)} · ID {repository.repositoryId}</p>
</div>
@ -66,21 +66,21 @@ export function RepositoryDetail({ repositoryId, visible, onClose, onRun }: { re
<div><dt className="text-xs text-muted-foreground">{t('githubSync.nextCheck')}</dt><dd>{date(detail.data?.nextCheckAt)}</dd></div>
{detail.data?.lastErrorCode ? <div className="sm:col-span-2"><dt className="text-xs text-muted-foreground">{t('githubSync.failureReason')}</dt><dd>{t(`githubSync.codes.${detail.data.lastErrorCode}`, { defaultValue: detail.data.lastErrorCode })}</dd></div> : null}
</dl>
{detail.data?.latestRunId ? <Button size="sm" variant="outline" onClick={() => onRun(detail.data!.latestRunId!)}>{t('githubSync.viewRun')}</Button> : null}
{detail.data?.latestRunId ? <Button data-analytics-id="github.run.open" size="sm" variant="outline" onClick={() => onRun(detail.data!.latestRunId!)}>{t('githubSync.viewRun')}</Button> : null}
<section className="space-y-2 border-t pt-4"><h3 className="font-semibold">{t('githubSync.origins')}</h3>
{origins.isLoading ? <p className="text-sm text-muted-foreground">{t('githubSync.loading')}</p> : null}
{origins.error ? <p role="alert" className="text-sm text-destructive">{t('githubSync.loadFailed')}: {origins.error.message}</p> : null}
{origins.data?.items?.length ? <div className="divide-y rounded border text-sm">{origins.data.items.map((origin, index) => <div key={`${origin.originType}:${origin.originKey}:${index}`} className="space-y-1 p-3"><p className="font-medium">{t(`githubSync.repositoryFilter.${origin.originType}`, { defaultValue: origin.originType ?? '—' })}</p><p className="break-all text-muted-foreground">{origin.originKey}</p><p className="text-xs text-muted-foreground">{t('githubSync.firstSeen')}: {date(origin.firstSeenAt)}{origin.lastSeenAt ? ` · ${t('deepDiscovery.lastDiscovered')}: ${date(origin.lastSeenAt)}` : ''}</p></div>)}</div> : !origins.isLoading && !origins.error ? <p className="text-sm text-muted-foreground">{t('githubSync.empty')}</p> : null}
{originPages > 1 ? <Pagination page={originPage} totalPages={originPages} onPageChange={(next) => { setOriginAsOf(originAsOf ?? origins.data?.asOf); setOriginPage(next) }} /> : null}
{originPages > 1 ? <Pagination analyticsId="github.provenance.paginate" page={originPage} totalPages={originPages} onPageChange={(next) => { setOriginAsOf(originAsOf ?? origins.data?.asOf); setOriginPage(next) }} /> : null}
</section>
<section className="space-y-2 border-t pt-4"><h3 className="font-semibold">{t('deepDiscovery.pathResults')} {paths.data ? `(${paths.data.total ?? 0})` : ''}</h3>
{paths.isLoading ? <p className="text-sm text-muted-foreground">{t('githubSync.loading')}</p> : null}
{paths.error ? <p role="alert" className="text-sm text-destructive">{t('githubSync.loadFailed')}: {paths.error.message}</p> : null}
{paths.data?.items?.length ? <div className="divide-y rounded border text-sm">{paths.data.items.map((path, index) => <div key={`${path.skillPath}:${index}`} className="space-y-1 p-3"><p className="break-all font-medium">{path.skillPath}</p><p className="text-xs text-muted-foreground">{t(`deepDiscovery.pathOutcome.${path.outcome}`, { defaultValue: path.outcome ?? '—' })}{path.reasonCode ? ` · ${t(`githubSync.codes.${path.reasonCode}`, { defaultValue: path.reasonCode })}` : ''}</p>{path.reviewId ? <Link to="/dashboard/reviews/$id" params={{ id: String(path.reviewId) }} onClickCapture={markNavigation} className="text-xs text-primary hover:underline">{t('deepDiscovery.viewReview')}</Link> : null}</div>)}</div> : !paths.isLoading && !paths.error ? <p className="text-sm text-muted-foreground">{t('deepDiscovery.noPaths')}</p> : null}
{pathPages > 1 ? <Pagination page={pathPage} totalPages={pathPages} onPageChange={(next) => { setPathAsOf(pathAsOf ?? paths.data?.asOf); setPathPage(next) }} /> : null}
{paths.data?.items?.length ? <div className="divide-y rounded border text-sm">{paths.data.items.map((path, index) => <div key={`${path.skillPath}:${index}`} className="space-y-1 p-3"><p className="break-all font-medium">{path.skillPath}</p><p className="text-xs text-muted-foreground">{t(`deepDiscovery.pathOutcome.${path.outcome}`, { defaultValue: path.outcome ?? '—' })}{path.reasonCode ? ` · ${t(`githubSync.codes.${path.reasonCode}`, { defaultValue: path.reasonCode })}` : ''}</p>{path.reviewId ? <Link data-analytics-id="review.detail.open" to="/dashboard/reviews/$id" params={{ id: String(path.reviewId) }} onClickCapture={markNavigation} className="text-xs text-primary hover:underline">{t('deepDiscovery.viewReview')}</Link> : null}</div>)}</div> : !paths.isLoading && !paths.error ? <p className="text-sm text-muted-foreground">{t('deepDiscovery.noPaths')}</p> : null}
{pathPages > 1 ? <Pagination analyticsId="github.path.paginate" page={pathPage} totalPages={pathPages} onPageChange={(next) => { setPathAsOf(pathAsOf ?? paths.data?.asOf); setPathPage(next) }} /> : null}
</section>
{repository.sourceId ? <section className="border-t pt-4"><Button size="sm" variant="outline" aria-expanded={sourceActions} onClick={() => setSourceActions(!sourceActions)}>{t('githubSync.sourceActions')}</Button>{sourceActions && visible ? <div className="mt-4"><GithubSyncSourceDetail sourceId={repository.sourceId} status={repository.sourceStatus ?? undefined} visible={visible} /></div> : null}</section> : null}
<Link to="/dashboard/reviews" search={{ type: 'sync' }} onClickCapture={markNavigation} className="inline-block border-t pt-4 text-sm text-primary hover:underline">{t('githubSync.openReviewQueue')}</Link>
{repository.sourceId ? <section className="border-t pt-4"><Button data-analytics-id="github.source.actions" size="sm" variant="outline" aria-expanded={sourceActions} onClick={() => setSourceActions(!sourceActions)}>{t('githubSync.sourceActions')}</Button>{sourceActions && visible ? <div className="mt-4"><GithubSyncSourceDetail sourceId={repository.sourceId} status={repository.sourceStatus ?? undefined} visible={visible} /></div> : null}</section> : null}
<Link data-analytics-id="review.queue.open" to="/dashboard/reviews" search={{ type: 'sync' }} onClickCapture={markNavigation} className="inline-block border-t pt-4 text-sm text-primary hover:underline">{t('githubSync.openReviewQueue')}</Link>
</> : null}
</div>
</DialogContent>
@ -114,14 +114,14 @@ export function GithubSyncRepositories({ visible, search, onChange }: { visible:
return <div className="space-y-4">
<div><h2 className="text-lg font-semibold">{t('githubSync.repositoriesTab')}</h2><p className="text-sm text-muted-foreground">{t('githubSync.repositoriesHelp')}</p></div>
<form onSubmit={submit} className="grid gap-3 rounded border p-3 sm:grid-cols-2 xl:grid-cols-[minmax(180px,1fr)_repeat(3,minmax(145px,180px))_auto]">
<form data-analytics-id="github.repository.search" onSubmit={submit} className="grid gap-3 rounded border p-3 sm:grid-cols-2 xl:grid-cols-[minmax(180px,1fr)_repeat(3,minmax(145px,180px))_auto]">
<label className="text-sm">{t('githubSync.searchRepository')}<Input className="mt-1" value={input} onChange={(event) => setInput(event.target.value)} maxLength={120} placeholder="owner/repository" /></label>
<SelectFilter label={t('githubSync.discoveryMethod')} value={search.originType} options={ORIGIN_TYPES} onChange={(originType) => changeFilter({ originType: originType as GithubSyncRepositoryQuery['originType'] })} />
<SelectFilter label={t('githubSync.repositoryStateLabel')} value={search.state} options={STATES} onChange={(state) => changeFilter({ state: state as GithubSyncRepositoryQuery['state'] })} />
<SelectFilter label={t('githubSync.sourceState')} value={search.sourceStatus} options={SOURCE_STATUSES} onChange={(sourceStatus) => changeFilter({ sourceStatus: sourceStatus as GithubSyncRepositoryQuery['sourceStatus'] })} />
<SelectFilter analyticsId="github.repository.origin.filter" label={t('githubSync.discoveryMethod')} value={search.originType} options={ORIGIN_TYPES} onChange={(originType) => changeFilter({ originType: originType as GithubSyncRepositoryQuery['originType'] })} />
<SelectFilter analyticsId="github.repository.state.filter" label={t('githubSync.repositoryStateLabel')} value={search.state} options={STATES} onChange={(state) => changeFilter({ state: state as GithubSyncRepositoryQuery['state'] })} />
<SelectFilter analyticsId="github.repository.source.status.filter" label={t('githubSync.sourceState')} value={search.sourceStatus} options={SOURCE_STATUSES} onChange={(sourceStatus) => changeFilter({ sourceStatus: sourceStatus as GithubSyncRepositoryQuery['sourceStatus'] })} />
<Button type="submit" size="sm" className="self-end">{t('githubSync.search')}</Button>
</form>
{newResults ? <div role="status" className="flex items-center justify-between rounded border border-primary/30 bg-primary/5 p-3 text-sm"><span>{t('githubSync.newRepositoryResults')}</span><Button size="sm" variant="outline" onClick={refresh}><RefreshCw className="h-4 w-4" />{t('githubSync.refreshResults')}</Button></div> : null}
{newResults ? <div role="status" className="flex items-center justify-between rounded border border-primary/30 bg-primary/5 p-3 text-sm"><span>{t('githubSync.newRepositoryResults')}</span><Button data-analytics-id="github.repository.refresh" size="sm" variant="outline" onClick={refresh}><RefreshCw className="h-4 w-4" />{t('githubSync.refreshResults')}</Button></div> : null}
<Card className="sync-section overflow-x-auto">
{repositories.isLoading ? <p className="p-5 text-sm text-muted-foreground">{t('githubSync.loading')}</p> : null}
{repositories.error ? <p role="alert" className="p-5 text-sm text-destructive">{t('githubSync.loadFailed')}: {repositories.error.message}</p> : null}
@ -131,10 +131,10 @@ export function GithubSyncRepositories({ visible, search, onChange }: { visible:
<TableCell className="min-w-36"><div className="flex flex-wrap gap-1">{item.originTypes?.map((type) => <span className="rounded border px-2 py-0.5 text-xs" key={type}>{t(`githubSync.repositoryFilter.${type}`, { defaultValue: type })}</span>)}</div></TableCell>
<TableCell><span className="sync-state" data-tone={item.state === 'REGISTERED' ? 'blue' : item.state === 'VALIDATION_FAILED' || item.state === 'UNREACHABLE' ? 'red' : 'amber'}>{t(`githubSync.repositoryState.${item.state}`, { defaultValue: item.state ?? '—' })}</span>{item.sourceStatus ? <span className="mt-1 block text-xs text-muted-foreground">{t(`githubSync.sourceStatus.${item.sourceStatus}`, { defaultValue: item.sourceStatus })}</span> : null}</TableCell>
<TableCell>{formatLocalDateTime(item.firstSeenAt, i18n.language)}</TableCell>
<TableCell><Button size="sm" variant="outline" onClick={() => onChange({ repositoryId: item.repositoryId })}>{t('githubSync.details')}</Button></TableCell>
<TableCell><Button data-analytics-id="github.repository.open" size="sm" variant="outline" onClick={() => onChange({ repositoryId: item.repositoryId })}>{t('githubSync.details')}</Button></TableCell>
</TableRow>)}</TableBody></Table> : null}
</Card>
{repositories.data && pages > 1 ? <Pagination page={search.page ?? 0} totalPages={pages} onPageChange={(page) => onChange({ page, asOf: search.asOf ?? repositories.data?.asOf })} /> : null}
{repositories.data && pages > 1 ? <Pagination analyticsId="github.repository.paginate" page={search.page ?? 0} totalPages={pages} onPageChange={(page) => onChange({ page, asOf: search.asOf ?? repositories.data?.asOf })} /> : null}
{search.repositoryId ? <RepositoryDetail key={search.repositoryId} repositoryId={search.repositoryId} visible={visible} onClose={() => onChange({ repositoryId: undefined })} onRun={(runId) => onChange({ runId, repositoryId: undefined })} /> : null}
</div>
}

View file

@ -22,7 +22,7 @@ export function GithubSyncRunDetail({ runId, onBack, visible = true }: { runId:
return <div className="space-y-5 animate-fade-up">
<div className="sync-hero space-y-3">
<Button size="sm" variant="ghost" className="sync-action -ml-2" onClick={onBack}><ArrowLeft className="mr-2 h-4 w-4" />{t('githubSync.runDetail.back')}</Button>
<Button data-analytics-id="github.runs.open" size="sm" variant="ghost" className="sync-action -ml-2" onClick={onBack}><ArrowLeft className="mr-2 h-4 w-4" />{t('githubSync.runDetail.back')}</Button>
<h1 className="text-2xl font-semibold tracking-tight">{t('githubSync.runDetail.title')}</h1>
<p className="break-all font-mono text-xs" style={{ color: 'var(--sync-subtle)' }}>{runId}</p>
</div>
@ -65,7 +65,7 @@ export function GithubSyncRunDetail({ runId, onBack, visible = true }: { runId:
</TableRow>)}</TableBody>
</Table></div> : null}
</Card>
{paths.data && (paths.data.total ?? 0) > PAGE_SIZE ? <Pagination page={pathPage} totalPages={Math.ceil((paths.data.total ?? 0) / PAGE_SIZE)} onPageChange={setPathPage} /> : null}
{paths.data && (paths.data.total ?? 0) > PAGE_SIZE ? <Pagination analyticsId="github.path.paginate" page={pathPage} totalPages={Math.ceil((paths.data.total ?? 0) / PAGE_SIZE)} onPageChange={setPathPage} /> : null}
<Card className="sync-section overflow-hidden">
<div className="sync-section-header"><h2 className="font-semibold">{t('githubSync.runDetail.tasks')}</h2><p className="mt-1 text-sm" style={{ color: 'var(--sync-subtle)' }}>{t('githubSync.runDetail.taskCount')}: {run.data.taskCount}</p></div>
{tasks.isLoading ? <p className="p-5 text-sm text-muted-foreground">{t('githubSync.runDetail.loading')}</p> : null}
@ -81,7 +81,7 @@ export function GithubSyncRunDetail({ runId, onBack, visible = true }: { runId:
</TableRow>)}</TableBody>
</Table></div> : null}
</Card>
{tasks.data && (tasks.data.total ?? 0) > PAGE_SIZE ? <Pagination page={taskPage} totalPages={Math.ceil((tasks.data.total ?? 0) / PAGE_SIZE)} onPageChange={setTaskPage} /> : null}
{tasks.data && (tasks.data.total ?? 0) > PAGE_SIZE ? <Pagination analyticsId="github.task.paginate" page={taskPage} totalPages={Math.ceil((tasks.data.total ?? 0) / PAGE_SIZE)} onPageChange={setTaskPage} /> : null}
</div>
</> : null}
</div>

View file

@ -57,12 +57,12 @@ export function GithubSyncRunList({ data, loading, error, page, onPageChange, on
</div></TableCell>
<TableCell>{formatLocalDateTime(run.nextRetryAt, i18n.language)}</TableCell>
<TableCell>{formatLocalDateTime(run.createdAt, i18n.language)}</TableCell>
{onSelectRun ? <TableCell>{run.id ? <Button size="sm" className="sync-action" variant="outline" onClick={() => onSelectRun(run.id!)}>{t('githubSync.viewRun')}</Button> : null}</TableCell> : null}
{onSelectRun ? <TableCell>{run.id ? <Button data-analytics-id="github.run.open" size="sm" className="sync-action" variant="outline" onClick={() => onSelectRun(run.id!)}>{t('githubSync.viewRun')}</Button> : null}</TableCell> : null}
</TableRow>
))}</TableBody>
</Table>
) : null}
</Card>
{data && totalPages > 1 ? <Pagination page={page} totalPages={totalPages} onPageChange={onPageChange} /> : null}
{data && totalPages > 1 ? <Pagination analyticsId="github.run.paginate" page={page} totalPages={totalPages} onPageChange={onPageChange} /> : null}
</>
}

View file

@ -13,10 +13,10 @@ export function GithubSyncRunsSection({ visible, search, onChange }: {
const runs = useGithubSyncRuns(page, 20, visible, search.runKind, search.runStatus)
return <div className="space-y-4">
<div className="flex flex-wrap gap-3 rounded border p-3">
<label className="text-sm">{t('githubSync.runKind')}<select className="mt-1 block h-9 min-w-40 rounded border bg-background px-2" value={search.runKind ?? ''} onChange={(event) => onChange({ runKind: event.target.value as GithubSyncRunQuery['kind'] || undefined, runPage: 0 })}>
<label className="text-sm">{t('githubSync.runKind')}<select data-analytics-id="github.run.kind" className="mt-1 block h-9 min-w-40 rounded border bg-background px-2" value={search.runKind ?? ''} onChange={(event) => onChange({ runKind: event.target.value as GithubSyncRunQuery['kind'] || undefined, runPage: 0 })}>
<option value="">{t('githubSync.all')}</option><option value="DISCOVERY">{t('githubSync.codes.DISCOVERY')}</option><option value="REPOSITORY_SYNC">{t('githubSync.codes.REPOSITORY_SYNC')}</option>
</select></label>
<label className="text-sm">{t('githubSync.sourceState')}<select className="mt-1 block h-9 min-w-40 rounded border bg-background px-2" value={search.runStatus ?? ''} onChange={(event) => onChange({ runStatus: event.target.value as GithubSyncRunQuery['status'] || undefined, runPage: 0 })}>
<label className="text-sm">{t('githubSync.sourceState')}<select data-analytics-id="github.run.status" className="mt-1 block h-9 min-w-40 rounded border bg-background px-2" value={search.runStatus ?? ''} onChange={(event) => onChange({ runStatus: event.target.value as GithubSyncRunQuery['status'] || undefined, runPage: 0 })}>
<option value="">{t('githubSync.all')}</option>{['QUEUED', 'LEASED', 'RETRY_WAIT', 'PARTIAL', 'ACQUISITION_COMPLETE', 'FAILED'].map((status) => <option value={status} key={status}>{t(`githubSync.codes.${status}`)}</option>)}
</select></label>
</div>

View file

@ -11,7 +11,7 @@ export function GithubSyncSettingsDrawer({ onClose, visible }: { onClose: () =>
const schedule = useGithubSyncSchedulePolicy(visible)
return <Dialog open onOpenChange={(open) => { if (!open) onClose() }}>
<DialogContent className="github-sync-surface !left-auto !right-0 !top-0 !h-dvh !max-h-dvh !grid-rows-[auto_minmax(0,1fr)] !gap-0 !overflow-hidden w-[min(100vw,44rem)] !translate-x-0 !translate-y-0 !rounded-none p-0">
<DialogContent closeAnalyticsId="github.settings.close" className="github-sync-surface !left-auto !right-0 !top-0 !h-dvh !max-h-dvh !grid-rows-[auto_minmax(0,1fr)] !gap-0 !overflow-hidden w-[min(100vw,44rem)] !translate-x-0 !translate-y-0 !rounded-none p-0">
<DialogHeader className="border-b px-5 py-4 text-left">
<DialogTitle>{t('githubSync.systemSettings')}</DialogTitle>
<DialogDescription>{t('githubSync.settingsHelp')}</DialogDescription>

View file

@ -39,6 +39,6 @@ export function GithubSyncSourceDetail({ sourceId, status, visible }: { sourceId
<TableCell>{formatLocalDateTime(skill.acquisitionRetryAt, i18n.language)}</TableCell>
</TableRow>)}</TableBody>
</Table></div> : null}
{skills.data && totalPages > 1 ? <Pagination page={page} totalPages={totalPages} onPageChange={setPage} /> : null}
{skills.data && totalPages > 1 ? <Pagination analyticsId="github.source.paginate" page={page} totalPages={totalPages} onPageChange={setPage} /> : null}
</section>
}

View file

@ -67,7 +67,7 @@ export function GovernanceInbox({ items, isLoading }: GovernanceInboxProps) {
</div>
</div>
<div className="flex justify-end">
<Button variant="outline" size="sm" onClick={() => openItem(item)}>
<Button data-analytics-id={item.type === 'REVIEW' ? 'governance.review.open' : item.type === 'PROMOTION' ? 'governance.promotion.open' : item.type === 'REPORT' ? 'governance.report.open' : item.namespace && item.skillSlug ? 'governance.skill.open' : undefined} variant="outline" size="sm" onClick={() => openItem(item)}>
{t('governance.openItem')}
</Button>
</div>

View file

@ -45,7 +45,7 @@ export function GovernanceNotifications({ items, isLoading, onMarkRead, isMarkin
{item.bodyJson ? <div className="text-sm text-muted-foreground break-all">{item.bodyJson}</div> : null}
{item.status === 'UNREAD' && item.id ? (
<div className="flex justify-end">
<Button size="sm" variant="outline" disabled={isMarkingRead} onClick={() => onMarkRead(item.id as number)}>
<Button data-analytics-id="notification.read.request" size="sm" variant="outline" disabled={isMarkingRead} onClick={() => onMarkRead(item.id as number)}>
{t('governance.markRead')}
</Button>
</div>

View file

@ -107,7 +107,7 @@ export function AddNamespaceMemberDialog({ slug, children }: AddNamespaceMemberD
return (
<Dialog open={open} onOpenChange={handleOpenChange}>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent>
<DialogContent closeAnalyticsId="namespace.member.cancel">
<DialogHeader className="text-center sm:text-center">
<DialogTitle className="text-center">{t('members.addDialogTitle')}</DialogTitle>
<DialogDescription className="text-center">
@ -119,7 +119,7 @@ export function AddNamespaceMemberDialog({ slug, children }: AddNamespaceMemberD
<div className="space-y-2">
<Label htmlFor="member-search">{t('members.searchLabel')}</Label>
<div className="flex gap-2">
<Input
<Input data-analytics-id="namespace.member.search"
id="member-search"
value={searchInput}
placeholder={t('members.searchPlaceholder')}
@ -136,7 +136,7 @@ export function AddNamespaceMemberDialog({ slug, children }: AddNamespaceMemberD
}
}}
/>
<Button type="button" variant="outline" onClick={handleSearch}>
<Button data-analytics-id="namespace.member.search" type="button" variant="outline" onClick={handleSearch}>
{t('members.searchAction')}
</Button>
</div>
@ -168,7 +168,7 @@ export function AddNamespaceMemberDialog({ slug, children }: AddNamespaceMemberD
<div className="text-sm text-muted-foreground">{candidate.email || candidate.userId}</div>
<div className="font-mono text-xs text-muted-foreground">{candidate.userId}</div>
</div>
<Button
<Button data-analytics-id="namespace.member.select"
type="button"
variant="outline"
size="sm"
@ -193,7 +193,7 @@ export function AddNamespaceMemberDialog({ slug, children }: AddNamespaceMemberD
<div className="space-y-2">
<Label htmlFor="member-user-id">{t('members.manualUserIdLabel')}</Label>
<Input
<Input data-analytics-id="namespace.member.add"
id="member-user-id"
value={userId}
placeholder={t('members.manualUserIdPlaceholder')}
@ -222,12 +222,12 @@ export function AddNamespaceMemberDialog({ slug, children }: AddNamespaceMemberD
<div className="space-y-2">
<Label htmlFor="member-role">{t('members.roleLabel')}</Label>
<Select value={role} onValueChange={(value) => setRole(value as NamespaceRole)}>
<SelectTrigger id="member-role">
<SelectTrigger data-analytics-id="namespace.member.role.interact" id="member-role">
<SelectValue />
</SelectTrigger>
<SelectContent>
{ROLE_OPTIONS.map((option) => (
<SelectItem key={option} value={option}>
<SelectItem data-analytics-id={option === 'ADMIN' ? 'namespace.member.role.admin' : 'namespace.member.role.member'} key={option} value={option}>
{t(option === 'ADMIN' ? 'members.roleAdmin' : 'members.roleMember')}
</SelectItem>
))}
@ -241,10 +241,10 @@ export function AddNamespaceMemberDialog({ slug, children }: AddNamespaceMemberD
) : null}
<DialogFooter className="sm:justify-center sm:space-x-3">
<Button type="button" variant="outline" onClick={() => handleOpenChange(false)}>
<Button data-analytics-id="namespace.member.cancel" type="button" variant="outline" onClick={() => handleOpenChange(false)}>
{t('dialog.cancel')}
</Button>
<Button type="button" onClick={handleAddMember} disabled={addMemberMutation.isPending}>
<Button data-analytics-id="namespace.member.add" type="button" onClick={handleAddMember} disabled={addMemberMutation.isPending}>
{addMemberMutation.isPending ? t('members.addingMember') : t('members.addMember')}
</Button>
</DialogFooter>

View file

@ -165,7 +165,7 @@ export function BatchImportMembersDialog({ slug, children }: BatchImportMembersD
return (
<Dialog open={open} onOpenChange={handleOpenChange}>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent className="max-w-2xl">
<DialogContent closeAnalyticsId={step === 'results' ? 'namespace.import.close' : 'namespace.import.cancel'} className="max-w-2xl">
<DialogHeader className="text-center sm:text-center">
<DialogTitle className="text-center">{t('members.batchDialogTitle')}</DialogTitle>
<DialogDescription className="text-center">
@ -175,10 +175,10 @@ export function BatchImportMembersDialog({ slug, children }: BatchImportMembersD
{step === 'upload' && (
<div className="space-y-4 py-2">
<Button type="button" variant="outline" size="sm" onClick={downloadCsvTemplate}>
<Button data-analytics-id="namespace.template.download" type="button" variant="outline" size="sm" onClick={downloadCsvTemplate}>
{t('members.batchDownloadTemplate')}
</Button>
<div
<div data-analytics-id="namespace.import.choose"
role="button"
tabIndex={0}
aria-label={t('members.batchDropHint')}
@ -194,7 +194,7 @@ export function BatchImportMembersDialog({ slug, children }: BatchImportMembersD
<p className="text-sm text-muted-foreground">{t('members.batchDropHint')}</p>
<p className="text-xs text-muted-foreground mt-1">{t('members.batchFormatHint')}</p>
</div>
<input
<input data-analytics-id="namespace.import.select"
ref={fileInputRef}
type="file"
accept=".csv"
@ -277,16 +277,16 @@ export function BatchImportMembersDialog({ slug, children }: BatchImportMembersD
<DialogFooter className="sm:justify-center sm:space-x-3">
{step === 'upload' && (
<Button type="button" variant="outline" onClick={() => handleOpenChange(false)}>
<Button data-analytics-id="namespace.import.cancel" type="button" variant="outline" onClick={() => handleOpenChange(false)}>
{t('dialog.cancel')}
</Button>
)}
{step === 'preview' && (
<>
<Button type="button" variant="outline" onClick={() => { setParsedRows([]); setStep('upload') }}>
<Button data-analytics-id="namespace.import.reset" type="button" variant="outline" onClick={() => { setParsedRows([]); setStep('upload') }}>
{t('members.batchBack')}
</Button>
<Button
<Button data-analytics-id="namespace.import.confirm"
type="button"
onClick={handleSubmit}
disabled={validRows.length === 0 || batchMutation.isPending}
@ -298,7 +298,7 @@ export function BatchImportMembersDialog({ slug, children }: BatchImportMembersD
</>
)}
{step === 'results' && (
<Button type="button" onClick={() => handleOpenChange(false)}>
<Button data-analytics-id="namespace.import.close" type="button" onClick={() => handleOpenChange(false)}>
{t('members.batchDone')}
</Button>
)}

View file

@ -142,7 +142,7 @@ export function CreateNamespaceDialog({ children }: CreateNamespaceDialogProps)
return (
<Dialog open={open} onOpenChange={handleOpenChange}>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent>
<DialogContent closeAnalyticsId="namespace.create.cancel">
<DialogHeader className="text-center sm:text-center">
<DialogTitle className="text-center">{t('myNamespaces.createDialogTitle')}</DialogTitle>
<DialogDescription className="text-center">
@ -153,7 +153,7 @@ export function CreateNamespaceDialog({ children }: CreateNamespaceDialogProps)
<div className="space-y-4 py-4">
<div className="space-y-2">
<Label htmlFor="namespace-slug">{t('myNamespaces.createSlugLabel')}</Label>
<Input
<Input data-analytics-id="namespace.create.request"
id="namespace-slug"
placeholder={t('myNamespaces.createSlugPlaceholder')}
value={slug}
@ -183,7 +183,7 @@ export function CreateNamespaceDialog({ children }: CreateNamespaceDialogProps)
<div className="space-y-2">
<Label htmlFor="namespace-display-name">{t('myNamespaces.createDisplayNameLabel')}</Label>
<Input
<Input data-analytics-id="namespace.create.request"
id="namespace-display-name"
placeholder={t('myNamespaces.createDisplayNamePlaceholder')}
value={displayName}
@ -235,10 +235,10 @@ export function CreateNamespaceDialog({ children }: CreateNamespaceDialogProps)
) : null}
<DialogFooter className="sm:justify-center sm:space-x-3">
<Button variant="outline" onClick={() => handleOpenChange(false)}>
<Button data-analytics-id="namespace.create.cancel" variant="outline" onClick={() => handleOpenChange(false)}>
{t('dialog.cancel')}
</Button>
<Button onClick={handleSubmit} disabled={createMutation.isPending}>
<Button data-analytics-id="namespace.create.request" onClick={handleSubmit} disabled={createMutation.isPending}>
{createMutation.isPending ? t('myNamespaces.creating') : t('myNamespaces.createSubmit')}
</Button>
</DialogFooter>

View file

@ -67,7 +67,7 @@ export function EditNamespaceDialog({ namespace, children }: EditNamespaceDialog
return (
<Dialog open={open} onOpenChange={handleOpenChange}>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent>
<DialogContent closeAnalyticsId="namespace.settings.cancel">
<DialogHeader className="text-center sm:text-center">
<DialogTitle className="text-center">{t('namespaceEdit.dialogTitle')}</DialogTitle>
<DialogDescription className="text-center">@{namespace.slug}</DialogDescription>
@ -104,10 +104,10 @@ export function EditNamespaceDialog({ namespace, children }: EditNamespaceDialog
) : null}
<DialogFooter className="sm:justify-center sm:space-x-3">
<Button type="button" variant="outline" onClick={() => handleOpenChange(false)}>
<Button data-analytics-id="namespace.settings.cancel" type="button" variant="outline" onClick={() => handleOpenChange(false)}>
{t('dialog.cancel')}
</Button>
<Button type="button" onClick={handleSave} disabled={updateMutation.isPending}>
<Button data-analytics-id="namespace.settings.save" type="button" onClick={handleSave} disabled={updateMutation.isPending}>
{updateMutation.isPending ? t('namespaceEdit.saving') : t('namespaceEdit.saveAction')}
</Button>
</DialogFooter>

View file

@ -115,7 +115,7 @@ export function InvitationControls({ slug, compact = false }: { slug: string; co
<label className="sr-only" htmlFor={linkId}>{t('invitation.link')}</label>
<div className="flex flex-col gap-2 sm:flex-row">
<Input id={linkId} className="h-8 min-w-0 flex-1 bg-background font-mono text-xs" readOnly value={link} onFocus={(event) => event.currentTarget.select()} />
<Button size="sm" className="shrink-0 gap-1.5 px-2.5" onClick={() => void copyLink(link)}><Copy className="h-3.5 w-3.5" aria-hidden="true" />{t('invitation.copy')}</Button>
<Button data-analytics-id="namespace.invitation.copy" size="sm" className="shrink-0 gap-1.5 px-2.5" onClick={() => void copyLink(link)}><Copy className="h-3.5 w-3.5" aria-hidden="true" />{t('invitation.copy')}</Button>
</div>
{expiresAt ? <p className="text-xs text-muted-foreground">{t('invitation.expiresAtLabel')}: {expiresAt}</p> : null}
<p className="text-xs leading-relaxed text-muted-foreground">{t(storageUnavailable ? 'invitation.storageUnavailable' : 'invitation.localLinkHint')}</p>
@ -123,10 +123,10 @@ export function InvitationControls({ slug, compact = false }: { slug: string; co
) : null}
{!link && !status.isFetching && !status.isError && status.data?.active ? <p className="mt-3 text-sm leading-relaxed text-muted-foreground">{t('invitation.activeUnavailable')}</p> : null}
{!status.isError && !status.data?.active ? (
<div className="mt-4"><Button size="sm" className="gap-1.5 px-2.5" disabled={!user || status.isPending || status.isFetching || create.isPending} onClick={handleCreate}><Link2 className="h-3.5 w-3.5" aria-hidden="true" />{t('invitation.create')}</Button></div>
<div className="mt-4"><Button data-analytics-id="namespace.invitation.create" size="sm" className="gap-1.5 px-2.5" disabled={!user || status.isPending || status.isFetching || create.isPending} onClick={handleCreate}><Link2 className="h-3.5 w-3.5" aria-hidden="true" />{t('invitation.create')}</Button></div>
) : null}
</div>
) : <Button variant="outline" size="sm" className="gap-1.5 px-2.5" disabled={!user || status.isFetching || create.isPending} onClick={handleCreate}>{t('invitation.create')}</Button>}
) : <Button data-analytics-id="namespace.invitation.create" variant="outline" size="sm" className="gap-1.5 px-2.5" disabled={!user || status.isFetching || create.isPending} onClick={handleCreate}>{t('invitation.create')}</Button>}
{!compact ? (
<div className="space-y-3 text-sm">
<p className="font-medium">{t('invitation.detailsTitle')}</p>
@ -137,20 +137,20 @@ export function InvitationControls({ slug, compact = false }: { slug: string; co
{(create.error || revoke.error || status.error) ? (
<div className="flex flex-wrap items-center justify-between gap-2 rounded-lg border border-destructive/20 bg-destructive/5 p-3">
<p role="alert" className="text-sm text-destructive">{t('invitation.error')}</p>
{status.error ? <Button variant="outline" size="sm" className="gap-1.5 px-2.5" disabled={status.isFetching} onClick={() => void status.refetch()}><RefreshCw className="h-3.5 w-3.5" aria-hidden="true" />{t('invitation.retry')}</Button> : null}
{status.error ? <Button data-analytics-id="namespace.invitation.retry" variant="outline" size="sm" className="gap-1.5 px-2.5" disabled={status.isFetching} onClick={() => void status.refetch()}><RefreshCw className="h-3.5 w-3.5" aria-hidden="true" />{t('invitation.retry')}</Button> : null}
</div>
) : null}
{!compact && !status.isError && status.data?.active ? (
<div className="flex flex-wrap items-center justify-between gap-3 border-t pt-4">
<span className="text-xs text-muted-foreground">{t('invitation.managementTitle')}</span>
<div className="flex flex-wrap gap-2">
<Button variant="outline" size="sm" className="gap-1.5 px-2.5" disabled={!user || status.isFetching || create.isPending || revoke.isPending} onClick={handleCreate}><RefreshCw className="h-3.5 w-3.5" aria-hidden="true" />{t('invitation.replaceAction')}</Button>
<Button variant="ghost" size="sm" className="gap-1.5 px-2.5 text-destructive hover:bg-destructive/10 hover:text-destructive" disabled={status.isFetching || revoke.isPending || create.isPending} onClick={() => setConfirm('revoke')}><Trash2 className="h-3.5 w-3.5" aria-hidden="true" />{t('invitation.revoke')}</Button>
<Button data-analytics-id="namespace.invitation.replace" variant="outline" size="sm" className="gap-1.5 px-2.5" disabled={!user || status.isFetching || create.isPending || revoke.isPending} onClick={handleCreate}><RefreshCw className="h-3.5 w-3.5" aria-hidden="true" />{t('invitation.replaceAction')}</Button>
<Button data-analytics-id="namespace.invitation.revoke" variant="ghost" size="sm" className="gap-1.5 px-2.5 text-destructive hover:bg-destructive/10 hover:text-destructive" disabled={status.isFetching || revoke.isPending || create.isPending} onClick={() => setConfirm('revoke')}><Trash2 className="h-3.5 w-3.5" aria-hidden="true" />{t('invitation.revoke')}</Button>
</div>
</div>
) : null}
{!compact && user ? <InvitationHistory key={`${slug}:${user.userId}`} slug={slug} /> : null}
<ConfirmDialog open={confirm !== null} onOpenChange={(open) => { if (!open) setConfirm(null) }}
<ConfirmDialog confirmAnalyticsId={confirm === 'revoke' ? 'namespace.invitation.revoke.confirm' : confirm === 'replace' ? 'namespace.invitation.replace.confirm' : undefined} cancelAnalyticsId={confirm === 'revoke' ? 'namespace.invitation.revoke.cancel' : confirm === 'replace' ? 'namespace.invitation.replace.cancel' : undefined} open={confirm !== null} onOpenChange={(open) => { if (!open) setConfirm(null) }}
title={t(confirm === 'revoke' ? 'invitation.revokeTitle' : 'invitation.replaceTitle')}
description={t(confirm === 'revoke' ? 'invitation.revokeDescription' : 'invitation.replaceDescription')}
confirmText={t('dialog.confirm')}

View file

@ -52,7 +52,7 @@ export function InvitationHistory({ slug }: { slug: string }) {
<section className="min-w-0 space-y-3 border-t pt-4" aria-label={t('invitation.historyTitle')}>
<div className="flex items-center justify-between gap-2">
<h3 className="text-sm font-semibold">{t('invitation.historyTitle')}</h3>
<Button variant="ghost" size="sm" className="gap-1.5 px-2.5" disabled={history.isFetching} onClick={() => void history.refetch()}>
<Button data-analytics-id="namespace.invitation.refresh" variant="ghost" size="sm" className="gap-1.5 px-2.5" disabled={history.isFetching} onClick={() => void history.refetch()}>
<RefreshCw className="h-3.5 w-3.5" aria-hidden="true" />{t('invitation.historyRefresh')}
</Button>
</div>
@ -86,7 +86,7 @@ export function InvitationHistory({ slug }: { slug: string }) {
</dl>
</li>)}</ul>
</div>
{history.data.totalPages > 1 ? <Pagination compact page={page} totalPages={history.data.totalPages} onPageChange={setPage} /> : null}
{history.data.totalPages > 1 ? <Pagination analyticsId="namespace.invitation.paginate" compact page={page} totalPages={history.data.totalPages} onPageChange={setPage} /> : null}
</>
) : <p className="rounded-lg border border-dashed p-4 text-center text-sm text-muted-foreground">{t('invitation.historyEmpty')}</p>}
</section>

View file

@ -65,7 +65,7 @@ export function NamespaceHeader({ namespace, canEdit = false }: NamespaceHeaderP
</div>
{canEdit ? (
<EditNamespaceDialog namespace={namespace}>
<Button type="button" variant="outline" size="sm" aria-label={t('namespaceEdit.editButton')}>
<Button data-analytics-id="namespace.settings.edit" type="button" variant="outline" size="sm" aria-label={t('namespaceEdit.editButton')}>
<Pencil className="mr-1 h-4 w-4" />
{t('namespaceEdit.editButton')}
</Button>

View file

@ -8,7 +8,7 @@ import { cn } from '@/shared/lib/utils'
export function NamespaceManagementBack() {
const { t } = useTranslation()
return (
<Link to="/dashboard/namespaces" className="inline-flex items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
<Link data-analytics-id="namespace.list.open" to="/dashboard/namespaces" className="inline-flex items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
<ArrowLeft className="h-4 w-4" aria-hidden="true" />
{t('namespaceManagement.back')}
</Link>
@ -23,16 +23,16 @@ export function NamespaceManagementNav({ slug, active }: { slug: string; active:
const canReview = hasRole('SKILL_ADMIN') || hasRole('SUPER_ADMIN')
|| (namespace?.type === 'TEAM' && (namespace.currentUserRole === 'OWNER' || namespace.currentUserRole === 'ADMIN'))
const tabs = [
{ key: 'skills', path: '/dashboard/namespaces/$slug', visible: true },
{ key: 'members', path: '/dashboard/namespaces/$slug/members', visible: namespace?.type === 'TEAM' && !!namespace.currentUserRole },
{ key: 'reviews', path: '/dashboard/namespaces/$slug/reviews', visible: canReview },
{ key: 'settings', path: '/dashboard/namespaces/$slug/settings', visible: !!namespace },
{ key: 'skills', path: '/dashboard/namespaces/$slug', analyticsId: 'namespace.skills.open', visible: true },
{ key: 'members', path: '/dashboard/namespaces/$slug/members', analyticsId: 'namespace.members.open', visible: namespace?.type === 'TEAM' && !!namespace.currentUserRole },
{ key: 'reviews', path: '/dashboard/namespaces/$slug/reviews', analyticsId: 'namespace.reviews.open', visible: canReview },
{ key: 'settings', path: '/dashboard/namespaces/$slug/settings', analyticsId: 'namespace.settings.open', visible: !!namespace },
] as const
return (
<div className="space-y-3">
<nav aria-label={t('namespaceManagement.navigation')} className="flex gap-1 overflow-x-auto border-b border-border">
{tabs.filter((tab) => tab.visible).map((tab) => (
<Link key={tab.key} to={tab.path} params={{ slug }}
<Link data-analytics-id={tab.analyticsId} key={tab.key} to={tab.path} params={{ slug }}
aria-current={active === tab.key ? 'page' : undefined}
className={cn('shrink-0 border-b-2 px-4 py-3 text-sm font-medium transition-colors', active === tab.key ? 'border-primary text-primary' : 'border-transparent text-muted-foreground hover:text-foreground')}>
{t(`namespaceManagement.${tab.key}`)}

View file

@ -60,7 +60,7 @@ export function NamespaceSkills({ namespace, showHeader = true }: { namespace: s
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5">
{skillsData.items.map((skill, idx) => (
<div key={skill.id} className={`relative animate-fade-up delay-${Math.min(idx + 1, 6)}`}>
<SkillCard
<SkillCard analyticsId="skill.card.open"
skill={skill}
onClick={() => handleSkillClick(skill.slug)}
/>
@ -69,7 +69,7 @@ export function NamespaceSkills({ namespace, showHeader = true }: { namespace: s
</div>
{skillsData.total > PAGE_SIZE ? (
<Pagination page={page} totalPages={totalPages} onPageChange={setPage} />
<Pagination analyticsId="namespace.skill.paginate" page={page} totalPages={totalPages} onPageChange={setPage} />
) : null}
</>
) : (

View file

@ -74,7 +74,7 @@ export function TransferOwnershipDialog({ namespace, members, children }: Transf
return (
<Dialog open={open} onOpenChange={handleOpenChange}>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent>
<DialogContent closeAnalyticsId="namespace.ownership.cancel">
<DialogHeader className="text-center sm:text-center">
<DialogTitle className="text-center">{t('members.transferDialogTitle')}</DialogTitle>
<DialogDescription className="text-center">
@ -91,12 +91,12 @@ export function TransferOwnershipDialog({ namespace, members, children }: Transf
<Label htmlFor="transfer-new-owner">{t('members.transferNewOwnerLabel')}</Label>
{candidates.length > 0 ? (
<Select value={selectedUserId} onValueChange={setSelectedUserId}>
<SelectTrigger id="transfer-new-owner">
<SelectTrigger data-analytics-id="namespace.ownership.interact" id="transfer-new-owner">
<SelectValue placeholder={t('members.transferSelectPlaceholder')} />
</SelectTrigger>
<SelectContent>
{candidates.map((candidate) => (
<SelectItem key={candidate.userId} value={candidate.userId}>
<SelectItem data-analytics-id="namespace.ownership.select" key={candidate.userId} value={candidate.userId}>
{candidate.displayName || candidate.userId} ({candidate.role})
</SelectItem>
))}
@ -129,10 +129,10 @@ export function TransferOwnershipDialog({ namespace, members, children }: Transf
) : null}
<DialogFooter className="sm:justify-center sm:space-x-3">
<Button type="button" variant="outline" onClick={() => handleOpenChange(false)}>
<Button data-analytics-id="namespace.ownership.cancel" type="button" variant="outline" onClick={() => handleOpenChange(false)}>
{t('dialog.cancel')}
</Button>
<Button
<Button data-analytics-id="namespace.ownership.confirm"
type="button"
variant="destructive"
onClick={handleTransfer}

View file

@ -38,7 +38,7 @@ export function NotificationBell() {
return (
<div ref={containerRef} className="relative">
<button
<button data-analytics-id="notification.menu.toggle"
type="button"
aria-label={t('notification.title')}
onClick={() => setOpen((v) => !v)}

View file

@ -45,7 +45,7 @@ export function NotificationDropdown({ onClose }: Props) {
<span className="text-sm font-semibold" style={{ color: 'hsl(var(--foreground))' }}>
{t('notification.title')}
</span>
<button
<button data-analytics-id="notification.all.read"
type="button"
onClick={handleMarkAllRead}
disabled={markAllRead.isPending || notifications.length === 0}
@ -72,7 +72,7 @@ export function NotificationDropdown({ onClose }: Props) {
{(() => {
const display = resolveNotificationDisplay(item, i18n.language)
return (
<Link
<Link data-analytics-id={item.targetRoute?.startsWith('/') && !item.targetRoute.startsWith('//') ? 'notification.target.provided.open' : item.entityType?.toLowerCase() === 'review' ? item.entityId ? 'notification.review.detail.open' : 'notification.review.list.open' : item.entityType?.toLowerCase() === 'report' ? 'notification.report.open' : item.entityType?.toLowerCase() === 'promotion' ? 'notification.promotion.open' : 'notification.fallback.open'}
to={resolveNotificationTarget(item)}
onClick={() => handleItemClick(item)}
className="flex items-start gap-3 px-4 py-3 transition-colors hover:bg-muted"
@ -102,7 +102,7 @@ export function NotificationDropdown({ onClose }: Props) {
{/* Footer */}
<div className="px-4 py-2.5 border-t text-center" style={{ borderColor: 'hsl(var(--border))' }}>
<Link
<Link data-analytics-id="notification.list.open"
to="/dashboard/notifications"
onClick={onClose}
className="text-xs hover:opacity-70 transition-opacity"

View file

@ -72,7 +72,7 @@ export function NotificationPreferenceForm({ showHeader = true }: { showHeader?:
</div>
{/* Accessible toggle switch */}
<button
<button data-analytics-id={category === 'PUBLISH' ? 'notification.preference.publish.toggle' : category === 'REVIEW' ? 'notification.preference.review.toggle' : category === 'PROMOTION' ? 'notification.preference.promotion.toggle' : 'notification.preference.report.toggle'}
id={toggleId}
role="switch"
aria-checked={enabled}

View file

@ -4,6 +4,9 @@ import { useDropzone } from 'react-dropzone'
import { cn } from '@/shared/lib/utils'
interface UploadZoneProps {
analyticsId?: string
folderAnalyticsId?: string
pickerAnalyticsId?: string
onFileSelect: (file: File) => void
/** Optional: called with the raw files of a picked folder (webkitdirectory). */
onFolderSelect?: (files: File[]) => void
@ -19,7 +22,7 @@ export function supportsDirectorySelection(input: HTMLInputElement | null): bool
* The component is intentionally stateless so packaging validation can remain in
* the publish flow that knows the surrounding form and backend constraints.
*/
export function UploadZone({ onFileSelect, onFolderSelect, disabled }: UploadZoneProps) {
export function UploadZone({ onFileSelect, onFolderSelect, disabled, analyticsId, folderAnalyticsId, pickerAnalyticsId }: UploadZoneProps) {
const { t } = useTranslation()
const folderInputRef = useRef<HTMLInputElement>(null)
const [folderSelectionSupported, setFolderSelectionSupported] = useState(false)
@ -67,13 +70,15 @@ export function UploadZone({ onFileSelect, onFolderSelect, disabled }: UploadZon
<div className="flex flex-col gap-3">
<div
{...getRootProps()}
data-analytics-id={disabled ? undefined : analyticsId}
data-analytics-event={!disabled && analyticsId ? 'click+keydown+drop' : undefined}
className={cn(
'upload-zone rounded-xl p-10 text-center cursor-pointer transition-all duration-300',
isDragActive && 'border-primary bg-primary/5 scale-[1.01]',
disabled && 'opacity-50 cursor-not-allowed'
)}
>
<input {...getInputProps()} />
<input {...getInputProps()} data-analytics-id={disabled ? undefined : analyticsId} />
<div className="flex flex-col items-center gap-3">
<div className="w-14 h-14 rounded-2xl bg-secondary/60 flex items-center justify-center">
<svg
@ -106,6 +111,7 @@ export function UploadZone({ onFileSelect, onFolderSelect, disabled }: UploadZon
{onFolderSelect && (
<div className="text-center">
<input
data-analytics-id={folderAnalyticsId}
ref={folderInputRef}
type="file"
className="hidden"
@ -115,6 +121,7 @@ export function UploadZone({ onFileSelect, onFolderSelect, disabled }: UploadZon
/>
{folderSelectionSupported ? (
<button
data-analytics-id={pickerAnalyticsId}
type="button"
className="text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline disabled:cursor-not-allowed disabled:opacity-50"
onClick={() => folderInputRef.current?.click()}

View file

@ -46,7 +46,7 @@ export function GithubSyncReviewQueue({ namespaceId, namespaceSlug, enabled = tr
</div>
<div className="flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between">
<div role="group" aria-label={t('reviews.syncTitle')} className="flex flex-wrap gap-1 rounded-lg bg-muted p-1">
{REVIEW_STATUSES.map((value) => <button key={value}
{REVIEW_STATUSES.map((value) => <button data-analytics-id="review.sync.status" key={value}
type="button" aria-pressed={status === value} onClick={() => setStatus(value)}
className="rounded-md px-3 py-2 text-sm aria-pressed:bg-card aria-pressed:font-semibold aria-pressed:shadow-sm">
{t(value === 'PENDING' ? 'reviews.tabPending' : value === 'APPROVED'
@ -59,10 +59,10 @@ export function GithubSyncReviewQueue({ namespaceId, namespaceSlug, enabled = tr
setSortDirection(value as 'ASC' | 'DESC')
setPages(initialPages())
}}>
<SelectTrigger><SelectValue /></SelectTrigger>
<SelectTrigger data-analytics-id="review.sync.sort.interact"><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem value="DESC">{t('reviews.sortNewest')}</SelectItem>
<SelectItem value="ASC">{t('reviews.sortOldest')}</SelectItem>
<SelectItem data-analytics-id="review.sync.sort" value="DESC">{t('reviews.sortNewest')}</SelectItem>
<SelectItem data-analytics-id="review.sync.sort" value="ASC">{t('reviews.sortOldest')}</SelectItem>
</SelectContent>
</Select>
</div>
@ -90,7 +90,7 @@ export function GithubSyncReviewQueue({ namespaceId, namespaceSlug, enabled = tr
{formatLocalDateTime(item.review.reviewedAt ?? item.review.submittedAt, i18n.language)}
</p>
</div>
<Link to={namespaceSlug
<Link data-analytics-id="review.detail.open" to={namespaceSlug
? buildNamespaceReviewDetailPath(namespaceSlug, item.review.id)
: `/dashboard/reviews/${item.review.id}`}
className="inline-flex shrink-0 items-center rounded-md border px-3 py-2 text-sm hover:bg-accent">
@ -100,7 +100,7 @@ export function GithubSyncReviewQueue({ namespaceId, namespaceSlug, enabled = tr
</div>
</section>
})}
{totalPages > 1 && <Pagination page={pages[status]} totalPages={totalPages}
{totalPages > 1 && <Pagination analyticsId="review.sync.paginate" page={pages[status]} totalPages={totalPages}
onPageChange={(page) => setPages((current) => ({ ...current, [status]: page }))} />}
<p className="text-xs text-muted-foreground">{t('reviews.pageSummary', { total: query.data.total, page: pages[status] + 1 })}</p>
</div>}

View file

@ -76,14 +76,14 @@ export function GithubSyncReviewDiff({ source, reviewId }: { source: GithubSyncR
{selected ? (
<>
<div className="flex flex-wrap items-center gap-2 border-b bg-muted/20 px-3 py-2 text-xs">
<Button type="button" variant="outline" size="sm" className="h-7 w-7 p-0" aria-label={t('review.githubPreviousFile')}
<Button data-analytics-id="review.file.previous" type="button" variant="outline" size="sm" className="h-7 w-7 p-0" aria-label={t('review.githubPreviousFile')}
disabled={selectedIndex <= 0} onClick={() => selectFile(files[selectedIndex - 1].path)}><ChevronLeft className="h-3.5 w-3.5" /></Button>
<select aria-label={t('review.githubSelectFile')} value={selected.path}
<select data-analytics-id="review.file.select" aria-label={t('review.githubSelectFile')} value={selected.path}
onChange={(event) => selectFile(event.target.value)}
className="h-7 min-w-0 flex-1 rounded border border-border bg-background px-2 font-mono text-xs sm:max-w-xl">
{files.map((file) => <option key={file.path} value={file.path}>{t(`review.githubChange${file.changeType}`)} · {file.path}</option>)}
</select>
<Button type="button" variant="outline" size="sm" className="h-7 w-7 p-0" aria-label={t('review.githubNextFile')}
<Button data-analytics-id="review.file.next" type="button" variant="outline" size="sm" className="h-7 w-7 p-0" aria-label={t('review.githubNextFile')}
disabled={selectedIndex >= files.length - 1} onClick={() => selectFile(files[selectedIndex + 1].path)}><ChevronRight className="h-3.5 w-3.5" /></Button>
<span className="text-muted-foreground">{selectedIndex + 1}/{files.length}</span>
<span className="rounded bg-primary/10 px-1.5 py-0.5 text-primary">{t(`review.githubChange${selected.changeType}`)}</span>
@ -92,8 +92,8 @@ export function GithubSyncReviewDiff({ source, reviewId }: { source: GithubSyncR
<span className="min-w-0 break-all font-mono">{selected.path}</span>
{canComputeDiff && selected.changeType === 'MODIFIED' && (
<div className="flex shrink-0 gap-1" role="group" aria-label={t('review.githubViewMode')}>
<Button size="sm" className="h-7 px-2" variant={viewMode === 'changes' ? 'secondary' : 'ghost'} onClick={() => setViewMode('changes')}>{t('review.githubViewChanges')}</Button>
<Button size="sm" className="h-7 px-2" variant={viewMode === 'full' ? 'secondary' : 'ghost'} onClick={() => setViewMode('full')}>{t('review.githubViewFull')}</Button>
<Button data-analytics-id="review.diff.changes" size="sm" className="h-7 px-2" variant={viewMode === 'changes' ? 'secondary' : 'ghost'} onClick={() => setViewMode('changes')}>{t('review.githubViewChanges')}</Button>
<Button data-analytics-id="review.diff.full" size="sm" className="h-7 px-2" variant={viewMode === 'full' ? 'secondary' : 'ghost'} onClick={() => setViewMode('full')}>{t('review.githubViewFull')}</Button>
</div>
)}
</div>
@ -105,7 +105,7 @@ export function GithubSyncReviewDiff({ source, reviewId }: { source: GithubSyncR
: t(selectedSize > MAX_INLINE_PREVIEW_BYTES ? 'filePreview.tooLarge'
: previewCheck?.reason === 'binary' ? 'filePreview.binaryFile' : 'filePreview.unsupported')}</p>
{!removedBaseUnavailable && (
<a className="inline-block text-primary underline" href={buildApiUrl(downloadPath)} download>{t('filePreview.downloadFile')}</a>
<a data-analytics-id="review.file.download" className="inline-block text-primary underline" href={buildApiUrl(downloadPath)} download>{t('filePreview.downloadFile')}</a>
)}
</div>
) : isLoadingText ? (
@ -143,7 +143,7 @@ export function GithubSyncReviewEvidence({ source }: { source: GithubSyncReviewS
<dl className="grid gap-x-4 gap-y-3 text-xs sm:grid-cols-2">
<div><dt className="text-muted-foreground">{t('review.githubRepository')}</dt><dd className="mt-1 break-all font-medium">{repository}</dd></div>
<div><dt className="text-muted-foreground">{t('review.githubSkillPath')}</dt><dd className="mt-1 break-all font-mono">{source.skillPath}</dd></div>
<div><dt className="text-muted-foreground">{t('review.githubCommit')}</dt><dd className="mt-1"><a className="break-all font-mono text-primary underline" href={commitUrl} target="_blank" rel="noopener noreferrer">{source.commitSha}</a></dd></div>
<div><dt className="text-muted-foreground">{t('review.githubCommit')}</dt><dd className="mt-1"><a data-analytics-id="review.commit.external" className="break-all font-mono text-primary underline" href={commitUrl} target="_blank" rel="noopener noreferrer">{source.commitSha}</a></dd></div>
<div><dt className="text-muted-foreground">{t('review.githubRunId')}</dt><dd className="mt-1 break-all font-mono">{source.runId}</dd></div>
<div><dt className="text-muted-foreground">{t('review.githubLicenseStatus')}</dt><dd className="mt-1 font-medium">{t(`review.githubLicense${source.evidence.status}`, { defaultValue: source.evidence.status })}</dd></div>
</dl>

View file

@ -57,7 +57,7 @@ export function ReviewSkillDetailSection({ detail, isLoading, hasError, reviewId
<div className="space-y-3">
<div className="flex flex-wrap items-center justify-between gap-3">
<p className="text-sm text-muted-foreground">{t('review.skillDetailDescription', { skill: `${detail.skill.namespace}/${detail.skill.slug}` })}</p>
{downloadHref && <a className={buttonVariants({ variant: 'outline', size: 'sm', className: 'px-2.5' })} href={buildApiUrl(downloadHref)}>
{downloadHref && <a data-analytics-id="review.package.download" className={buttonVariants({ variant: 'outline', size: 'sm', className: 'px-2.5' })} href={buildApiUrl(downloadHref)}>
{t('review.downloadSkillZip')}
</a>}
</div>
@ -66,7 +66,7 @@ export function ReviewSkillDetailSection({ detail, isLoading, hasError, reviewId
<h3 className="mb-2 text-sm font-semibold">{t('fileTree.title')} <span className="font-normal text-muted-foreground">{detail.files.length}</span></h3>
{detail.files.length > 0 ? (
<div className="max-h-[620px] overflow-auto">
<FileTree files={detail.files} onFileClick={(node) => { setPreviewNode(node); setPreviewDialogOpen(true) }} bare compact />
<FileTree analyticsId="review.file.open" files={detail.files} onFileClick={(node) => { setPreviewNode(node); setPreviewDialogOpen(true) }} bare compact />
</div>
) : <p className="text-sm text-muted-foreground">{t('skillDetail.noFiles')}</p>}
</Card>
@ -78,7 +78,7 @@ export function ReviewSkillDetailSection({ detail, isLoading, hasError, reviewId
<div className="space-y-2 text-sm text-muted-foreground">
<p className="text-destructive">{t('review.documentationLoadFailed')}</p>
{detail.documentationPath && reviewId && (
<a className="text-primary underline" href={buildApiUrl(`${WEB_API_PREFIX}/reviews/${reviewId}/file?path=${encodeURIComponent(detail.documentationPath)}`)} download>
<a data-analytics-id="review.file.download" className="text-primary underline" href={buildApiUrl(`${WEB_API_PREFIX}/reviews/${reviewId}/file?path=${encodeURIComponent(detail.documentationPath)}`)} download>
{t('filePreview.downloadFile')}
</a>
)}
@ -91,14 +91,14 @@ export function ReviewSkillDetailSection({ detail, isLoading, hasError, reviewId
) : documentationTooLarge && detail.documentationPath && reviewId ? (
<div className="space-y-2 text-sm text-muted-foreground">
<p>{t('review.documentationTooLarge')}</p>
<a className="text-primary underline" href={buildApiUrl(`${WEB_API_PREFIX}/reviews/${reviewId}/file?path=${encodeURIComponent(detail.documentationPath)}`)} download>
<a data-analytics-id="review.file.download" className="text-primary underline" href={buildApiUrl(`${WEB_API_PREFIX}/reviews/${reviewId}/file?path=${encodeURIComponent(detail.documentationPath)}`)} download>
{t('filePreview.downloadFile')}
</a>
</div>
) : <p className="text-sm text-muted-foreground">{t('review.noDocumentation')}</p>}
</Card>
</div>
<FilePreviewDialog
<FilePreviewDialog closeAnalyticsId="review.file.close" downloadAnalyticsId="review.file.download"
open={previewDialogOpen}
onOpenChange={setPreviewDialogOpen}
node={previewNode}
@ -106,7 +106,7 @@ export function ReviewSkillDetailSection({ detail, isLoading, hasError, reviewId
isLoading={isLoadingPreview}
error={previewError}
onDownload={handleDownloadFile}
maxPreviewBytes={256 * 1024}
maxPreviewBytes={256 * 1024} copyAnalyticsId="review.file.copy"
/>
</div>
)

View file

@ -6,6 +6,7 @@ import { Input } from '@/shared/ui/input'
import { Button } from '@/shared/ui/button'
interface SearchBarProps {
analyticsId?: string
defaultValue?: string
value?: string
placeholder?: string
@ -20,7 +21,7 @@ interface SearchBarProps {
* It supports both controlled and uncontrolled usage so page-level containers can decide whether
* query text should be driven from URL state or local form state.
*/
export function SearchBar({ defaultValue = '', value, placeholder, isSearching = false, onChange, onSearch }: SearchBarProps) {
export function SearchBar({ defaultValue = '', value, placeholder, isSearching = false, onChange, onSearch, analyticsId }: SearchBarProps) {
const { t } = useTranslation()
const [query, setQuery] = useState(defaultValue)
const isControlled = value !== undefined
@ -51,7 +52,7 @@ export function SearchBar({ defaultValue = '', value, placeholder, isSearching =
}
return (
<form onSubmit={handleSubmit} className="flex gap-2 rounded-lg border border-border/60 bg-card p-1.5 shadow-[var(--shadow-card)]">
<form data-analytics-id={onSearch ? analyticsId : undefined} onSubmit={handleSubmit} className="flex gap-2 rounded-lg border border-border/60 bg-card p-1.5 shadow-[var(--shadow-card)]">
<div className="relative flex-1">
<Search className="absolute left-3 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground pointer-events-none" />
<Input
@ -63,7 +64,7 @@ export function SearchBar({ defaultValue = '', value, placeholder, isSearching =
className="pl-10 pr-10 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 h-10"
/>
{currentQuery ? (
<button
<button data-analytics-id={analyticsId ? 'search.query.clear' : undefined}
type="button"
onClick={handleClear}
className="absolute right-3 top-1/2 inline-flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-secondary/70 hover:text-foreground"

View file

@ -111,7 +111,7 @@ function ScannerCard({ audit, versionStatus, compact }: { audit: SecurityAuditRe
{sortedFindings.length > 0 && (
<>
<Button
<Button data-analytics-id="security.findings.toggle"
variant="ghost"
size="sm"
className={cn('w-full justify-between text-muted-foreground', compact && 'h-7 px-2 text-xs')}

View file

@ -53,7 +53,7 @@ export function SecurityAuditSummary({ skillId, versionId, versionStatus, canRet
{t('securityAudit.totalFindings', { count: totalFindings })}
</p>
{canRetry && versionStatus === 'SCAN_FAILED' && (
<Button
<Button data-analytics-id="security.scan.retry"
size="sm"
className="w-full"
disabled={retryMutation.isPending}
@ -68,13 +68,13 @@ export function SecurityAuditSummary({ skillId, versionId, versionStatus, canRet
{retryMutation.isPending ? t('securityAudit.retrying') : t('securityAudit.retry')}
</Button>
)}
<Button variant="outline" size="sm" className="w-full" onClick={() => setDialogOpen(true)}>
<Button data-analytics-id="security.scan.open" variant="outline" size="sm" className="w-full" onClick={() => setDialogOpen(true)}>
{t('securityAudit.viewDetails')}
</Button>
</Card>
<Dialog open={dialogOpen} onOpenChange={setDialogOpen}>
<DialogContent className="w-[min(calc(100vw-2rem),48rem)] max-h-[calc(100vh-2rem)] overflow-hidden flex flex-col">
<DialogContent closeAnalyticsId="security.scan.close" className="w-[min(calc(100vw-2rem),48rem)] max-h-[calc(100vh-2rem)] overflow-hidden flex flex-col">
<DialogHeader className="shrink-0">
<DialogTitle>{t('securityAudit.title')}</DialogTitle>
<DialogDescription>{t('securityAudit.dialogDescription')}</DialogDescription>

View file

@ -25,9 +25,9 @@ export function AvatarReviewSettingsPanel() {
{settings.isLoading && <p>{t('skillAvatar.loading')}</p>}
{settings.isError && <p role="alert">{t('skillAvatar.failed')}</p>}
{settings.data && <>
{(['machineEnabled', 'manualEnabled'] as const).map((field) => <label key={field} className="flex items-center justify-between gap-4 rounded-lg border p-4"><span>{t(`skillAvatar.${field}`)}</span><input type="checkbox" checked={draft[field]} onChange={(event) => { setDraft({ ...draft, [field]: event.target.checked }); setSaved(false) }} /></label>)}
{(['machineEnabled', 'manualEnabled'] as const).map((field) => <label key={field} className="flex items-center justify-between gap-4 rounded-lg border p-4"><span>{t(`skillAvatar.${field}`)}</span><input data-analytics-id={field === 'machineEnabled' ? 'admin.avatar.machine.toggle' : 'admin.avatar.manual.toggle'} type="checkbox" checked={draft[field]} onChange={(event) => { setDraft({ ...draft, [field]: event.target.checked }); setSaved(false) }} /></label>)}
{!draft.machineEnabled && !draft.manualEnabled && <p role="alert" className="text-sm text-destructive">{t('skillAvatar.noReviewRisk')}</p>}
<Button disabled={!dirty || update.isPending} onClick={() => update.mutate({ ...draft, version: settings.data!.version })}>{t('skillAvatar.save')}</Button>
<Button data-analytics-id="admin.avatar.settings" disabled={!dirty || update.isPending} onClick={() => update.mutate({ ...draft, version: settings.data!.version })}>{t('skillAvatar.save')}</Button>
</>}
{saved && <p role="status" className="text-sm">{t('skillAvatar.saved')}</p>}
{error && <p role="alert" className="text-sm text-destructive">{error}</p>}

View file

@ -48,7 +48,7 @@ export function ComplianceSnapshotPanel({ snapshot, className, defaultExpanded =
<div className="font-mono text-xs text-muted-foreground" title={snapshot?.digest}>
{shortDigest(snapshot?.digest)}
</div>
<button
<button data-analytics-id="skill.compliance.toggle"
type="button"
className="inline-flex items-center gap-1 rounded-full border border-border/70 bg-background/80 px-2.5 py-1 text-xs font-medium text-foreground transition-colors hover:bg-background"
aria-expanded={isExpanded}

View file

@ -11,6 +11,9 @@ import { getFileTypeLabel, canPreviewFile, getLanguageForHighlight } from './fil
import type { FileTreeNode } from './file-tree-builder'
interface FilePreviewDialogProps {
downloadAnalyticsId?: string
copyAnalyticsId?: string
closeAnalyticsId?: string
open: boolean
onOpenChange: (open: boolean) => void
node: FileTreeNode | null
@ -37,6 +40,9 @@ export function FilePreviewDialog({
onDownload,
onLinkClick,
maxPreviewBytes,
downloadAnalyticsId,
copyAnalyticsId,
closeAnalyticsId,
}: FilePreviewDialogProps) {
const { t } = useTranslation()
// Tracks the copy animation state: idle → spinning → done
@ -81,7 +87,7 @@ export function FilePreviewDialog({
return (
<Dialog open={open} onOpenChange={onOpenChange}>
{/* Hide the default close button; override base width to fill most of the viewport */}
<DialogContent className="w-[min(calc(100vw-2rem),72rem)] max-h-[90vh] p-0 gap-0 flex flex-col [&>button]:hidden">
<DialogContent closeAnalyticsId={closeAnalyticsId} className="w-[min(calc(100vw-2rem),72rem)] max-h-[90vh] p-0 gap-0 flex flex-col [&>button]:hidden">
{/* Header: file name, type badge, and action buttons (including close) */}
<div className="flex items-center justify-between px-5 py-3 border-b border-border/40 bg-muted/30 flex-shrink-0">
<div className="flex items-center gap-3 min-w-0 flex-1">
@ -93,6 +99,7 @@ export function FilePreviewDialog({
<div className="flex items-center gap-1 flex-shrink-0">
{content && (
<Button
data-analytics-id={copyAnalyticsId}
variant="ghost"
size="icon"
className="h-8 w-8 rounded-lg opacity-60 hover:opacity-100 hover:bg-accent transition-all duration-200 active:scale-95"
@ -106,6 +113,7 @@ export function FilePreviewDialog({
</Button>
)}
<Button
data-analytics-id={downloadAnalyticsId}
variant="ghost"
size="icon"
className="h-8 w-8 rounded-lg opacity-60 hover:opacity-100 hover:bg-accent transition-all duration-200 hover:scale-110 active:scale-95"
@ -115,6 +123,7 @@ export function FilePreviewDialog({
<Download className="h-4 w-4 transition-transform duration-200 hover:translate-y-0.5" />
</Button>
<Button
data-analytics-id={closeAnalyticsId}
variant="ghost"
size="icon"
className="h-8 w-8 rounded-lg opacity-60 hover:opacity-100 hover:bg-destructive/10 hover:text-destructive transition-all duration-200 hover:rotate-90 active:scale-95"
@ -146,7 +155,7 @@ export function FilePreviewDialog({
? t('filePreview.binaryFile')
: t('filePreview.unsupported')}
</p>
<Button onClick={onDownload}>{t('filePreview.downloadHint', { name: node.name })}</Button>
<Button data-analytics-id={downloadAnalyticsId} onClick={onDownload}>{t('filePreview.downloadHint', { name: node.name })}</Button>
</div>
) : content && isMarkdown ? (
<MarkdownRenderer content={content} onLinkClick={onLinkClick} />

View file

@ -5,6 +5,7 @@ import { getFileIcon } from './file-type-utils'
import { cn } from '@/shared/lib/utils'
interface FileTreeNodeProps {
analyticsId?: string
node: FileTreeNode
onFileClick: (node: FileTreeNode) => void
defaultExpanded?: boolean
@ -42,6 +43,7 @@ export const FileTreeNodeComponent = memo(function FileTreeNodeComponent({
onFileClick,
defaultExpanded = false,
compact = false,
analyticsId,
}: FileTreeNodeProps) {
const [isExpanded, setIsExpanded] = useState(defaultExpanded)
@ -55,6 +57,7 @@ export const FileTreeNodeComponent = memo(function FileTreeNodeComponent({
if (node.type === 'file') {
return (
<div
data-analytics-id={analyticsId}
className={cn('flex items-center justify-between px-3 py-2 hover:bg-accent/10 cursor-pointer transition-colors group', compact && 'py-1.5')}
style={{ paddingLeft: `${node.depth * 16 + 12}px` }}
onClick={() => onFileClick(node)}
@ -76,6 +79,7 @@ export const FileTreeNodeComponent = memo(function FileTreeNodeComponent({
return (
<div>
<div
data-analytics-id={analyticsId ? 'skill.directory.toggle' : undefined}
className={cn('flex items-center gap-2 px-3 py-2 hover:bg-muted/50 cursor-pointer transition-colors', compact && 'py-1.5')}
style={{ paddingLeft: `${node.depth * 16 + 12}px` }}
onClick={() => setIsExpanded(!isExpanded)}
@ -96,6 +100,7 @@ export const FileTreeNodeComponent = memo(function FileTreeNodeComponent({
<div>
{node.children.map((child) => (
<FileTreeNodeComponent
analyticsId={analyticsId}
key={child.id}
node={child}
onFileClick={onFileClick}

View file

@ -7,6 +7,7 @@ import { FileTreeNodeComponent } from './file-tree-node'
import type { FileTreeNode } from './file-tree-builder'
interface FileTreeProps {
analyticsId?: string
files: SkillFile[]
onFileClick?: (node: FileTreeNode) => void
/** When true, renders without the outer border/header (for embedding in a Card) */
@ -18,7 +19,7 @@ interface FileTreeProps {
* Displays a hierarchical file tree with expandable directories.
* Converts flat file list into tree structure and renders with proper nesting.
*/
export function FileTree({ files, onFileClick, bare, compact = false }: FileTreeProps) {
export function FileTree({ files, onFileClick, bare, compact = false, analyticsId }: FileTreeProps) {
const { t } = useTranslation()
// Cache tree structure to avoid rebuilding on every render
@ -38,6 +39,7 @@ export function FileTree({ files, onFileClick, bare, compact = false }: FileTree
<div>
{tree.map((node) => (
<FileTreeNodeComponent
analyticsId={onFileClick ? analyticsId : undefined}
key={node.id}
node={node}
onFileClick={handleFileClick}

View file

@ -16,9 +16,9 @@ export function GithubSkillSourceCard({ source, version }: { source: GithubSkill
<p className="mt-2 break-all font-mono">{version}</p>
</details>
<dl className="space-y-2 text-sm">
<div><dt className="text-muted-foreground">{t('review.githubRepository')}</dt><dd className="break-all"><a href={repositoryUrl} target="_blank" rel="noopener noreferrer" className="text-primary underline">{source.ownerLogin}/{source.repositoryName}</a></dd></div>
<div><dt className="text-muted-foreground">{t('review.githubRepository')}</dt><dd className="break-all"><a data-analytics-id="github.repository.external" href={repositoryUrl} target="_blank" rel="noopener noreferrer" className="text-primary underline">{source.ownerLogin}/{source.repositoryName}</a></dd></div>
<div><dt className="text-muted-foreground">{t('review.githubSkillPath')}</dt><dd className="font-mono break-all">{source.skillPath}</dd></div>
<div><dt className="text-muted-foreground">{t('review.githubCommit')}</dt><dd className="break-all"><a href={commitUrl} target="_blank" rel="noopener noreferrer" className="font-mono text-primary underline">{source.commitSha}</a></dd></div>
<div><dt className="text-muted-foreground">{t('review.githubCommit')}</dt><dd className="break-all"><a data-analytics-id="github.commit.external" href={commitUrl} target="_blank" rel="noopener noreferrer" className="font-mono text-primary underline">{source.commitSha}</a></dd></div>
<div><dt className="text-muted-foreground">{t('review.githubLicenseStatus')}</dt><dd>{t(`review.githubLicense${source.licenseStatus}`, { defaultValue: source.licenseStatus })}</dd></div>
</dl>
<div>
@ -34,7 +34,7 @@ export function GithubSkillSourceCard({ source, version }: { source: GithubSkill
return (
<li key={`${document.scope}/${document.path}`} className="break-all">
<span className="text-muted-foreground">{t(`skillDetail.githubLicenseScope${document.scope}`)}: </span>
<a href={fileUrl} target="_blank" rel="noopener noreferrer" className="font-mono text-primary underline">{repositoryPath}</a>
<a data-analytics-id="github.file.external" href={fileUrl} target="_blank" rel="noopener noreferrer" className="font-mono text-primary underline">{repositoryPath}</a>
</li>
)
})}

View file

@ -7,6 +7,9 @@ import { useCopyToClipboard } from '@/shared/lib/clipboard'
import { resolvePublicRegistryUrl } from '@/shared/lib/registry-url'
interface InstallCommandProps {
analyticsId?: string
skillhubAnalyticsId?: string
clawhubAnalyticsId?: string
namespace: string
slug: string
version?: string
@ -56,13 +59,14 @@ export function buildSkillhubInstallCommand(
}
interface CommandBlockProps {
analyticsId?: string
command: string
}
const installMethodTabTriggerClass =
"relative border-b-0 px-1 py-2 text-xs after:absolute after:bottom-[-1px] after:left-1/2 after:h-0.5 after:w-6 after:-translate-x-1/2 after:rounded-full after:bg-transparent after:content-[''] data-[state=active]:after:bg-primary"
function CommandBlock({ command }: CommandBlockProps) {
function CommandBlock({ command, analyticsId }: CommandBlockProps) {
const { t } = useTranslation()
const [copied, copy] = useCopyToClipboard()
@ -77,6 +81,7 @@ function CommandBlock({ command }: CommandBlockProps) {
return (
<div className="relative overflow-hidden rounded-xl border border-border/60 bg-muted/50">
<Button
data-analytics-id={analyticsId}
type="button"
variant="ghost"
size="icon"
@ -96,7 +101,7 @@ function CommandBlock({ command }: CommandBlockProps) {
)
}
export function InstallCommand({ namespace, slug, version }: InstallCommandProps) {
export function InstallCommand({ namespace, slug, version, analyticsId, skillhubAnalyticsId, clawhubAnalyticsId }: InstallCommandProps) {
const { t } = useTranslation()
const baseUrl = useMemo(() => getBaseUrl(), [])
const clawhubCommand = useMemo(() => buildInstallCommand(namespace, slug, baseUrl), [baseUrl, namespace, slug])
@ -108,20 +113,20 @@ export function InstallCommand({ namespace, slug, version }: InstallCommandProps
return (
<Tabs defaultValue="skillhub" className="space-y-3">
<TabsList className="w-full gap-6 border-border/70 bg-transparent p-0 text-xs">
<TabsTrigger value="skillhub" className={installMethodTabTriggerClass}>
<TabsTrigger data-analytics-id={skillhubAnalyticsId} value="skillhub" className={installMethodTabTriggerClass}>
{t('skillDetail.installMethodSkillhub')}
</TabsTrigger>
<TabsTrigger value="clawhub" className={installMethodTabTriggerClass}>
<TabsTrigger data-analytics-id={clawhubAnalyticsId} value="clawhub" className={installMethodTabTriggerClass}>
{t('skillDetail.installMethodClawhub')}
</TabsTrigger>
</TabsList>
<TabsContent value="skillhub">
{skillhubCommand
? <CommandBlock command={skillhubCommand} />
? <CommandBlock analyticsId={analyticsId} command={skillhubCommand} />
: <p role="alert" className="text-sm text-destructive">{t('skillDetail.installCommandUnsafeVersion')}</p>}
</TabsContent>
<TabsContent value="clawhub">
<CommandBlock command={clawhubCommand} />
<CommandBlock analyticsId={analyticsId} command={clawhubCommand} />
</TabsContent>
</Tabs>
)

View file

@ -4,6 +4,7 @@ import { useCopyToClipboard } from '@/shared/lib/clipboard'
import { buildSkillhubCoordinate, getBaseUrl, isPortableSkillVersion } from './install-command'
interface InstallForAgentButtonProps {
analyticsId?: string
namespace: string
slug: string
version: string
@ -25,7 +26,7 @@ export function buildAgentInstallPrompt(
return formatPrompt(guideUrl, skill, version)
}
export function InstallForAgentButton({ namespace, slug, version, disabled = false }: InstallForAgentButtonProps) {
export function InstallForAgentButton({ namespace, slug, version, disabled = false, analyticsId }: InstallForAgentButtonProps) {
const { t } = useTranslation()
const [copied, copy] = useCopyToClipboard()
@ -53,6 +54,7 @@ export function InstallForAgentButton({ namespace, slug, version, disabled = fal
return (
<button
data-analytics-id={analyticsId}
type="button"
data-testid="install-for-agent-button"
onClick={handleCopy}

View file

@ -169,7 +169,7 @@ function MarkdownRendererComponent({ content, className, onLinkClick }: Markdown
</p>
),
a: ({ className: linkClassName, children, href, ...props }) => (
<a
<a data-analytics-id="skill.markdown.link"
className={cn(
'font-medium text-primary underline decoration-primary/30 underline-offset-4 transition-colors hover:text-primary/80',
linkClassName

View file

@ -41,7 +41,7 @@ export function ShareButton({ namespace, slug, description }: ShareButtonProps)
}
return (
<button
<button data-analytics-id="skill.share.request"
type="button"
data-testid="share-skill-button"
onClick={handleShare}

View file

@ -121,28 +121,28 @@ export function SkillAvatarEditor({ name, currentUrl, canRemove = false, disable
return <section className="space-y-2" aria-label={t('skillAvatar.title')}>
<h2 className="text-sm font-medium">{t('skillAvatar.optionalTitle')}</h2>
<div {...getRootProps()} className="flex items-center gap-3">
<div {...getRootProps()} data-analytics-id={disabled || state === 'UPLOADING' ? undefined : 'skill.avatar.file.drop'} data-analytics-event="drop" className="flex items-center gap-3">
{state === 'READY' && previewUrl ? <img src={buildApiUrl(previewUrl)} alt={t('skillAvatar.cropPreview')} className="h-16 w-16 shrink-0 rounded-lg object-cover" />
: <SkillAvatar name={name} url={state === 'REMOVE' ? null : currentUrl} size="h-16 w-16 shrink-0 text-xl" />}
<input {...getInputProps({ 'aria-label': t('skillAvatar.choose'), className: 'sr-only', style: undefined, disabled: disabled || state === 'UPLOADING' })} />
<input {...getInputProps({ 'aria-label': t('skillAvatar.choose'), className: 'sr-only', style: undefined, disabled: disabled || state === 'UPLOADING' })} data-analytics-id="skill.avatar.file.select" />
<div className="min-w-0 space-y-1">
<div className="flex flex-wrap gap-1">
<Button ref={chooseButton} type="button" size="sm" variant="outline" disabled={disabled || state === 'UPLOADING'} onClick={open}>{t(currentUrl || state === 'READY' ? 'skillAvatar.change' : 'skillAvatar.choose')}</Button>
{(canRemove || state === 'READY') && state !== 'REMOVE' && <Button type="button" size="sm" variant="ghost" disabled={disabled || dialogOpen} onClick={() => reset(canRemove)}>{t('skillAvatar.remove')}</Button>}
{state !== 'KEEP' && !dialogOpen && <Button type="button" size="sm" variant="ghost" disabled={disabled} onClick={() => reset()}>{t('skillAvatar.discardChange')}</Button>}
<Button data-analytics-id={currentUrl || state === 'READY' ? 'skill.avatar.change' : 'skill.avatar.choose'} ref={chooseButton} type="button" size="sm" variant="outline" disabled={disabled || state === 'UPLOADING'} onClick={open}>{t(currentUrl || state === 'READY' ? 'skillAvatar.change' : 'skillAvatar.choose')}</Button>
{(canRemove || state === 'READY') && state !== 'REMOVE' && <Button data-analytics-id="skill.avatar.remove" type="button" size="sm" variant="ghost" disabled={disabled || dialogOpen} onClick={() => reset(canRemove)}>{t('skillAvatar.remove')}</Button>}
{state !== 'KEEP' && !dialogOpen && <Button data-analytics-id="skill.avatar.reset" type="button" size="sm" variant="ghost" disabled={disabled} onClick={() => reset()}>{t('skillAvatar.discardChange')}</Button>}
</div>
{state !== 'KEEP' && !dialogOpen && <p role="status" className="text-xs text-muted-foreground">{t(state === 'READY' ? 'skillAvatar.stagedReady' : state === 'REMOVE' ? 'skillAvatar.removedDraft' : `skillAvatar.uploadStates.${state}`)}</p>}
</div>
</div>
{!dialogOpen && error && <p role="alert" className="text-sm text-destructive">{error}</p>}
<Dialog open={dialogOpen} onOpenChange={value => { if (!value) cancelSelection() }}>
<DialogContent className="w-[min(calc(100vw-2rem),26rem)] gap-4 p-4 sm:p-6"
<DialogContent closeAnalyticsId="skill.avatar.cancel" className="w-[min(calc(100vw-2rem),26rem)] gap-4 p-4 sm:p-6"
onCloseAutoFocus={event => { event.preventDefault(); chooseButton.current?.focus() }}>
<DialogHeader>
<DialogTitle>{t('skillAvatar.cropTitle')}</DialogTitle>
<DialogDescription>{t('skillAvatar.cropHelp')}</DialogDescription>
</DialogHeader>
{sourceUrl && <div className="flex h-80 max-h-[min(320px,45vh)] min-w-0 items-center justify-center overflow-hidden rounded-lg bg-muted/40">
{sourceUrl && <div data-analytics-id={disabled || state === 'UPLOADING' ? undefined : 'skill.avatar.crop.adjust'} data-analytics-event="pointerup+keydown" className="flex h-80 max-h-[min(320px,45vh)] min-w-0 items-center justify-center overflow-hidden rounded-lg bg-muted/40">
<ReactCrop crop={crop} aspect={1} keepSelection minWidth={16} minHeight={16}
className="max-h-[min(320px,45vh)] max-w-full"
disabled={disabled || state === 'UPLOADING'}
@ -165,8 +165,8 @@ export function SkillAvatarEditor({ name, currentUrl, canRemove = false, disable
{state === 'UPLOADING' && <p role="status" className="text-sm text-muted-foreground">{t('skillAvatar.uploadStates.UPLOADING')}</p>}
{error && <p role="alert" className="text-sm text-destructive">{error}</p>}
<DialogFooter className="flex-row justify-end">
<Button type="button" variant="outline" onClick={cancelSelection}>{t('dialog.cancel')}</Button>
<Button type="button" disabled={disabled || state === 'UPLOADING' || !crop?.width || !crop.height} onClick={() => void upload()}>{t(state === 'ERROR' ? 'skillAvatar.uploadRetry' : 'skillAvatar.cropConfirm')}</Button>
<Button data-analytics-id="skill.avatar.cancel" type="button" variant="outline" onClick={cancelSelection}>{t('dialog.cancel')}</Button>
<Button data-analytics-id={state === 'ERROR' ? 'skill.avatar.retry' : 'skill.avatar.upload'} type="button" disabled={disabled || state === 'UPLOADING' || !crop?.width || !crop.height} onClick={() => void upload()}>{t(state === 'ERROR' ? 'skillAvatar.uploadRetry' : 'skillAvatar.cropConfirm')}</Button>
</DialogFooter>
</DialogContent>
</Dialog>

View file

@ -25,7 +25,7 @@ export function SkillAvatarManager({ namespace, slug, disabled = false, previewO
const retryCoolingDown = !!candidate?.machineNextRetryAt && Date.parse(candidate.machineNextRetryAt) > Date.now()
const loadError = status.isError ? <div role="alert" className="flex flex-wrap items-center gap-2 text-xs text-destructive">
<span>{t(candidate ? 'skillAvatar.statusRefreshFailed' : 'skillAvatar.statusLoadFailed')}</span>
<Button type="button" size="sm" variant="ghost" disabled={status.isFetching} onClick={() => void status.refetch()}>{t('skillAvatar.reloadStatus')}</Button>
<Button data-analytics-id="skill.avatar.refresh" type="button" size="sm" variant="ghost" disabled={status.isFetching} onClick={() => void status.refetch()}>{t('skillAvatar.reloadStatus')}</Button>
</div> : null
if (!candidate || !['PENDING', 'REJECTED'].includes(candidate.candidateStatus ?? '')) return loadError
return (
@ -46,8 +46,8 @@ export function SkillAvatarManager({ namespace, slug, disabled = false, previewO
{!previewOnly && <div className="flex flex-wrap gap-2">
{candidate?.candidateStatus === 'PENDING' && candidate.machineStatus === 'BLOCKED'
&& candidate.reviewStatus === 'NOT_REQUIRED' && candidate.candidateId
&& <Button variant="outline" disabled={disabled || mutation.isPending} onClick={() => mutation.mutate({ kind: 'appeal', id: candidate.candidateId! })}>{t('skillAvatar.appeal')}</Button>}
{candidate?.machineStatus === 'ERROR' && candidate.candidateId && <Button variant="outline" disabled={disabled || mutation.isPending || retryCoolingDown} onClick={() => mutation.mutate({ kind: 'retry', id: candidate.candidateId! })}>{t('skillAvatar.retry')}</Button>}
&& <Button data-analytics-id="skill.avatar.appeal" variant="outline" disabled={disabled || mutation.isPending} onClick={() => mutation.mutate({ kind: 'appeal', id: candidate.candidateId! })}>{t('skillAvatar.appeal')}</Button>}
{candidate?.machineStatus === 'ERROR' && candidate.candidateId && <Button data-analytics-id="skill.avatar.retry" variant="outline" disabled={disabled || mutation.isPending || retryCoolingDown} onClick={() => mutation.mutate({ kind: 'retry', id: candidate.candidateId! })}>{t('skillAvatar.retry')}</Button>}
</div>}
{loadError}
{error && <p role="alert" className="text-sm text-destructive">{error}</p>}

View file

@ -18,7 +18,7 @@ export function SkillAvatarTakedown({ namespace, slug }: { namespace: string; sl
return <div className="space-y-2 rounded-lg border border-destructive/30 p-4">
<p className="text-sm font-medium">{t('skillAvatar.takedownHelp')}</p>
<Input value={reason} onChange={(event) => setReason(event.target.value)} placeholder={t('skillAvatar.reason')} aria-label={t('skillAvatar.reason')} />
<Button variant="outline" disabled={!reason.trim() || mutation.isPending} onClick={() => mutation.mutate()}>{t('skillAvatar.takedown')}</Button>
<Button data-analytics-id="skill.avatar.takedown" variant="outline" disabled={!reason.trim() || mutation.isPending} onClick={() => mutation.mutate()}>{t('skillAvatar.takedown')}</Button>
{error && <p role="alert" className="text-sm text-destructive">{error}</p>}
</div>
}

View file

@ -11,6 +11,7 @@ import { formatRelativeTime } from '@/shared/lib/format-relative-time'
import { Bookmark, ShieldCheck, User, Clock } from 'lucide-react'
interface SkillCardProps {
analyticsId?: string
skill: SkillSummary
onClick?: () => void
highlightStarred?: boolean
@ -19,7 +20,7 @@ interface SkillCardProps {
/**
* Reusable card for displaying one skill in lists such as landing, namespace, search, and stars.
*/
export function SkillCard({ skill, onClick, highlightStarred = true }: SkillCardProps) {
export function SkillCard({ skill, onClick, highlightStarred = true, analyticsId }: SkillCardProps) {
const { t, i18n } = useTranslation()
const { isAuthenticated } = useAuth()
// Batch highlight via shared ['skills','stars'] — never N× useStar per grid row.
@ -34,6 +35,7 @@ export function SkillCard({ skill, onClick, highlightStarred = true }: SkillCard
return (
<Card
data-analytics-id={isInteractive ? analyticsId : undefined}
className="group relative h-full min-w-0 cursor-pointer overflow-hidden rounded-md border border-border/60 bg-card p-4 text-card-foreground transition-[transform,box-shadow,border-color] duration-150 ease-out card-hover focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring/15"
style={{ borderColor: 'hsl(var(--border-card))', boxShadow: 'var(--shadow-card)' }}
onClick={onClick}

View file

@ -178,7 +178,7 @@ function ResourceLabelPanel({
<div className="mt-1 text-xs text-muted-foreground">{label.slug}</div>
</div>
{removable ? (
<Button
<Button data-analytics-id={translationPrefix === 'suite' ? label.type === 'PRIVILEGED' ? 'suite.label.privileged.detach' : 'suite.label.recommended.detach' : label.type === 'PRIVILEGED' ? 'skill.label.privileged.detach' : 'skill.label.recommended.detach'}
variant="outline"
size="sm"
onClick={() => handleDetach(label)}
@ -209,7 +209,7 @@ function ResourceLabelPanel({
) : availableLabels.length > 0 ? (
<div className="flex flex-wrap gap-2">
{availableLabels.map((label) => (
<Button
<Button data-analytics-id={translationPrefix === 'suite' ? label.type === 'PRIVILEGED' ? 'suite.label.privileged.attach' : 'suite.label.recommended.attach' : label.type === 'PRIVILEGED' ? 'skill.label.privileged.attach' : 'skill.label.recommended.attach'}
key={label.slug}
variant="outline"
size="sm"

View file

@ -41,14 +41,14 @@ export function SkillVisibilityDialog({ namespace, slug, visibility, disabled =
})
const expanding = scopes.indexOf(target) < scopes.indexOf(scopes.find(scope => scope === currentVisibility) ?? 'PUBLIC')
return <>
<Button size="sm" variant="outline" disabled={disabled} onClick={(event) => {
<Button data-analytics-id="skill.visibility.open" size="sm" variant="outline" disabled={disabled} onClick={(event) => {
event.stopPropagation()
setTarget(scopes.find(scope => scope === visibility) ?? 'PUBLIC')
setError('')
setOpen(true)
}}>{t('skillVisibility.title')}</Button>
<Dialog open={open} onOpenChange={(value) => { if (!mutation.isPending) setOpen(value) }}>
<DialogContent onClick={(event) => event.stopPropagation()}>
<DialogContent closeAnalyticsId="skill.visibility.cancel" onClick={(event) => event.stopPropagation()}>
<DialogHeader>
<DialogTitle>{t('skillVisibility.title')}</DialogTitle>
<DialogDescription>{t('skillVisibility.description')}</DialogDescription>
@ -60,14 +60,14 @@ export function SkillVisibilityDialog({ namespace, slug, visibility, disabled =
const scope = scopes.find(item => item === value)
if (scope) setTarget(scope)
}} disabled={mutation.isPending || Boolean(pendingVisibility)}>
<SelectTrigger aria-label={t('skillVisibility.title')}><SelectValue /></SelectTrigger>
<SelectContent>{scopes.map(scope => <SelectItem key={scope} value={scope}>{t(`skillVisibility.${scope}`)}</SelectItem>)}</SelectContent>
<SelectTrigger data-analytics-id="skill.visibility.interact" aria-label={t('skillVisibility.title')}><SelectValue /></SelectTrigger>
<SelectContent>{scopes.map(scope => <SelectItem data-analytics-id={scope === 'PUBLIC' ? 'skill.visibility.public' : scope === 'NAMESPACE_ONLY' ? 'skill.visibility.namespace' : 'skill.visibility.private'} key={scope} value={scope}>{t(`skillVisibility.${scope}`)}</SelectItem>)}</SelectContent>
</Select>
<p className="text-sm text-muted-foreground">{t(expanding ? 'skillVisibility.expanding' : 'skillVisibility.narrowing')}</p>
{error && <p role="alert" className="text-sm text-destructive">{error}</p>}
<DialogFooter>
<Button variant="outline" disabled={mutation.isPending} onClick={() => setOpen(false)}>{t('dialog.cancel')}</Button>
<Button disabled={mutation.isPending || state.isLoading || state.isError || Boolean(pendingVisibility) || target === currentVisibility} onClick={() => mutation.mutate()}>{t(expanding ? 'skillVisibility.submit' : 'profile.save')}</Button>
<Button data-analytics-id="skill.visibility.cancel" variant="outline" disabled={mutation.isPending} onClick={() => setOpen(false)}>{t('dialog.cancel')}</Button>
<Button data-analytics-id="skill.visibility.save" disabled={mutation.isPending || state.isLoading || state.isError || Boolean(pendingVisibility) || target === currentVisibility} onClick={() => mutation.mutate()}>{t(expanding ? 'skillVisibility.submit' : 'profile.save')}</Button>
</DialogFooter>
</DialogContent>
</Dialog>

View file

@ -36,7 +36,7 @@ export function RatingInput({ skillId, onRequireLogin }: RatingInputProps) {
{[1, 2, 3, 4, 5].map((rating) => {
const isFilled = rating <= (hoveredRating || currentRating)
return (
<button
<button data-analytics-id={rating === 1 ? 'skill.rating.one.request' : rating === 2 ? 'skill.rating.two.request' : rating === 3 ? 'skill.rating.three.request' : rating === 4 ? 'skill.rating.four.request' : 'skill.rating.five.request'}
key={rating}
type="button"
className="p-1 hover:scale-110 transition-transform"

View file

@ -57,7 +57,7 @@ function ReviewStars({ value, onChange, disabled = false }: {
<div className="flex items-center gap-1" role="radiogroup" aria-label={t('skillReviews.scoreLabel')}>
{[1, 2, 3, 4, 5].map((score) => (
<span key={score}>
<input
<input data-analytics-id={score === 1 ? 'skill.comment.rating.one' : score === 2 ? 'skill.comment.rating.two' : score === 3 ? 'skill.comment.rating.three' : score === 4 ? 'skill.comment.rating.four' : 'skill.comment.rating.five'}
id={`${ratingName}-${score}`}
className="peer sr-only"
type="radio"
@ -140,14 +140,14 @@ function ReviewEditor({ skillId, review, onDone }: {
<span className="text-xs text-muted-foreground">{reviewText.length}/2000</span>
<div className="ml-auto flex flex-wrap justify-end gap-2">
{review?.reviewed ? (
<Button variant="ghost" size="sm" onClick={handleDelete} disabled={pending}>
<Button data-analytics-id="skill.comment.delete" variant="ghost" size="sm" onClick={handleDelete} disabled={pending}>
{t('skillReviews.delete')}
</Button>
) : null}
<Button variant="outline" size="sm" onClick={onDone} disabled={pending}>
<Button data-analytics-id="skill.comment.cancel" variant="outline" size="sm" onClick={onDone} disabled={pending}>
{t('skillReviews.cancel')}
</Button>
<Button size="sm" onClick={handleSave} disabled={pending || !reviewText.trim()}>
<Button data-analytics-id="skill.comment.save" size="sm" onClick={handleSave} disabled={pending || !reviewText.trim()}>
{pending ? <Loader2 className="mr-2 h-4 w-4 animate-spin" /> : null}
{t('skillReviews.save')}
</Button>
@ -209,7 +209,7 @@ function ReviewRow({ skillId, review, canModerate }: {
</div>
{canModerate ? (
<div className="flex justify-end">
<Button variant="ghost" size="sm" onClick={moderate} disabled={moderation.isPending}>
<Button data-analytics-id={hidden ? 'skill.comment.restore' : 'skill.comment.hide'} variant="ghost" size="sm" onClick={moderate} disabled={moderation.isPending}>
<ShieldAlert className="mr-2 h-4 w-4" />
{t(hidden ? 'skillReviews.restore' : 'skillReviews.hide')}
</Button>
@ -266,11 +266,11 @@ export function SkillReviews({ skillId, canInteract, onRequireLogin }: SkillRevi
</p>
</div>
{canInteract && !editing ? (
<Button variant="outline" onClick={startEditing}>
<Button data-analytics-id="skill.comment.edit" variant="outline" onClick={startEditing}>
{mine.data?.reviewed ? t('skillReviews.edit') : t('skillReviews.write')}
</Button>
) : !canInteract && isAuthenticated && mine.data?.reviewed ? (
<Button variant="outline" onClick={deleteUnavailableReview} disabled={clearMine.isPending}>
<Button data-analytics-id="skill.comment.delete" variant="outline" onClick={deleteUnavailableReview} disabled={clearMine.isPending}>
{t('skillReviews.delete')}
</Button>
) : null}
@ -315,11 +315,11 @@ export function SkillReviews({ skillId, canInteract, onRequireLogin }: SkillRevi
{page > 0 || totalPages > 1 ? (
<div className="flex items-center justify-end gap-2 border-t border-border/50 pt-4">
<Button variant="outline" size="sm" disabled={page === 0} onClick={() => setPage((value) => value - 1)}>
<Button data-analytics-id="skill.comment.previous" variant="outline" size="sm" disabled={page === 0} onClick={() => setPage((value) => value - 1)}>
{t('skillReviews.previous')}
</Button>
<span className="text-xs text-muted-foreground">{page + 1}/{Math.max(totalPages, 1)}</span>
<Button variant="outline" size="sm" disabled={page + 1 >= totalPages} onClick={() => setPage((value) => value + 1)}>
<Button data-analytics-id="skill.comment.next" variant="outline" size="sm" disabled={page + 1 >= totalPages} onClick={() => setPage((value) => value + 1)}>
{t('skillReviews.next')}
</Button>
</div>

View file

@ -36,7 +36,7 @@ export function StarButton({ skillId, starCount, onRequireLogin }: StarButtonPro
}
return (
<Button
<Button data-analytics-id={starStatus.starred ? 'skill.star.remove' : 'skill.star.add'}
variant={starStatus.starred ? 'default' : 'outline'}
size="sm"
className="justify-between"

View file

@ -31,7 +31,7 @@ export function SubscribeButton({ skillId, subscriptionCount, onRequireLogin }:
}
return (
<Button
<Button data-analytics-id={subscriptionStatus.subscribed ? 'skill.subscription.remove' : 'skill.subscription.add'}
variant={subscriptionStatus.subscribed ? 'default' : 'outline'}
size="sm"
className="justify-between"

View file

@ -5,11 +5,12 @@ import { NamespaceBadge } from '@/shared/components/namespace-badge'
import { Card } from '@/shared/ui/card'
import { formatCompactCount } from '@/shared/lib/number-format'
export function ResourceCard({ resource, onClick }: { resource: ResourceSummary; onClick: () => void }) {
export function ResourceCard({ resource, onClick, analyticsId }: { resource: ResourceSummary; onClick: () => void; analyticsId?: string }) {
const { t } = useTranslation()
const isSuite = resource.resourceType === 'SUITE'
return (
<Card
data-analytics-id={analyticsId}
className="group h-full min-w-0 cursor-pointer p-5 transition-shadow hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/70"
role="link"
tabIndex={0}

View file

@ -238,7 +238,7 @@ export function SuiteBundleImport({ expectedMode, expectedCoordinate, returnToSu
<p className="mt-1 text-xs text-muted-foreground">{t('suite.bundle.uploadDescription')}</p>
</div>
</div>
<UploadZone
<UploadZone analyticsId="suite.bundle.select" folderAnalyticsId="suite.bundle.folder.select" pickerAnalyticsId="suite.bundle.folder.open"
onFileSelect={previewFile}
onFolderSelect={previewFolder}
disabled={previewMutation.isPending || packaging}
@ -314,7 +314,7 @@ export function SuiteBundleImport({ expectedMode, expectedCoordinate, returnToSu
{(member.warnings ?? []).map((warning) => <p key={warning} className="mt-2 text-xs text-amber-700 dark:text-amber-300">{warning}</p>)}
{(member.warnings?.length ?? 0) > 0 ? (
<label className="mt-3 flex items-start gap-2 rounded-md border border-amber-500/30 p-2 text-xs">
<input
<input data-analytics-id="suite.bundle.warning"
type="checkbox"
checked={Boolean(
member.coordinate && acceptedWarningMembers.has(member.coordinate)
@ -355,7 +355,7 @@ export function SuiteBundleImport({ expectedMode, expectedCoordinate, returnToSu
{removalCount > 0 ? (
<label className="flex items-start gap-2 rounded-lg border p-3 text-sm">
<input
<input data-analytics-id="suite.bundle.removals"
type="checkbox"
checked={removalsAccepted}
onChange={(event) => setRemovalsAccepted(event.target.checked)}
@ -365,10 +365,10 @@ export function SuiteBundleImport({ expectedMode, expectedCoordinate, returnToSu
) : null}
<div className="flex justify-end gap-2 border-t pt-3">
<Button size="sm" variant="outline" onClick={() => { setPreview(null); setFileName('') }}>
<Button data-analytics-id="suite.bundle.reset" size="sm" variant="outline" onClick={() => { setPreview(null); setFileName('') }}>
{t('suite.bundle.chooseAgain')}
</Button>
<Button size="sm" disabled={!canConfirm || confirmMutation.isPending} onClick={confirm}>
<Button data-analytics-id="suite.bundle.confirm" size="sm" disabled={!canConfirm || confirmMutation.isPending} onClick={confirm}>
{t('suite.bundle.confirm')}
</Button>
</div>

View file

@ -109,7 +109,7 @@ export function SuiteBundleOperationDetail({ operationId }: { operationId: strin
{t(`suite.bundle.statusLabel.${status}`)}
</span>
{status === 'BLOCKED_RETRYABLE' && !demoOnlyOperation ? (
<Button
<Button data-analytics-id="suite.operation.retry"
size="sm"
disabled={retryMutation.isPending}
onClick={() => retryMutation.mutate(operationId, {
@ -120,21 +120,21 @@ export function SuiteBundleOperationDetail({ operationId }: { operationId: strin
</Button>
) : null}
{canCancel ? (
<Button size="sm" variant="outline" disabled={cancelMutation.isPending} onClick={() => setCancelOpen(true)}>
<Button data-analytics-id="suite.operation.cancel" size="sm" variant="outline" disabled={cancelMutation.isPending} onClick={() => setCancelOpen(true)}>
{t('suite.bundle.cancelOperation')}
</Button>
) : null}
{status === 'REPREVIEW_REQUIRED' || status === 'CANCELLED' ? (
<Button size="sm" onClick={restartOperation}>{t('suite.bundle.startAgain')}</Button>
<Button data-analytics-id="suite.operation.restart" size="sm" onClick={restartOperation}>{t('suite.bundle.startAgain')}</Button>
) : null}
{status === 'SUITE_DRAFT_CREATED' && !draftMissing && draftCoordinate && operation?.targetVersion ? (
<Button size="sm" onClick={() => navigate({
<Button data-analytics-id="suite.draft.open" size="sm" onClick={() => navigate({
to: `/dashboard/suites/${draftCoordinate.namespace}/${encodeURIComponent(draftCoordinate.slug)}`,
search: { version: operation.targetVersion },
})}>{t('suite.bundle.openDraft')}</Button>
) : null}
{draftMissing ? (
<Button size="sm" onClick={restartOperation}>{t('suite.bundle.startAgain')}</Button>
<Button data-analytics-id="suite.operation.restart" size="sm" onClick={restartOperation}>{t('suite.bundle.startAgain')}</Button>
) : null}
</div>
) : null}
@ -178,7 +178,7 @@ export function SuiteBundleOperationDetail({ operationId }: { operationId: strin
{operationQuery.error ? (
<Card className="flex flex-wrap items-center justify-between gap-3 border-destructive/30 p-4 text-sm text-destructive" role="alert">
<span>{t('suite.bundle.operationLoadFailed')}</span>
<Button variant="outline" size="sm" onClick={() => operationQuery.refetch()}>
<Button data-analytics-id="suite.operation.refresh" variant="outline" size="sm" onClick={() => operationQuery.refetch()}>
<RefreshCw className="mr-2 h-4 w-4" />{t('suite.bundle.reloadOperation')}
</Button>
</Card>
@ -277,7 +277,7 @@ export function SuiteBundleOperationDetail({ operationId }: { operationId: strin
{needsAttention ? t('suite.bundle.memberStatus.ATTENTION') : t(`suite.bundle.memberStatus.${member.status}`)}
</span>
{canViewSkill ? (
<Button
<Button data-analytics-id="skill.detail.open"
variant="outline"
size="sm"
className="h-7 px-2 text-xs"
@ -307,7 +307,7 @@ export function SuiteBundleOperationDetail({ operationId }: { operationId: strin
</div>
</Card>
<ConfirmDialog
<ConfirmDialog confirmAnalyticsId="suite.operation.cancel.confirm" cancelAnalyticsId="suite.operation.cancel.cancel"
open={cancelOpen}
onOpenChange={setCancelOpen}
title={t('suite.bundle.cancelConfirmTitle')}

View file

@ -120,23 +120,23 @@ export function SuiteManagementActions({ suite, compact = false }: { suite: Skil
<p className={compact ? 'mt-1 text-xs text-muted-foreground' : 'mt-1 text-sm text-muted-foreground'}>{t('suite.managementDescription')}</p>
<div className={compact ? 'mt-2.5 flex flex-wrap gap-1.5' : 'mt-4 flex flex-wrap gap-2'}>
{allowed.has('REOPEN') ? (
<Button variant="outline" size={compact ? 'sm' : 'default'} className={compact ? 'h-6 px-2 text-[11px]' : undefined} disabled={reopenMutation.isPending} onClick={reopen}>
<Button data-analytics-id="suite.draft.reopen" variant="outline" size={compact ? 'sm' : 'default'} className={compact ? 'h-6 px-2 text-[11px]' : undefined} disabled={reopenMutation.isPending} onClick={reopen}>
{t('suite.reopenDraft')}
</Button>
) : null}
{allowed.has('CREATE_VERSION') && !compact ? (
<Button variant="outline" size={compact ? 'sm' : 'default'} className={compact ? 'h-6 px-2 text-[11px]' : undefined} onClick={() => navigateToEditor(true)}>{t('suite.createVersion')}</Button>
<Button data-analytics-id="suite.version.create" variant="outline" size={compact ? 'sm' : 'default'} className={compact ? 'h-6 px-2 text-[11px]' : undefined} onClick={() => navigateToEditor(true)}>{t('suite.createVersion')}</Button>
) : null}
{allowed.has('YANK') ? (
<Button variant="destructive" size={compact ? 'sm' : 'default'} className={compact ? 'h-6 px-2 text-[11px]' : undefined} onClick={() => setYankOpen(true)}>{t('suite.yankVersion')}</Button>
<Button data-analytics-id="suite.version.yank" variant="destructive" size={compact ? 'sm' : 'default'} className={compact ? 'h-6 px-2 text-[11px]' : undefined} onClick={() => setYankOpen(true)}>{t('suite.yankVersion')}</Button>
) : null}
{allowed.has('HIDE') || allowed.has('RESTORE') ? (
<Button variant="outline" size={compact ? 'sm' : 'default'} className={compact ? 'h-6 px-2 text-[11px]' : undefined} onClick={() => setConfirmAction(suite.hidden ? 'restore' : 'hide')}>
<Button data-analytics-id={suite.hidden ? 'suite.restore.request' : 'suite.hide.request'} variant="outline" size={compact ? 'sm' : 'default'} className={compact ? 'h-6 px-2 text-[11px]' : undefined} onClick={() => setConfirmAction(suite.hidden ? 'restore' : 'hide')}>
{t(suite.hidden ? 'suite.restore' : 'suite.hide')}
</Button>
) : null}
{allowed.has('ARCHIVE') || allowed.has('UNARCHIVE') ? (
<Button
<Button data-analytics-id={suite.suiteStatus === 'ARCHIVED' ? 'suite.unarchive.request' : 'suite.archive.request'}
variant="outline"
size={compact ? 'sm' : 'default'}
className={compact ? 'h-6 px-2 text-[11px]' : undefined}
@ -146,7 +146,7 @@ export function SuiteManagementActions({ suite, compact = false }: { suite: Skil
</Button>
) : null}
{allowed.has('DELETE') ? (
<Button
<Button data-analytics-id="suite.delete.request"
variant="destructive"
size={compact ? 'sm' : 'default'}
className={compact ? 'h-6 px-2 text-[11px]' : undefined}
@ -158,6 +158,8 @@ export function SuiteManagementActions({ suite, compact = false }: { suite: Skil
</div>
<ConfirmDialog
confirmAnalyticsId={confirmAction === 'hide' ? 'suite.hide.confirm' : confirmAction === 'restore' ? 'suite.restore.confirm' : confirmAction === 'archive' ? 'suite.archive.confirm' : confirmAction === 'unarchive' ? 'suite.unarchive.confirm' : confirmAction === 'delete' ? 'suite.delete.confirm' : undefined}
cancelAnalyticsId={confirmAction === 'hide' ? 'suite.hide.cancel' : confirmAction === 'restore' ? 'suite.restore.cancel' : confirmAction === 'archive' ? 'suite.archive.cancel' : confirmAction === 'unarchive' ? 'suite.unarchive.cancel' : confirmAction === 'delete' ? 'suite.delete.cancel' : undefined}
open={confirmAction !== null}
onOpenChange={(open) => { if (!open) setConfirmAction(null) }}
title={confirmTitle}
@ -168,7 +170,7 @@ export function SuiteManagementActions({ suite, compact = false }: { suite: Skil
/>
<Dialog open={yankOpen} onOpenChange={setYankOpen}>
<DialogContent>
<DialogContent closeAnalyticsId="suite.version.yank.cancel">
<DialogHeader>
<DialogTitle>{t('suite.yankConfirmTitle')}</DialogTitle>
<DialogDescription>{t('suite.yankConfirmDescription', { version: suite.version })}</DialogDescription>
@ -179,8 +181,8 @@ export function SuiteManagementActions({ suite, compact = false }: { suite: Skil
placeholder={t('suite.yankReasonPlaceholder')}
/>
<DialogFooter>
<Button variant="outline" onClick={() => setYankOpen(false)}>{t('suite.cancel')}</Button>
<Button
<Button data-analytics-id="suite.version.yank.cancel" variant="outline" onClick={() => setYankOpen(false)}>{t('suite.cancel')}</Button>
<Button data-analytics-id="suite.version.yank.confirm"
variant="destructive"
disabled={!yankReason.trim() || yankMutation.isPending}
onClick={yank}

View file

@ -24,7 +24,7 @@ export function SuiteMemberTable({ suite, returnTo, management = false, onEdit }
{t(management ? 'suite.management.membersSnapshotDescription' : 'suite.membersSnapshotDescription')}
</p>
{management && onEdit ? (
<button type="button" className={cn(buttonVariants({ variant: 'soft', size: 'sm' }), 'h-6 px-2 text-[11px]')} onClick={onEdit}>
<button data-analytics-id="suite.members.edit" type="button" className={cn(buttonVariants({ variant: 'soft', size: 'sm' }), 'h-6 px-2 text-[11px]')} onClick={onEdit}>
{t('suite.management.editMembers')}
</button>
) : null}
@ -68,7 +68,7 @@ export function SuiteMemberTable({ suite, returnTo, management = false, onEdit }
className="grid gap-2 px-3 py-2 text-xs md:grid-cols-[minmax(200px,1.25fr)_88px_minmax(160px,1fr)_100px_108px] md:items-center md:gap-3"
>
{navigable ? (
<Link
<Link data-analytics-id="skill.detail.open"
to="/space/$namespace/$slug"
params={{ namespace: member.namespace, slug: member.slug }}
search={{ returnTo, version: member.version }}
@ -94,7 +94,7 @@ export function SuiteMemberTable({ suite, returnTo, management = false, onEdit }
</span>
<div className="text-left md:text-right">
{navigable ? (
<Link
<Link data-analytics-id="skill.version.open"
to="/space/$namespace/$slug"
params={{ namespace: member.namespace, slug: member.slug }}
search={{ returnTo, version: member.version }}

View file

@ -92,7 +92,7 @@ export function SuiteVersionLedger({
return (
<div key={version.id}>
<div className="grid gap-1.5 px-3 py-2 text-xs md:grid-cols-[84px_104px_minmax(112px,1fr)_136px_88px] md:items-center md:gap-2.5">
<button
<button data-analytics-id="suite.version.expand"
type="button"
className="flex items-center gap-1.5 text-left font-mono font-semibold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/70"
aria-expanded={expanded}
@ -115,7 +115,7 @@ export function SuiteVersionLedger({
<span className="text-[11px] text-muted-foreground">
{formatLocalDateTime(version.publishedAt || version.createdAt, i18n.language)}
</span>
<Button
<Button data-analytics-id="suite.version.select"
type="button"
size="sm"
variant="soft"
@ -188,13 +188,13 @@ function ExpandedVersion({
{management ? (
<div className="mt-3 flex flex-wrap gap-1.5">
{detail.allowedActions.includes('EDIT') && onEditVersion ? (
<Button size="sm" variant="soft" className="h-6 px-2 text-[11px]" onClick={() => onEditVersion(detail)}>
<Button data-analytics-id="suite.draft.edit" size="sm" variant="soft" className="h-6 px-2 text-[11px]" onClick={() => onEditVersion(detail)}>
{t('suite.editDraft')}
</Button>
) : null}
{(detail.allowedActions.includes('SUBMIT') || detail.allowedActions.includes('PUBLISH_PRIVATE'))
&& onSubmitVersion ? (
<Button size="sm" className="h-6 px-2 text-[11px]" onClick={() => onSubmitVersion(detail)}>
<Button data-analytics-id={detail.visibility === 'PRIVATE' ? 'suite.publish.direct.request' : 'suite.review.submit.request'} size="sm" className="h-6 px-2 text-[11px]" onClick={() => onSubmitVersion(detail)}>
{detail.visibility === 'PRIVATE' ? t('suite.publishDirectly') : t('suite.submitReview')}
</Button>
) : null}
@ -218,7 +218,7 @@ function ExpandedVersion({
return (
<div key={`${memberKey(member)}-${kind}`} className="grid gap-1.5 px-2.5 py-1.5 text-[11px] sm:grid-cols-[minmax(180px,1fr)_80px_80px_96px] sm:items-center sm:gap-2.5">
{navigable ? (
<Link
<Link data-analytics-id="skill.detail.open"
to="/space/$namespace/$slug"
params={{ namespace: member.namespace, slug: member.slug }}
search={{ returnTo, version: member.version }}

View file

@ -23,7 +23,7 @@ export function SuiteWorkspaceHeader({
return (
<header className="space-y-2">
{backLabel && onBack ? (
<Button
<Button data-analytics-id="suite.workspace.back"
type="button"
variant="ghost"
size="sm"

View file

@ -141,7 +141,7 @@ export function CreateTokenDialog({ children, existingNames = [] }: CreateTokenD
setOpen(nextOpen)
}}>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent>
<DialogContent closeAnalyticsId={createdToken ? 'account.token.created.close' : 'account.token.create.cancel'}>
{!createdToken ? (
<>
<DialogHeader className="text-center">
@ -153,7 +153,7 @@ export function CreateTokenDialog({ children, existingNames = [] }: CreateTokenD
<div className="space-y-4 py-4">
<div className="space-y-2">
<Label htmlFor="token-name">{t('createToken.nameLabel')}</Label>
<Input
<Input data-analytics-id="account.token.create"
id="token-name"
placeholder={t('createToken.namePlaceholder')}
value={name}
@ -190,15 +190,15 @@ export function CreateTokenDialog({ children, existingNames = [] }: CreateTokenD
setExpiresAtError(null)
}}
>
<SelectTrigger id="token-expiration">
<SelectTrigger data-analytics-id="account.token.create.expiry.interact" id="token-expiration">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="never">{t('createToken.expirationNever')}</SelectItem>
<SelectItem value="7d">{t('createToken.expiration7d')}</SelectItem>
<SelectItem value="30d">{t('createToken.expiration30d')}</SelectItem>
<SelectItem value="90d">{t('createToken.expiration90d')}</SelectItem>
<SelectItem value="custom">{t('createToken.expirationCustom')}</SelectItem>
<SelectItem data-analytics-id="account.token.create.expiry.never" value="never">{t('createToken.expirationNever')}</SelectItem>
<SelectItem data-analytics-id="account.token.create.expiry.week" value="7d">{t('createToken.expiration7d')}</SelectItem>
<SelectItem data-analytics-id="account.token.create.expiry.month" value="30d">{t('createToken.expiration30d')}</SelectItem>
<SelectItem data-analytics-id="account.token.create.expiry.quarter" value="90d">{t('createToken.expiration90d')}</SelectItem>
<SelectItem data-analytics-id="account.token.create.expiry.custom" value="custom">{t('createToken.expirationCustom')}</SelectItem>
</SelectContent>
</Select>
{expirationMode === 'custom' ? (
@ -226,10 +226,10 @@ export function CreateTokenDialog({ children, existingNames = [] }: CreateTokenD
<p className="text-sm text-red-600">{createMutation.error.message}</p>
) : null}
<DialogFooter className="sm:justify-center sm:space-x-3">
<Button variant="outline" onClick={handleClose}>
<Button data-analytics-id="account.token.create.cancel" variant="outline" onClick={handleClose}>
{t('dialog.cancel')}
</Button>
<Button
<Button data-analytics-id="account.token.create"
onClick={handleCreate}
disabled={!normalizedName || hasDuplicateName || createMutation.isPending}
>
@ -262,10 +262,10 @@ export function CreateTokenDialog({ children, existingNames = [] }: CreateTokenD
</div>
</div>
<DialogFooter className="sm:justify-center sm:space-x-3">
<Button onClick={handleCopyToken}>
<Button data-analytics-id="account.token.copy" onClick={handleCopyToken}>
{t('createToken.copyToken')}
</Button>
<Button variant="outline" onClick={handleClose}>
<Button data-analytics-id="account.token.created.close" variant="outline" onClick={handleClose}>
{t('dialog.close')}
</Button>
</DialogFooter>

View file

@ -178,7 +178,7 @@ export function TokenList() {
<div className="flex items-center justify-between">
<h2 className="text-xl font-semibold">{t('token.title')}</h2>
<CreateTokenDialog existingNames={[]}>
<Button>{t('token.createNew')}</Button>
<Button data-analytics-id="account.token.open">{t('token.createNew')}</Button>
</CreateTokenDialog>
</div>
<div className="rounded-2xl border border-destructive/30 bg-destructive/5 px-5 py-6 text-sm text-destructive">
@ -193,7 +193,7 @@ export function TokenList() {
<div className="flex items-center justify-between">
<h2 className="text-xl font-semibold">{t('token.title')}</h2>
<CreateTokenDialog existingNames={tokens.map((token) => token.name)}>
<Button>{t('token.createNew')}</Button>
<Button data-analytics-id="account.token.open">{t('token.createNew')}</Button>
</CreateTokenDialog>
</div>
<p className="text-sm text-muted-foreground">{t('token.copyHint')}</p>
@ -230,7 +230,7 @@ export function TokenList() {
<TableCell>{formatDate(token.expiresAt, t('token.neverExpires'))}</TableCell>
<TableCell className="text-center">
<div className="flex justify-center gap-2">
<Button
<Button data-analytics-id="account.token.expiration.edit"
variant="outline"
size="sm"
onClick={() => handleEditExpiration(token)}
@ -239,7 +239,7 @@ export function TokenList() {
<Pencil className="mr-1 h-4 w-4" />
{t('token.editExpiration')}
</Button>
<Button
<Button data-analytics-id="account.token.revoke"
variant="destructive"
size="sm"
onClick={() => handleDelete(token.id, token.name)}
@ -257,10 +257,10 @@ export function TokenList() {
)}
{tokenPage && tokenPage.total > PAGE_SIZE ? (
<Pagination page={page} totalPages={totalPages} onPageChange={setPage} />
<Pagination analyticsId="account.token.paginate" page={page} totalPages={totalPages} onPageChange={setPage} />
) : null}
<ConfirmDialog
<ConfirmDialog confirmAnalyticsId="account.token.revoke.confirm" cancelAnalyticsId="account.token.revoke.cancel"
open={deleteDialog.open}
onOpenChange={(open) => setDeleteDialog({ ...deleteDialog, open })}
title={t('token.deleteTitle')}
@ -271,7 +271,7 @@ export function TokenList() {
/>
<Dialog open={expirationDialog.open} onOpenChange={(open) => setExpirationDialog((current) => ({ ...current, open }))}>
<DialogContent>
<DialogContent closeAnalyticsId="account.token.expiration.cancel">
<DialogHeader className="min-w-0">
<DialogTitle>{t('token.editExpirationTitle')}</DialogTitle>
<DialogDescription className="break-all">
@ -288,15 +288,15 @@ export function TokenList() {
mode: value as TokenExpirationMode,
}))}
>
<SelectTrigger id="token-expiration-mode">
<SelectTrigger data-analytics-id="account.token.edit.expiry.interact" id="token-expiration-mode">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="never">{t('createToken.expirationNever')}</SelectItem>
<SelectItem value="7d">{t('createToken.expiration7d')}</SelectItem>
<SelectItem value="30d">{t('createToken.expiration30d')}</SelectItem>
<SelectItem value="90d">{t('createToken.expiration90d')}</SelectItem>
<SelectItem value="custom">{t('createToken.expirationCustom')}</SelectItem>
<SelectItem data-analytics-id="account.token.edit.expiry.never" value="never">{t('createToken.expirationNever')}</SelectItem>
<SelectItem data-analytics-id="account.token.edit.expiry.week" value="7d">{t('createToken.expiration7d')}</SelectItem>
<SelectItem data-analytics-id="account.token.edit.expiry.month" value="30d">{t('createToken.expiration30d')}</SelectItem>
<SelectItem data-analytics-id="account.token.edit.expiry.quarter" value="90d">{t('createToken.expiration90d')}</SelectItem>
<SelectItem data-analytics-id="account.token.edit.expiry.custom" value="custom">{t('createToken.expirationCustom')}</SelectItem>
</SelectContent>
</Select>
</div>
@ -317,10 +317,10 @@ export function TokenList() {
) : null}
</div>
<DialogFooter>
<Button variant="outline" onClick={() => setExpirationDialog({ open: false, mode: 'never', customExpiresAt: '' })}>
<Button data-analytics-id="account.token.expiration.cancel" variant="outline" onClick={() => setExpirationDialog({ open: false, mode: 'never', customExpiresAt: '' })}>
{t('dialog.cancel')}
</Button>
<Button onClick={confirmExpirationUpdate} disabled={updateExpirationMutation.isPending}>
<Button data-analytics-id="account.token.expiration.save" onClick={confirmExpirationUpdate} disabled={updateExpirationMutation.isPending}>
{updateExpirationMutation.isPending ? t('token.updatingExpiration') : t('token.saveExpiration')}
</Button>
</DialogFooter>

View file

@ -104,10 +104,10 @@ export function AuditLogPage() {
<Card className="p-5">
<div className="mb-4 flex flex-wrap gap-2">
<Button type="button" variant="outline" size="sm" onClick={applySearchIndexRebuildFilter}>
<Button data-analytics-id="admin.audit.rebuild.filter" type="button" variant="outline" size="sm" onClick={applySearchIndexRebuildFilter}>
{t('auditLog.quickFilterSearchRebuild')}
</Button>
<Button type="button" variant="outline" size="sm" onClick={clearFilters}>
<Button data-analytics-id="admin.audit.clear" type="button" variant="outline" size="sm" onClick={clearFilters}>
{t('auditLog.clearFilters')}
</Button>
</div>
@ -120,12 +120,12 @@ export function AuditLogPage() {
setPage(0)
}}
>
<SelectTrigger className="w-[200px]">
<SelectTrigger data-analytics-id="admin.audit.action.interact" className="w-[200px]">
<SelectValue />
</SelectTrigger>
<SelectContent>
{ACTION_OPTIONS.map((option) => (
<SelectItem
<SelectItem data-analytics-id={option.value === '' ? 'admin.audit.action.all' : option.value === 'CLI_PUBLISH' ? 'admin.audit.action.cli.publish' : option.value === 'COMPAT_PUBLISH' ? 'admin.audit.action.compat.publish' : option.value === 'REVIEW_SUBMIT' ? 'admin.audit.action.review.submit' : option.value === 'REVIEW_APPROVE' ? 'admin.audit.action.review.approve' : option.value === 'REVIEW_REJECT' ? 'admin.audit.action.review.reject' : option.value === 'PROMOTION_SUBMIT' ? 'admin.audit.action.promotion.submit' : option.value === 'PROMOTION_APPROVE' ? 'admin.audit.action.promotion.approve' : option.value === 'PROMOTION_REJECT' ? 'admin.audit.action.promotion.reject' : option.value === 'REPORT_SKILL' ? 'admin.audit.action.report' : option.value === 'RESOLVE_SKILL_REPORT' ? 'admin.audit.action.report.resolve' : option.value === 'DISMISS_SKILL_REPORT' ? 'admin.audit.action.report.dismiss' : option.value === 'HIDE_SKILL' ? 'admin.audit.action.hide' : option.value === 'ARCHIVE_SKILL' ? 'admin.audit.action.archive' : option.value === 'UNHIDE_SKILL' ? 'admin.audit.action.unhide' : option.value === 'UNARCHIVE_SKILL' ? 'admin.audit.action.unarchive' : option.value === 'YANK_SKILL_VERSION' ? 'admin.audit.action.version.yank' : 'admin.audit.action.search.rebuild'}
key={option.value || allActionFilterValue}
value={option.value || allActionFilterValue}
>
@ -134,7 +134,7 @@ export function AuditLogPage() {
))}
</SelectContent>
</Select>
<Input
<Input data-analytics-id="admin.audit.user.filter"
placeholder={t('auditLog.userIdPlaceholder')}
value={userIdFilter}
onChange={(e) => {
@ -142,7 +142,7 @@ export function AuditLogPage() {
setPage(0)
}}
/>
<Input
<Input data-analytics-id="admin.audit.request.filter"
placeholder={t('auditLog.requestIdPlaceholder')}
value={requestIdFilter}
onChange={(e) => {
@ -150,7 +150,7 @@ export function AuditLogPage() {
setPage(0)
}}
/>
<Input
<Input data-analytics-id="admin.audit.ip.filter"
placeholder={t('auditLog.ipPlaceholder')}
value={ipFilter}
onChange={(e) => {
@ -158,7 +158,7 @@ export function AuditLogPage() {
setPage(0)
}}
/>
<Input
<Input data-analytics-id="admin.audit.type.filter"
placeholder={t('auditLog.resourceTypePlaceholder')}
value={resourceTypeFilter}
onChange={(e) => {
@ -166,7 +166,7 @@ export function AuditLogPage() {
setPage(0)
}}
/>
<Input
<Input data-analytics-id="admin.audit.resource.filter"
placeholder={t('auditLog.resourceIdPlaceholder')}
value={resourceIdFilter}
onChange={(e) => {
@ -174,7 +174,7 @@ export function AuditLogPage() {
setPage(0)
}}
/>
<Input
<Input data-analytics-id="admin.audit.start.filter"
type="datetime-local"
value={startTimeFilter}
onChange={(e) => {
@ -182,7 +182,7 @@ export function AuditLogPage() {
setPage(0)
}}
/>
<Input
<Input data-analytics-id="admin.audit.end.filter"
type="datetime-local"
value={endTimeFilter}
onChange={(e) => {
@ -239,7 +239,7 @@ export function AuditLogPage() {
{t('auditLog.totalRecords', { total: data.total, page: page + 1 })}
</p>
<div className="flex gap-2">
<Button
<Button data-analytics-id="admin.audit.previous"
variant="outline"
size="sm"
disabled={page === 0}
@ -247,7 +247,7 @@ export function AuditLogPage() {
>
{t('auditLog.prevPage')}
</Button>
<Button
<Button data-analytics-id="admin.audit.next"
variant="outline"
size="sm"
disabled={(page + 1) * 20 >= data.total}

View file

@ -246,7 +246,7 @@ export function AdminLabelsPage() {
<h1 className="mb-2 text-4xl font-bold font-heading">{t('adminLabels.title')}</h1>
<p className="text-lg text-muted-foreground">{t('adminLabels.subtitle')}</p>
</div>
<Button type="button" onClick={openCreateDialog}>
<Button data-analytics-id="admin.label.create" type="button" onClick={openCreateDialog}>
{t('adminLabels.createAction')}
</Button>
</div>
@ -314,10 +314,10 @@ export function AdminLabelsPage() {
<TableCell>{definition.createdAt ? formatLocalDateTime(definition.createdAt, i18n.language) : '-'}</TableCell>
<TableCell>
<div className="flex flex-wrap gap-2">
<Button type="button" size="sm" variant="outline" onClick={() => handleMove(index, -1)} disabled={index === 0 || updateSortOrderMutation.isPending}>
<Button data-analytics-id="admin.label.up" type="button" size="sm" variant="outline" onClick={() => handleMove(index, -1)} disabled={index === 0 || updateSortOrderMutation.isPending}>
{t('adminLabels.moveUp')}
</Button>
<Button
<Button data-analytics-id="admin.label.down"
type="button"
size="sm"
variant="outline"
@ -326,10 +326,10 @@ export function AdminLabelsPage() {
>
{t('adminLabels.moveDown')}
</Button>
<Button type="button" size="sm" variant="outline" onClick={() => openEditDialog(definition)}>
<Button data-analytics-id="admin.label.edit" type="button" size="sm" variant="outline" onClick={() => openEditDialog(definition)}>
{t('adminLabels.editAction')}
</Button>
<Button
<Button data-analytics-id="admin.label.delete"
type="button"
size="sm"
variant="outline"
@ -350,7 +350,7 @@ export function AdminLabelsPage() {
)}
<Dialog open={dialogOpen} onOpenChange={setDialogOpen}>
<DialogContent className="w-[min(calc(100vw-2rem),44rem)]">
<DialogContent closeAnalyticsId={editingSlug ? 'admin.label.edit.cancel' : 'admin.label.create.cancel'} className="w-[min(calc(100vw-2rem),44rem)]">
<DialogHeader>
<DialogTitle>{editingSlug ? t('adminLabels.editDialogTitle') : t('adminLabels.createDialogTitle')}</DialogTitle>
<DialogDescription>
@ -374,12 +374,12 @@ export function AdminLabelsPage() {
value={form.type}
onValueChange={(value) => setForm((current) => ({ ...current, type: value as LabelFormState['type'] }))}
>
<SelectTrigger id="label-type">
<SelectTrigger data-analytics-id="admin.label.type.interact" id="label-type">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="RECOMMENDED">{t('adminLabels.typeRecommended')}</SelectItem>
<SelectItem value="PRIVILEGED">{t('adminLabels.typePrivileged')}</SelectItem>
<SelectItem data-analytics-id="admin.label.type.recommended" value="RECOMMENDED">{t('adminLabels.typeRecommended')}</SelectItem>
<SelectItem data-analytics-id="admin.label.type.privileged" value="PRIVILEGED">{t('adminLabels.typePrivileged')}</SelectItem>
</SelectContent>
</Select>
</div>
@ -389,12 +389,12 @@ export function AdminLabelsPage() {
value={form.visibleInFilter ? 'visible' : 'hidden'}
onValueChange={(value) => setForm((current) => ({ ...current, visibleInFilter: value === 'visible' }))}
>
<SelectTrigger id="label-visibility">
<SelectTrigger data-analytics-id="admin.label.visibility.interact" id="label-visibility">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="visible">{t('adminLabels.visibilityVisible')}</SelectItem>
<SelectItem value="hidden">{t('adminLabels.visibilityHidden')}</SelectItem>
<SelectItem data-analytics-id="admin.label.visibility.visible" value="visible">{t('adminLabels.visibilityVisible')}</SelectItem>
<SelectItem data-analytics-id="admin.label.visibility.hidden" value="hidden">{t('adminLabels.visibilityHidden')}</SelectItem>
</SelectContent>
</Select>
</div>
@ -415,7 +415,7 @@ export function AdminLabelsPage() {
<div className="text-sm font-semibold text-foreground">{t('adminLabels.formTranslations')}</div>
<div className="text-xs text-muted-foreground">{t('adminLabels.formTranslationsHint')}</div>
</div>
<Button type="button" variant="outline" size="sm" onClick={addTranslation}>
<Button data-analytics-id="admin.label.translation.add" type="button" variant="outline" size="sm" onClick={addTranslation}>
{t('adminLabels.addTranslation')}
</Button>
</div>
@ -433,7 +433,7 @@ export function AdminLabelsPage() {
value={translation.displayName}
onChange={(event) => handleTranslationChange(index, 'displayName', event.target.value)}
/>
<Button type="button" variant="outline" onClick={() => removeTranslation(index)}>
<Button data-analytics-id="admin.label.translation.remove" type="button" variant="outline" onClick={() => removeTranslation(index)}>
{t('adminLabels.removeTranslation')}
</Button>
</div>
@ -442,10 +442,10 @@ export function AdminLabelsPage() {
</div>
<DialogFooter>
<Button type="button" variant="outline" onClick={() => setDialogOpen(false)}>
<Button data-analytics-id={editingSlug ? 'admin.label.edit.cancel' : 'admin.label.create.cancel'} type="button" variant="outline" onClick={() => setDialogOpen(false)}>
{t('adminLabels.cancelAction')}
</Button>
<Button
<Button data-analytics-id={editingSlug ? 'admin.label.edit.submit' : 'admin.label.create.submit'}
type="button"
onClick={handleSubmit}
disabled={createMutation.isPending || updateMutation.isPending}
@ -457,7 +457,7 @@ export function AdminLabelsPage() {
</Dialog>
<Dialog open={deleteDialogOpen} onOpenChange={setDeleteDialogOpen}>
<DialogContent>
<DialogContent closeAnalyticsId="admin.label.delete.cancel">
<DialogHeader>
<DialogTitle>{t('adminLabels.deleteDialogTitle')}</DialogTitle>
<DialogDescription>
@ -465,10 +465,10 @@ export function AdminLabelsPage() {
</DialogDescription>
</DialogHeader>
<DialogFooter>
<Button type="button" variant="outline" onClick={() => setDeleteDialogOpen(false)}>
<Button data-analytics-id="admin.label.delete.cancel" type="button" variant="outline" onClick={() => setDeleteDialogOpen(false)}>
{t('adminLabels.cancelAction')}
</Button>
<Button type="button" onClick={handleDelete} disabled={deleteMutation.isPending}>
<Button data-analytics-id="admin.label.delete.confirm" type="button" onClick={handleDelete} disabled={deleteMutation.isPending}>
{t('adminLabels.deleteAction')}
</Button>
</DialogFooter>

View file

@ -334,15 +334,15 @@ export function AdminNamespacesPage() {
<div className="space-y-2">
<Label htmlFor="admin-namespace-search">{t('adminNamespaces.searchLabel')}</Label>
<div className="flex gap-2">
<Input
<Input data-analytics-id="admin.namespace.search"
id="admin-namespace-search"
placeholder={t('adminNamespaces.searchPlaceholder')}
value={keywordInput}
onChange={(event) => setKeywordInput(event.target.value)}
onKeyDown={handleSearchKeyDown}
/>
<Button type="button" onClick={applySearch}>{t('adminNamespaces.searchAction')}</Button>
<Button type="button" variant="outline" onClick={clearSearch} disabled={!keywordInput && !keyword}>
<Button data-analytics-id="admin.namespace.search" type="button" onClick={applySearch}>{t('adminNamespaces.searchAction')}</Button>
<Button data-analytics-id="admin.namespace.clear" type="button" variant="outline" onClick={clearSearch} disabled={!keywordInput && !keyword}>
{t('adminNamespaces.clearSearch')}
</Button>
</div>
@ -353,12 +353,12 @@ export function AdminNamespacesPage() {
value={normalizeSelectValue(statusFilter) ?? ALL_FILTER_VALUE}
onValueChange={(value) => setStatusFilter(value === ALL_FILTER_VALUE ? '' : value)}
>
<SelectTrigger><SelectValue /></SelectTrigger>
<SelectTrigger data-analytics-id="admin.namespace.status.interact"><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem value={ALL_FILTER_VALUE}>{t('adminNamespaces.filterAll')}</SelectItem>
<SelectItem value="ACTIVE">{t('namespaceStatus.active')}</SelectItem>
<SelectItem value="FROZEN">{t('namespaceStatus.frozen')}</SelectItem>
<SelectItem value="ARCHIVED">{t('namespaceStatus.archived')}</SelectItem>
<SelectItem data-analytics-id="admin.namespace.status.filter" value={ALL_FILTER_VALUE}>{t('adminNamespaces.filterAll')}</SelectItem>
<SelectItem data-analytics-id="admin.namespace.status.filter" value="ACTIVE">{t('namespaceStatus.active')}</SelectItem>
<SelectItem data-analytics-id="admin.namespace.status.filter" value="FROZEN">{t('namespaceStatus.frozen')}</SelectItem>
<SelectItem data-analytics-id="admin.namespace.status.filter" value="ARCHIVED">{t('namespaceStatus.archived')}</SelectItem>
</SelectContent>
</Select>
</div>
@ -368,11 +368,11 @@ export function AdminNamespacesPage() {
value={normalizeSelectValue(typeFilter) ?? ALL_FILTER_VALUE}
onValueChange={(value) => setTypeFilter(value === ALL_FILTER_VALUE ? '' : value)}
>
<SelectTrigger><SelectValue /></SelectTrigger>
<SelectTrigger data-analytics-id="admin.namespace.type.interact"><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem value={ALL_FILTER_VALUE}>{t('adminNamespaces.filterAll')}</SelectItem>
<SelectItem value="GLOBAL">{t('adminNamespaces.typeGlobal')}</SelectItem>
<SelectItem value="TEAM">{t('adminNamespaces.typeTeam')}</SelectItem>
<SelectItem data-analytics-id="admin.namespace.type.filter" value={ALL_FILTER_VALUE}>{t('adminNamespaces.filterAll')}</SelectItem>
<SelectItem data-analytics-id="admin.namespace.type.filter" value="GLOBAL">{t('adminNamespaces.typeGlobal')}</SelectItem>
<SelectItem data-analytics-id="admin.namespace.type.filter" value="TEAM">{t('adminNamespaces.typeTeam')}</SelectItem>
</SelectContent>
</Select>
</div>
@ -404,7 +404,7 @@ export function AdminNamespacesPage() {
</TableHeader>
<TableBody>
{namespaces.map((namespace) => (
<TableRow
<TableRow data-analytics-id="admin.namespace.open"
key={namespace.slug}
className={selectedSlug === namespace.slug ? 'bg-secondary/50' : undefined}
onClick={() => setSelectedSlug(namespace.slug)}
@ -428,7 +428,7 @@ export function AdminNamespacesPage() {
))}
</TableBody>
</Table>
{totalPages > 1 ? <Pagination page={page} totalPages={totalPages} onPageChange={setPage} /> : null}
{totalPages > 1 ? <Pagination analyticsId="admin.namespace.paginate" page={page} totalPages={totalPages} onPageChange={setPage} /> : null}
</>
)}
</Card>
@ -453,7 +453,7 @@ export function AdminNamespacesPage() {
<p className="text-sm text-muted-foreground">{t('adminNamespaces.membersDescription')}</p>
</div>
<div className="flex gap-2">
<Button
<Button data-analytics-id="admin.namespace.transfer"
variant="outline"
size="sm"
disabled={!selectedNamespace.permissions.canTransferOwnership}
@ -461,7 +461,7 @@ export function AdminNamespacesPage() {
>
{t('members.transferOwnership')}
</Button>
<Button
<Button data-analytics-id="admin.namespace.member.open"
size="sm"
disabled={!selectedNamespace.permissions.canManageMembers}
onClick={() => openAddMemberDialog(selectedNamespace)}
@ -481,7 +481,7 @@ export function AdminNamespacesPage() {
t={t}
i18nLanguage={i18n.language}
/>
{memberTotalPages > 1 ? <Pagination page={memberPage} totalPages={memberTotalPages} onPageChange={setMemberPage} /> : null}
{memberTotalPages > 1 ? <Pagination analyticsId="admin.namespace.member.paginate" page={memberPage} totalPages={memberTotalPages} onPageChange={setMemberPage} /> : null}
</div>
<div className="space-y-3 rounded-xl border border-destructive/20 bg-destructive/5 p-4">
@ -490,7 +490,7 @@ export function AdminNamespacesPage() {
<p className="text-sm text-muted-foreground">{t('adminNamespaces.governanceDescription')}</p>
</div>
<div className="flex flex-wrap gap-2">
<Button
<Button data-analytics-id="admin.namespace.freeze"
variant="outline"
size="sm"
disabled={!selectedNamespace.permissions.canFreeze}
@ -498,7 +498,7 @@ export function AdminNamespacesPage() {
>
{t('myNamespaces.freeze')}
</Button>
<Button
<Button data-analytics-id="admin.namespace.unfreeze"
variant="outline"
size="sm"
disabled={!selectedNamespace.permissions.canUnfreeze}
@ -506,7 +506,7 @@ export function AdminNamespacesPage() {
>
{t('myNamespaces.unfreeze')}
</Button>
<Button
<Button data-analytics-id="admin.namespace.archive"
variant="destructive"
size="sm"
disabled={!selectedNamespace.permissions.canArchive}
@ -514,7 +514,7 @@ export function AdminNamespacesPage() {
>
{t('myNamespaces.archive')}
</Button>
<Button
<Button data-analytics-id="admin.namespace.restore"
variant="outline"
size="sm"
disabled={!selectedNamespace.permissions.canRestore}
@ -530,7 +530,7 @@ export function AdminNamespacesPage() {
</div>
<Dialog open={addMemberDialog.open} onOpenChange={(open) => (open ? setAddMemberDialog((current) => ({ ...current, open })) : closeAddMemberDialog())}>
<DialogContent>
<DialogContent closeAnalyticsId="admin.namespace.member.cancel">
<DialogHeader>
<DialogTitle>{t('members.addDialogTitle')}</DialogTitle>
<DialogDescription>{t('members.addDialogDescription')}</DialogDescription>
@ -538,7 +538,7 @@ export function AdminNamespacesPage() {
<div className="space-y-4">
<div className="space-y-2">
<Label>{t('members.searchLabel')}</Label>
<Input
<Input data-analytics-id="admin.namespace.member.search"
value={addMemberDialog.search}
placeholder={t('members.searchPlaceholder')}
onChange={(event) => setAddMemberDialog((current) => ({ ...current, search: event.target.value }))}
@ -546,7 +546,7 @@ export function AdminNamespacesPage() {
{candidatesQuery.data && candidatesQuery.data.length > 0 ? (
<div className="max-h-44 space-y-2 overflow-y-auto rounded-lg border border-border/60 p-2">
{candidatesQuery.data.map((candidate) => (
<button
<button data-analytics-id="admin.namespace.member.select"
key={candidate.userId}
type="button"
className="w-full rounded-md px-3 py-2 text-left text-sm hover:bg-secondary"
@ -570,23 +570,23 @@ export function AdminNamespacesPage() {
<div className="space-y-2">
<Label>{t('members.roleLabel')}</Label>
<Select value={addMemberDialog.role} onValueChange={(role) => setAddMemberDialog((current) => ({ ...current, role }))}>
<SelectTrigger><SelectValue /></SelectTrigger>
<SelectTrigger data-analytics-id="admin.namespace.member.role.interact"><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem value="MEMBER">{t('members.roleMember')}</SelectItem>
<SelectItem value="ADMIN">{t('members.roleAdmin')}</SelectItem>
<SelectItem data-analytics-id="admin.namespace.member.role.member" value="MEMBER">{t('members.roleMember')}</SelectItem>
<SelectItem data-analytics-id="admin.namespace.member.role.admin" value="ADMIN">{t('members.roleAdmin')}</SelectItem>
</SelectContent>
</Select>
</div>
</div>
<DialogFooter>
<Button type="button" variant="outline" onClick={closeAddMemberDialog}>{t('dialog.cancel')}</Button>
<Button type="button" disabled={addMemberMutation.isPending} onClick={addMember}>{t('members.addMember')}</Button>
<Button data-analytics-id="admin.namespace.member.cancel" type="button" variant="outline" onClick={closeAddMemberDialog}>{t('dialog.cancel')}</Button>
<Button data-analytics-id="admin.namespace.member.add" type="button" disabled={addMemberMutation.isPending} onClick={addMember}>{t('members.addMember')}</Button>
</DialogFooter>
</DialogContent>
</Dialog>
<Dialog open={transferDialog.open} onOpenChange={(open) => (open ? setTransferDialog((current) => ({ ...current, open })) : closeTransferDialog())}>
<DialogContent>
<DialogContent closeAnalyticsId="admin.namespace.transfer.cancel">
<DialogHeader>
<DialogTitle>{t('members.transferDialogTitle')}</DialogTitle>
<DialogDescription>{t('members.transferDialogDescription')}</DialogDescription>
@ -601,10 +601,10 @@ export function AdminNamespacesPage() {
value={transferDialog.selectedUserId}
onValueChange={(selectedUserId) => setTransferDialog((current) => ({ ...current, selectedUserId }))}
>
<SelectTrigger><SelectValue placeholder={t('members.transferSelectPlaceholder')} /></SelectTrigger>
<SelectTrigger data-analytics-id="admin.namespace.ownership.interact"><SelectValue placeholder={t('members.transferSelectPlaceholder')} /></SelectTrigger>
<SelectContent>
{transferCandidates.map((candidate) => (
<SelectItem key={candidate.userId} value={candidate.userId}>
<SelectItem data-analytics-id="admin.namespace.ownership.select" key={candidate.userId} value={candidate.userId}>
{candidate.displayName || candidate.userId} ({candidate.role})
</SelectItem>
))}
@ -621,8 +621,8 @@ export function AdminNamespacesPage() {
</div>
</div>
<DialogFooter>
<Button type="button" variant="outline" onClick={closeTransferDialog}>{t('dialog.cancel')}</Button>
<Button
<Button data-analytics-id="admin.namespace.transfer.cancel" type="button" variant="outline" onClick={closeTransferDialog}>{t('dialog.cancel')}</Button>
<Button data-analytics-id="admin.namespace.transfer.confirm"
type="button"
variant="destructive"
disabled={!transferDialog.selectedUserId || transferDialog.confirmSlug !== transferDialog.slug || transferMutation.isPending}
@ -634,7 +634,7 @@ export function AdminNamespacesPage() {
</DialogContent>
</Dialog>
<ConfirmDialog
<ConfirmDialog confirmAnalyticsId="admin.namespace.member.remove.confirm" cancelAnalyticsId="admin.namespace.member.remove.cancel"
open={!!pendingRemoval}
onOpenChange={(open) => {
if (!open) setPendingRemoval(null)
@ -655,7 +655,7 @@ export function AdminNamespacesPage() {
}
}}
>
<DialogContent>
<DialogContent closeAnalyticsId={pendingLifecycleAction?.action === 'freeze' ? 'admin.namespace.freeze.cancel' : pendingLifecycleAction?.action === 'unfreeze' ? 'admin.namespace.unfreeze.cancel' : pendingLifecycleAction?.action === 'archive' ? 'admin.namespace.archive.cancel' : 'admin.namespace.restore.cancel'}>
<DialogHeader>
<DialogTitle>{pendingLifecycleAction ? t(`adminNamespaces.${pendingLifecycleAction.action}ConfirmTitle`) : ''}</DialogTitle>
<DialogDescription>
@ -673,8 +673,8 @@ export function AdminNamespacesPage() {
</div>
) : null}
<DialogFooter>
<Button type="button" variant="outline" onClick={() => setPendingLifecycleAction(null)}>{t('dialog.cancel')}</Button>
<Button
<Button data-analytics-id={pendingLifecycleAction?.action === 'freeze' ? 'admin.namespace.freeze.cancel' : pendingLifecycleAction?.action === 'unfreeze' ? 'admin.namespace.unfreeze.cancel' : pendingLifecycleAction?.action === 'archive' ? 'admin.namespace.archive.cancel' : 'admin.namespace.restore.cancel'} type="button" variant="outline" onClick={() => setPendingLifecycleAction(null)}>{t('dialog.cancel')}</Button>
<Button data-analytics-id={pendingLifecycleAction?.action === 'freeze' ? 'admin.namespace.freeze.confirm' : pendingLifecycleAction?.action === 'unfreeze' ? 'admin.namespace.unfreeze.confirm' : pendingLifecycleAction?.action === 'archive' ? 'admin.namespace.archive.confirm' : 'admin.namespace.restore.confirm'}
type="button"
variant={pendingLifecycleAction?.action === 'archive' ? 'destructive' : 'default'}
disabled={lifecycleMutation.isPending}
@ -796,13 +796,13 @@ function MembersTable({
{canManageMembers && !isOwner ? (
<div className="flex flex-wrap items-center gap-2">
<Select value={roleValue} onValueChange={(role) => onDraftRoleChange(member.userId, role)}>
<SelectTrigger className="w-32"><SelectValue /></SelectTrigger>
<SelectTrigger data-analytics-id="admin.namespace.member.role.draft.interact" className="w-32"><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem value="MEMBER">{t('members.roleMember')}</SelectItem>
<SelectItem value="ADMIN">{t('members.roleAdmin')}</SelectItem>
<SelectItem data-analytics-id="admin.namespace.member.role.draft.member" value="MEMBER">{t('members.roleMember')}</SelectItem>
<SelectItem data-analytics-id="admin.namespace.member.role.draft.admin" value="ADMIN">{t('members.roleAdmin')}</SelectItem>
</SelectContent>
</Select>
<Button
<Button data-analytics-id="admin.namespace.member.role"
type="button"
variant="outline"
size="sm"
@ -822,7 +822,7 @@ function MembersTable({
{formatLocalDateTime(member.createdAt, i18nLanguage, { dateStyle: 'medium' })}
</TableCell>
<TableCell className="text-right">
<Button
<Button data-analytics-id="admin.namespace.member.remove"
type="button"
variant="destructive"
size="sm"

View file

@ -128,7 +128,7 @@ export function SystemConfigPage() {
<span className="block text-sm text-muted-foreground">{t(`systemConfig.${help}`)}</span>
</span>
<span className="relative shrink-0">
<input type="checkbox" className="peer sr-only" checked={draft[field]} disabled={updateSettings.isPending}
<input data-analytics-id={field === 'passwordLoginEnabled' ? 'admin.auth.password.toggle' : 'admin.auth.registration.toggle'} type="checkbox" className="peer sr-only" checked={draft[field]} disabled={updateSettings.isPending}
onChange={(event) => setDraft({ ...draft, [field]: event.target.checked })}
aria-label={t(`systemConfig.${title}`)} />
<span aria-hidden="true" className="block h-6 w-11 rounded-full bg-muted-foreground/35 transition-colors peer-checked:bg-primary peer-focus-visible:ring-4 peer-focus-visible:ring-ring/30 peer-disabled:opacity-50" />
@ -142,11 +142,11 @@ export function SystemConfigPage() {
) : null}
<div className="flex flex-wrap items-center justify-end gap-3 border-t pt-4">
{settingsDirty ? <span role="status" className="mr-auto text-sm text-muted-foreground">{t('systemConfig.unsaved')}</span> : null}
<Button type="button" variant="outline" disabled={!settingsDirty || updateSettings.isPending}
<Button data-analytics-id="admin.auth.discard" type="button" variant="outline" disabled={!settingsDirty || updateSettings.isPending}
onClick={() => setDraft({ passwordLoginEnabled: settings.data!.passwordLoginEnabled, selfRegistrationEnabled: settings.data!.selfRegistrationEnabled })}>
{t('systemConfig.discard')}
</Button>
<Button type="button" disabled={!settingsDirty || updateSettings.isPending} onClick={() => {
<Button data-analytics-id="admin.auth.save" type="button" disabled={!settingsDirty || updateSettings.isPending} onClick={() => {
if (settings.data!.passwordLoginEnabled && !draft.passwordLoginEnabled) setConfirmLoginOff(true)
else void saveSettings()
}}>{updateSettings.isPending ? t('systemConfig.saving') : t('systemConfig.saveChanges')}</Button>
@ -155,7 +155,7 @@ export function SystemConfigPage() {
) : null}
</CardContent>
</Card>
<ConfirmDialog open={confirmLoginOff} onOpenChange={setConfirmLoginOff}
<ConfirmDialog confirmAnalyticsId="admin.auth.confirm" cancelAnalyticsId="admin.auth.cancel" open={confirmLoginOff} onOpenChange={setConfirmLoginOff}
closeOnConfirm={false}
title={t('systemConfig.lockoutTitle')} description={<>{t('systemConfig.lockoutWarning')}{error ? <span role="alert" className="mt-3 block text-destructive">{error}</span> : null}</>}
confirmText={t('systemConfig.confirmDisableLogin')} variant="destructive"
@ -171,7 +171,7 @@ export function SystemConfigPage() {
<li>{t('systemConfig.ruleNoMerge')}</li>
<li>{t('systemConfig.ruleUnavailable')}</li>
</ul>
<form className="grid items-end gap-4 rounded-xl border border-border/60 bg-muted/20 p-4 sm:grid-cols-2 lg:grid-cols-[1fr_1.2fr_1fr_auto]" onSubmit={(event) => {
<form data-analytics-id="admin.role.rule.create" className="grid items-end gap-4 rounded-xl border border-border/60 bg-muted/20 p-4 sm:grid-cols-2 lg:grid-cols-[1fr_1.2fr_1fr_auto]" onSubmit={(event) => {
event.preventDefault()
void run(async () => {
await createRule.mutateAsync({ providerCode: providerCode.trim(), email: email.trim(), roleCode })
@ -186,7 +186,7 @@ export function SystemConfigPage() {
<Input id="role-grant-email" placeholder="admin@example.com" type="email" value={email}
onChange={(event) => setEmail(event.target.value)} required /></div>
<div className="space-y-1.5"><Label htmlFor="role-grant-role">{t('systemConfig.role')}</Label>
<select id="role-grant-role" className="h-9 w-full rounded-md border border-border/60 bg-background px-3 text-sm" value={roleCode}
<select data-analytics-id="admin.role.rule.role.select" id="role-grant-role" className="h-9 w-full rounded-md border border-border/60 bg-background px-3 text-sm" value={roleCode}
onChange={(event) => setRoleCode(event.target.value)}>
{(roles.data ?? []).map((role) => <option key={role.code} value={role.code}>{role.name}</option>)}
</select></div>
@ -215,7 +215,7 @@ export function SystemConfigPage() {
<div className="flex flex-wrap items-end gap-2 border-t pt-3">
<div className="min-w-40 flex-1 space-y-1.5 sm:flex-none">
<Label htmlFor={`rule-role-${rule.id}`}>{t('systemConfig.role')}</Label>
<select id={`rule-role-${rule.id}`} className="h-9 w-full rounded-md border border-border/60 bg-background px-3 text-sm"
<select data-analytics-id="admin.role.rule.role.edit" id={`rule-role-${rule.id}`} className="h-9 w-full rounded-md border border-border/60 bg-background px-3 text-sm"
value={ruleDrafts[rule.id] ?? rule.roleCode} disabled={updateRule.isPending}
onChange={(event) => setRuleDrafts({ ...ruleDrafts, [rule.id]: event.target.value })}>
{(roles.data ?? []).map((role) => <option key={role.code} value={role.code}>{role.name}</option>)}
@ -223,11 +223,11 @@ export function SystemConfigPage() {
</div>
{ruleDrafts[rule.id] && ruleDrafts[rule.id] !== rule.roleCode ? (
<>
<Button type="button" size="sm" variant="outline" disabled={updateRule.isPending} onClick={() => setRuleDrafts({ ...ruleDrafts, [rule.id]: rule.roleCode })}>{t('systemConfig.discard')}</Button>
<Button type="button" size="sm" disabled={updateRule.isPending} onClick={() => changeRole(rule)}>{t('systemConfig.saveChanges')}</Button>
<Button data-analytics-id="admin.role.rule.discard" type="button" size="sm" variant="outline" disabled={updateRule.isPending} onClick={() => setRuleDrafts({ ...ruleDrafts, [rule.id]: rule.roleCode })}>{t('systemConfig.discard')}</Button>
<Button data-analytics-id="admin.role.rule.save" type="button" size="sm" disabled={updateRule.isPending} onClick={() => changeRole(rule)}>{t('systemConfig.saveChanges')}</Button>
</>
) : null}
<Button type="button" size="sm" variant="ghost" className="sm:ml-auto" disabled={disableRule.isPending}
<Button data-analytics-id="admin.role.rule.disable" type="button" size="sm" variant="ghost" className="sm:ml-auto" disabled={disableRule.isPending}
onClick={() => setRuleToDisable(rule)}>{t('systemConfig.disable')}</Button>
</div>
) : <p className="text-xs text-muted-foreground">{t('systemConfig.role')}: {roles.data?.find((role) => role.code === rule.roleCode)?.name ?? rule.roleCode}</p>}
@ -236,7 +236,7 @@ export function SystemConfigPage() {
</div>
</CardContent>
</Card>
<ConfirmDialog open={!!ruleToDisable} onOpenChange={(open) => { if (!open) setRuleToDisable(null) }}
<ConfirmDialog confirmAnalyticsId="admin.role.rule.disable.confirm" cancelAnalyticsId="admin.role.rule.disable.cancel" open={!!ruleToDisable} onOpenChange={(open) => { if (!open) setRuleToDisable(null) }}
closeOnConfirm={false}
title={t('systemConfig.disableTitle')} description={<>{t('systemConfig.disableConfirm')}{error ? <span role="alert" className="mt-3 block text-destructive">{error}</span> : null}</>}
confirmText={t('systemConfig.disable')} variant="destructive"

View file

@ -160,7 +160,7 @@ export function AdminUsersPage() {
<div className="space-y-2">
<Label htmlFor="admin-user-search">{t('adminUsers.searchLabel')}</Label>
<div className="flex gap-2">
<Input
<Input data-analytics-id="admin.user.search"
id="admin-user-search"
placeholder={t('adminUsers.searchPlaceholder')}
value={searchInput}
@ -168,10 +168,10 @@ export function AdminUsersPage() {
onKeyDown={handleSearchKeyDown}
className="flex-1"
/>
<Button type="button" onClick={applySearch}>
<Button data-analytics-id="admin.user.search" type="button" onClick={applySearch}>
{t('adminUsers.searchAction')}
</Button>
<Button type="button" variant="outline" onClick={clearSearch} disabled={!searchInput && !search}>
<Button data-analytics-id="admin.user.clear" type="button" variant="outline" onClick={clearSearch} disabled={!searchInput && !search}>
{t('adminUsers.clearSearch')}
</Button>
</div>
@ -183,14 +183,14 @@ export function AdminUsersPage() {
value={normalizeSelectValue(statusFilter) ?? allStatusFilterValue}
onValueChange={(value) => setStatusFilter(value === allStatusFilterValue ? '' : value)}
>
<SelectTrigger id="admin-user-status">
<SelectTrigger data-analytics-id="admin.user.status.interact" id="admin-user-status">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value={allStatusFilterValue}>{t('adminUsers.filterAll')}</SelectItem>
<SelectItem value="ACTIVE">{t('adminUsers.filterActive')}</SelectItem>
<SelectItem value="PENDING">{t('adminUsers.filterPending')}</SelectItem>
<SelectItem value="DISABLED">{t('adminUsers.filterDisabled')}</SelectItem>
<SelectItem data-analytics-id="admin.user.status.filter" value={allStatusFilterValue}>{t('adminUsers.filterAll')}</SelectItem>
<SelectItem data-analytics-id="admin.user.status.filter" value="ACTIVE">{t('adminUsers.filterActive')}</SelectItem>
<SelectItem data-analytics-id="admin.user.status.filter" value="PENDING">{t('adminUsers.filterPending')}</SelectItem>
<SelectItem data-analytics-id="admin.user.status.filter" value="DISABLED">{t('adminUsers.filterDisabled')}</SelectItem>
</SelectContent>
</Select>
</div>
@ -229,7 +229,7 @@ export function AdminUsersPage() {
<TableCell>
<div className="flex items-center gap-2">
<span className="font-mono text-xs text-muted-foreground min-w-0 max-w-[14rem] truncate" title={user.userId}>{user.userId}</span>
<CopyButton text={user.userId} ariaLabel={t('adminUsers.copyUserId', { username: user.username })} />
<CopyButton analyticsId="admin.user.identifier.copy" text={user.userId} ariaLabel={t('adminUsers.copyUserId', { username: user.username })} />
</div>
</TableCell>
<TableCell>{user.email || '-'}</TableCell>
@ -250,7 +250,7 @@ export function AdminUsersPage() {
<TableCell>{formatDate(user.createdAt)}</TableCell>
<TableCell>
<div className="flex gap-2">
<Button
<Button data-analytics-id="admin.user.role.edit"
variant="outline"
size="sm"
onClick={() => handleChangeRole(user)}
@ -258,7 +258,7 @@ export function AdminUsersPage() {
{t('adminUsers.changeRole')}
</Button>
{user.status === 'PENDING' && (
<Button
<Button data-analytics-id="admin.user.approve"
variant="outline"
size="sm"
onClick={() => approveUserMutation.mutate(user.userId)}
@ -267,7 +267,7 @@ export function AdminUsersPage() {
</Button>
)}
{user.status === 'ACTIVE' ? (
<Button
<Button data-analytics-id="admin.user.disable"
variant="outline"
size="sm"
onClick={() => handleToggleStatus(user, 'ban')}
@ -275,7 +275,7 @@ export function AdminUsersPage() {
{t('adminUsers.disable')}
</Button>
) : (
<Button
<Button data-analytics-id="admin.user.enable"
variant="outline"
size="sm"
onClick={() => handleToggleStatus(user, 'unban')}
@ -283,7 +283,7 @@ export function AdminUsersPage() {
{t('adminUsers.enable')}
</Button>
)}
<Button
<Button data-analytics-id="admin.user.password.reset"
variant="outline"
size="sm"
onClick={() => handleTriggerPasswordReset(user)}
@ -303,7 +303,7 @@ export function AdminUsersPage() {
{t('adminUsers.totalRecords', { total: data.total, page: page + 1 })}
</p>
<div className="flex gap-2">
<Button
<Button data-analytics-id="admin.user.previous"
variant="outline"
size="sm"
disabled={page === 0}
@ -311,7 +311,7 @@ export function AdminUsersPage() {
>
{t('adminUsers.prevPage')}
</Button>
<Button
<Button data-analytics-id="admin.user.next"
variant="outline"
size="sm"
disabled={(page + 1) * 20 >= data.total}
@ -325,7 +325,7 @@ export function AdminUsersPage() {
)}
<Dialog open={roleDialogOpen} onOpenChange={setRoleDialogOpen}>
<DialogContent>
<DialogContent closeAnalyticsId="admin.user.role.cancel">
<DialogHeader>
<DialogTitle>{t('adminUsers.changeRoleTitle')}</DialogTitle>
<DialogDescription>
@ -336,12 +336,12 @@ export function AdminUsersPage() {
<div className="space-y-2">
<Label htmlFor="role">{t('adminUsers.roleLabel')}</Label>
<Select value={newRole} onValueChange={setNewRole}>
<SelectTrigger id="role">
<SelectTrigger data-analytics-id="admin.user.role.interact" id="role">
<SelectValue />
</SelectTrigger>
<SelectContent>
{roleOptions.map((roleOption) => (
<SelectItem key={roleOption.value} value={roleOption.value}>
<SelectItem data-analytics-id="admin.user.role.select" key={roleOption.value} value={roleOption.value}>
{roleOption.label}
</SelectItem>
))}
@ -350,10 +350,10 @@ export function AdminUsersPage() {
</div>
</div>
<DialogFooter>
<Button variant="outline" onClick={() => setRoleDialogOpen(false)}>
<Button data-analytics-id="admin.user.role.cancel" variant="outline" onClick={() => setRoleDialogOpen(false)}>
{t('dialog.cancel')}
</Button>
<Button
<Button data-analytics-id="admin.user.role.confirm"
onClick={confirmRoleChange}
disabled={
updateRoleMutation.isPending
@ -369,7 +369,7 @@ export function AdminUsersPage() {
</Dialog>
<Dialog open={confirmDialogOpen} onOpenChange={setConfirmDialogOpen}>
<DialogContent>
<DialogContent closeAnalyticsId={actionType === 'ban' ? 'admin.user.disable.cancel' : actionType === 'unban' ? 'admin.user.enable.cancel' : 'admin.user.password.reset.cancel'}>
<DialogHeader>
<DialogTitle>{t('adminUsers.confirmAction')}</DialogTitle>
<DialogDescription>
@ -381,10 +381,10 @@ export function AdminUsersPage() {
</DialogDescription>
</DialogHeader>
<DialogFooter>
<Button variant="outline" onClick={() => setConfirmDialogOpen(false)}>
<Button data-analytics-id={actionType === 'ban' ? 'admin.user.disable.cancel' : actionType === 'unban' ? 'admin.user.enable.cancel' : 'admin.user.password.reset.cancel'} variant="outline" onClick={() => setConfirmDialogOpen(false)}>
{t('dialog.cancel')}
</Button>
<Button
<Button data-analytics-id={actionType === 'ban' ? 'admin.user.disable.confirm' : actionType === 'unban' ? 'admin.user.enable.confirm' : 'admin.user.password.reset.confirm'}
onClick={confirmUserAction}
disabled={disableUserMutation.isPending || enableUserMutation.isPending || triggerPasswordResetMutation.isPending}
>

View file

@ -215,7 +215,7 @@ export function CliAuthPage() {
<p className="text-sm text-center text-muted-foreground">
{t('cliAuth.loginRequired')}
</p>
<Button
<Button data-analytics-id="auth.cli.login"
className="w-full"
onClick={() => {
const returnTo = `/cli/auth?${ORIGINAL_PARAMS.toString()}`

View file

@ -22,6 +22,7 @@ interface SidebarItem {
icon: React.ComponentType<{ className?: string }>
label: string
to: string
analyticsId?: string
admin?: boolean
superAdmin?: boolean
passwordCapability?: boolean
@ -37,29 +38,29 @@ export const SIDEBAR_GROUPS: SidebarGroup[] = [
{
label: 'sidebar.account',
items: [
{ key: 'profile', icon: UserCog, label: 'sidebar.profile', to: '/settings/profile' },
{ key: 'security', icon: Lock, label: 'sidebar.security', to: '/settings/security', passwordCapability: true },
{ key: 'notifications', icon: Bell, label: 'sidebar.notifications', to: '/settings/notifications' },
{ key: 'profile', icon: UserCog, label: 'sidebar.profile', to: '/settings/profile', analyticsId: 'account.profile.open' },
{ key: 'security', icon: Lock, label: 'sidebar.security', to: '/settings/security', analyticsId: 'account.security.open', passwordCapability: true },
{ key: 'notifications', icon: Bell, label: 'sidebar.notifications', to: '/settings/notifications', analyticsId: 'notification.settings.open' },
],
},
{
label: 'sidebar.skillsAndData',
items: [
{ key: 'skills', icon: Package, label: 'sidebar.mySkills', to: '/dashboard/skills' },
{ key: 'suites', icon: Boxes, label: 'sidebar.mySuites', to: '/dashboard/suites' },
{ key: 'namespaces', icon: Globe, label: 'sidebar.namespaces', to: '/dashboard/namespaces' },
{ key: 'stars', icon: Star, label: 'sidebar.stars', to: '/dashboard/stars' },
{ key: 'subscriptions', icon: Heart, label: 'sidebar.subscriptions', to: '/dashboard/subscriptions' },
{ key: 'tokens', icon: Key, label: 'sidebar.tokens', to: '/dashboard/tokens' },
{ key: 'reviewProgress', icon: Clock, label: 'sidebar.reviewProgress', to: '/dashboard/review-progress' },
{ key: 'skills', icon: Package, label: 'sidebar.mySkills', to: '/dashboard/skills', analyticsId: 'navigation.owned.skills' },
{ key: 'suites', icon: Boxes, label: 'sidebar.mySuites', to: '/dashboard/suites', analyticsId: 'navigation.owned.suites' },
{ key: 'namespaces', icon: Globe, label: 'sidebar.namespaces', to: '/dashboard/namespaces', analyticsId: 'namespace.list.open' },
{ key: 'stars', icon: Star, label: 'sidebar.stars', to: '/dashboard/stars', analyticsId: 'navigation.starred.open' },
{ key: 'subscriptions', icon: Heart, label: 'sidebar.subscriptions', to: '/dashboard/subscriptions', analyticsId: 'navigation.subscriptions.open' },
{ key: 'tokens', icon: Key, label: 'sidebar.tokens', to: '/dashboard/tokens', analyticsId: 'account.tokens.open' },
{ key: 'reviewProgress', icon: Clock, label: 'sidebar.reviewProgress', to: '/dashboard/review-progress', analyticsId: 'review.progress.open' },
],
},
{
label: 'sidebar.admin',
items: [
{ key: 'governance', icon: Shield, label: 'sidebar.governance', to: '/dashboard/governance', admin: true },
{ key: 'reports', icon: Flag, label: 'sidebar.reports', to: '/dashboard/reports', admin: true },
{ key: 'githubSync', icon: Github, label: 'sidebar.githubSync', to: '/dashboard/github-sync', superAdmin: true },
{ key: 'governance', icon: Shield, label: 'sidebar.governance', to: '/dashboard/governance', analyticsId: 'governance.center.open', admin: true },
{ key: 'reports', icon: Flag, label: 'sidebar.reports', to: '/dashboard/reports', analyticsId: 'report.queue.open', admin: true },
{ key: 'githubSync', icon: Github, label: 'sidebar.githubSync', to: '/dashboard/github-sync', analyticsId: 'github.sync.open', superAdmin: true },
],
},
]
@ -83,12 +84,12 @@ export const SIDEBAR_NAV = SIDEBAR_NAV_ITEMS.map(({ key, icon, label, to, admin,
* Shown as a grid of quick-access cards linking to main sections.
*/
const OVERVIEW_CARDS = [
{ key: 'skills', icon: Package, label: 'overview.mySkills', to: '/dashboard/skills', desc: 'overview.mySkillsDesc' },
{ key: 'suites', icon: Boxes, label: 'overview.mySuites', to: '/dashboard/suites', desc: 'overview.mySuitesDesc' },
{ key: 'tokens', icon: Key, label: 'overview.tokens', to: '/dashboard/tokens', desc: 'overview.tokensDesc' },
{ key: 'stars', icon: Star, label: 'overview.stars', to: '/dashboard/stars', desc: 'overview.starsDesc' },
{ key: 'profile', icon: UserCog, label: 'overview.profile', to: '/settings/profile', desc: 'overview.profileDesc' },
{ key: 'security', icon: Lock, label: 'overview.security', to: '/settings/security', desc: 'overview.securityDesc' },
{ key: 'skills', icon: Package, label: 'overview.mySkills', to: '/dashboard/skills', analyticsId: 'navigation.owned.skills', desc: 'overview.mySkillsDesc' },
{ key: 'suites', icon: Boxes, label: 'overview.mySuites', to: '/dashboard/suites', analyticsId: 'navigation.owned.suites', desc: 'overview.mySuitesDesc' },
{ key: 'tokens', icon: Key, label: 'overview.tokens', to: '/dashboard/tokens', analyticsId: 'account.tokens.open', desc: 'overview.tokensDesc' },
{ key: 'stars', icon: Star, label: 'overview.stars', to: '/dashboard/stars', analyticsId: 'navigation.starred.open', desc: 'overview.starsDesc' },
{ key: 'profile', icon: UserCog, label: 'overview.profile', to: '/settings/profile', analyticsId: 'account.profile.open', desc: 'overview.profileDesc' },
{ key: 'security', icon: Lock, label: 'overview.security', to: '/settings/security', analyticsId: 'account.security.open', desc: 'overview.securityDesc' },
] as const
/**
@ -124,7 +125,7 @@ export function DashboardPage() {
{OVERVIEW_CARDS.filter((card) => card.key !== 'security' || user?.canChangePassword === true).map((card) => {
const Icon = card.icon
return (
<Link
<Link data-analytics-id={card.analyticsId}
key={card.key}
to={card.to}
className="group flex items-start gap-4 rounded-xl border border-border/60 p-5 transition-all duration-150 hover:bg-accent hover:border-border hover:shadow-sm"
@ -172,7 +173,7 @@ export function DashboardSidebar({
return (
<aside className="w-full lg:w-56 flex-shrink-0">
<div className="rounded-lg border bg-background lg:hidden">
<button
<button data-analytics-id="navigation.dashboard.toggle"
type="button"
className="flex h-10 w-full items-center justify-between gap-3 px-3 text-sm font-medium"
aria-expanded={mobileOpen}
@ -190,7 +191,7 @@ export function DashboardSidebar({
const Icon = item.icon
const isActive = pathname === item.to || pathname.startsWith(item.to)
return (
<Link
<Link data-analytics-id={item.analyticsId}
key={item.key}
to={item.to}
className={`flex items-center gap-2 rounded-md px-2.5 py-2 text-xs font-medium ${isActive ? 'bg-accent text-foreground' : 'text-muted-foreground hover:bg-accent'}`}
@ -241,7 +242,7 @@ export function DashboardSidebar({
const Icon = item.icon
const isActive = pathname === item.to || pathname.startsWith(item.to)
return (
<Link
<Link data-analytics-id={item.analyticsId}
key={item.key}
to={item.to}
className={`flex items-center gap-2.5 px-3 py-2 rounded-lg text-sm font-medium transition-colors duration-150 ${

View file

@ -43,15 +43,15 @@ export function GithubSyncPage() {
<div className="sync-hero flex flex-wrap items-start justify-between gap-4">
<div><DashboardPageHeader title={t('githubSync.unifiedTitle')} subtitle={t('githubSync.unifiedSubtitle')} /><span className="mt-2 inline-flex rounded border px-2 py-0.5 text-xs text-muted-foreground">@github</span></div>
<div className="flex flex-wrap gap-2">
<Button size="sm" variant="outline" onClick={() => updateSearch({ drawer: 'collection' })}><SlidersHorizontal className="h-4 w-4" />{t('githubSync.collectionConfig')}</Button>
<Button size="sm" variant="outline" onClick={() => updateSearch({ drawer: 'settings' })}><Settings2 className="h-4 w-4" />{t('githubSync.systemSettings')}</Button>
<Button data-analytics-id="github.collection.open" size="sm" variant="outline" onClick={() => updateSearch({ drawer: 'collection' })}><SlidersHorizontal className="h-4 w-4" />{t('githubSync.collectionConfig')}</Button>
<Button data-analytics-id="github.settings.open" size="sm" variant="outline" onClick={() => updateSearch({ drawer: 'settings' })}><Settings2 className="h-4 w-4" />{t('githubSync.systemSettings')}</Button>
</div>
</div>
<Tabs value={tab} onValueChange={(value) => updateSearch({ tab: value as 'overview' | 'repositories' | 'runs', sourceId: undefined, repositoryId: undefined })} className="space-y-4">
<TabsList className="sync-tabs flex w-full justify-start gap-4 overflow-x-auto sm:gap-6">
<TabsTrigger value="overview">{t('githubSync.overview')}</TabsTrigger>
<TabsTrigger value="repositories">{t('githubSync.repositoriesTab')}</TabsTrigger>
<TabsTrigger value="runs">{t('githubSync.runs')}</TabsTrigger>
<TabsTrigger data-analytics-id="github.overview.tab" value="overview">{t('githubSync.overview')}</TabsTrigger>
<TabsTrigger data-analytics-id="github.repositories.tab" value="repositories">{t('githubSync.repositoriesTab')}</TabsTrigger>
<TabsTrigger data-analytics-id="github.runs.tab" value="runs">{t('githubSync.runs')}</TabsTrigger>
</TabsList>
<TabsContent value="overview">
<GithubSyncOverview visible={visible && tab === 'overview'} onCollection={() => updateSearch({ drawer: 'collection' })} onSettings={() => updateSearch({ drawer: 'settings' })} onRuns={() => updateSearch({ tab: 'runs' })} onRun={(runId) => updateSearch({ runId })} />
@ -66,7 +66,7 @@ export function GithubSyncPage() {
{drawer === 'collection' ? <GithubSyncCollectionDrawer visible={visible} onClose={() => updateSearch({ drawer: undefined })} onRepository={(repositoryId) => updateSearch({ drawer: undefined, tab: 'repositories', repositoryId })} /> : null}
{drawer === 'settings' ? <GithubSyncSettingsDrawer visible={visible} onClose={() => updateSearch({ drawer: undefined })} /> : null}
{search.sourceId ? <Dialog open onOpenChange={(open) => { if (!open) updateSearch({ sourceId: undefined }) }}>
<DialogContent className="github-sync-surface !left-auto !right-0 !top-0 !h-dvh !max-h-dvh !grid-rows-[auto_minmax(0,1fr)] !gap-0 !overflow-hidden w-[min(100vw,40rem)] !translate-x-0 !translate-y-0 !rounded-none p-0">
<DialogContent closeAnalyticsId="github.source.close" className="github-sync-surface !left-auto !right-0 !top-0 !h-dvh !max-h-dvh !grid-rows-[auto_minmax(0,1fr)] !gap-0 !overflow-hidden w-[min(100vw,40rem)] !translate-x-0 !translate-y-0 !rounded-none p-0">
<DialogHeader className="border-b px-5 py-4 text-left"><DialogTitle>{t('githubSync.skillPaths')}</DialogTitle><DialogDescription>{t('githubSync.sourceDetailHelp')}</DialogDescription></DialogHeader>
<div className="min-h-0 overflow-y-auto px-5 py-5"><GithubSyncSourceDetail sourceId={search.sourceId} visible={visible} /></div>
</DialogContent>

View file

@ -99,26 +99,26 @@ export function GovernancePage() {
}}
>
<TabsList>
<TabsTrigger value="ALL">{t('governance.tabAll')}</TabsTrigger>
<TabsTrigger value="REVIEW">{t('governance.tabReview')}</TabsTrigger>
<TabsTrigger value="PROMOTION">{t('governance.tabPromotion')}</TabsTrigger>
<TabsTrigger value="REPORT">{t('governance.tabReport')}</TabsTrigger>
<TabsTrigger data-analytics-id="governance.all.tab" value="ALL">{t('governance.tabAll')}</TabsTrigger>
<TabsTrigger data-analytics-id="governance.review.tab" value="REVIEW">{t('governance.tabReview')}</TabsTrigger>
<TabsTrigger data-analytics-id="governance.promotion.tab" value="PROMOTION">{t('governance.tabPromotion')}</TabsTrigger>
<TabsTrigger data-analytics-id="governance.report.tab" value="REPORT">{t('governance.tabReport')}</TabsTrigger>
</TabsList>
<TabsContent value="ALL" className="mt-6">
<GovernanceInbox items={inboxPageData?.items} isLoading={isInboxLoading} />
{inboxTotalPages > 1 ? <Pagination page={inboxPage} totalPages={inboxTotalPages} onPageChange={setInboxPage} /> : null}
{inboxTotalPages > 1 ? <Pagination analyticsId="governance.inbox.paginate" page={inboxPage} totalPages={inboxTotalPages} onPageChange={setInboxPage} /> : null}
</TabsContent>
<TabsContent value="REVIEW" className="mt-6">
<GovernanceInbox items={inboxPageData?.items} isLoading={isInboxLoading} />
{inboxTotalPages > 1 ? <Pagination page={inboxPage} totalPages={inboxTotalPages} onPageChange={setInboxPage} /> : null}
{inboxTotalPages > 1 ? <Pagination analyticsId="governance.inbox.paginate" page={inboxPage} totalPages={inboxTotalPages} onPageChange={setInboxPage} /> : null}
</TabsContent>
<TabsContent value="PROMOTION" className="mt-6">
<GovernanceInbox items={inboxPageData?.items} isLoading={isInboxLoading} />
{inboxTotalPages > 1 ? <Pagination page={inboxPage} totalPages={inboxTotalPages} onPageChange={setInboxPage} /> : null}
{inboxTotalPages > 1 ? <Pagination analyticsId="governance.inbox.paginate" page={inboxPage} totalPages={inboxTotalPages} onPageChange={setInboxPage} /> : null}
</TabsContent>
<TabsContent value="REPORT" className="mt-6">
<GovernanceInbox items={inboxPageData?.items} isLoading={isInboxLoading} />
{inboxTotalPages > 1 ? <Pagination page={inboxPage} totalPages={inboxTotalPages} onPageChange={setInboxPage} /> : null}
{inboxTotalPages > 1 ? <Pagination analyticsId="governance.inbox.paginate" page={inboxPage} totalPages={inboxTotalPages} onPageChange={setInboxPage} /> : null}
</TabsContent>
</Tabs>
</Card>
@ -136,7 +136,7 @@ export function GovernancePage() {
isMarkingRead={markReadMutation.isPending}
/>
{notificationsTotalPages > 1 ? (
<Pagination page={notificationsPage} totalPages={notificationsTotalPages} onPageChange={setNotificationsPage} />
<Pagination analyticsId="governance.notification.paginate" page={notificationsPage} totalPages={notificationsTotalPages} onPageChange={setNotificationsPage} />
) : null}
</Card>
@ -146,7 +146,7 @@ export function GovernancePage() {
<p className="text-sm text-muted-foreground">{t('governance.activitySubtitle')}</p>
</div>
<GovernanceActivity items={activityPageData?.items} isLoading={isActivityLoading} />
{activityTotalPages > 1 ? <Pagination page={activityPage} totalPages={activityTotalPages} onPageChange={setActivityPage} /> : null}
{activityTotalPages > 1 ? <Pagination analyticsId="governance.activity.paginate" page={activityPage} totalPages={activityTotalPages} onPageChange={setActivityPage} /> : null}
</Card>
</div>
@ -158,7 +158,7 @@ export function GovernancePage() {
<p className="text-sm text-muted-foreground">{t('governance.searchMaintenanceDescription')}</p>
</div>
<div className="flex flex-wrap items-center gap-3">
<Button
<Button data-analytics-id="governance.index.rebuild"
type="button"
variant="outline"
onClick={() => setRebuildDialogOpen(true)}
@ -170,7 +170,7 @@ export function GovernancePage() {
</div>
</Card>
<ConfirmDialog
<ConfirmDialog confirmAnalyticsId="governance.index.rebuild.confirm" cancelAnalyticsId="governance.index.rebuild.cancel"
open={rebuildDialogOpen}
onOpenChange={setRebuildDialogOpen}
title={t('governance.searchRebuildConfirmTitle')}

View file

@ -89,7 +89,7 @@ export function MyNamespacesPage() {
subtitle={t('myNamespaces.subtitle')}
actions={canCreateNamespace ? (
<CreateNamespaceDialog>
<Button>{t('myNamespaces.create')}</Button>
<Button data-analytics-id="namespace.create.open">{t('myNamespaces.create')}</Button>
</CreateNamespaceDialog>
) : undefined}
/>
@ -131,11 +131,11 @@ export function MyNamespacesPage() {
</div>
</div>
<div className="flex flex-wrap gap-2 border-t border-border/50 pt-4">
<Button variant="outline" size="sm" onClick={() => handleNamespaceClick(namespace.slug)}>
<Button data-analytics-id="namespace.management.open" variant="outline" size="sm" onClick={() => handleNamespaceClick(namespace.slug)}>
{t('namespaceManagement.enter')}
</Button>
{namespace.type === 'TEAM' && (namespace.currentUserRole === 'OWNER' || namespace.currentUserRole === 'ADMIN') && (
<Button variant="outline" size="sm" onClick={(e) => handleGithubSourcesClick(namespace.slug, e)}>
<Button data-analytics-id="github.namespace.open" variant="outline" size="sm" onClick={(e) => handleGithubSourcesClick(namespace.slug, e)}>
{t('githubSync.teamLink')}
</Button>
)}
@ -145,7 +145,7 @@ export function MyNamespacesPage() {
))}
</div>
{totalPages > 1 ? (
<Pagination page={page} totalPages={totalPages} onPageChange={setPage} />
<Pagination analyticsId="namespace.list.paginate" page={page} totalPages={totalPages} onPageChange={setPage} />
) : null}
</>
) : (
@ -154,7 +154,7 @@ export function MyNamespacesPage() {
description={t('myNamespaces.emptyDescription')}
action={canCreateNamespace ? (
<CreateNamespaceDialog>
<Button>{t('myNamespaces.create')}</Button>
<Button data-analytics-id="namespace.create.open">{t('myNamespaces.create')}</Button>
</CreateNamespaceDialog>
) : undefined}
/>

View file

@ -303,7 +303,7 @@ export function MySkillsPage() {
<div className="flex flex-col gap-3">
<div className="flex flex-col gap-3 sm:flex-row sm:items-center">
<form className="flex gap-2 sm:w-full sm:max-w-md" onSubmit={event => {
<form data-analytics-id="skill.owned.search" className="flex gap-2 sm:w-full sm:max-w-md" onSubmit={event => {
event.preventDefault()
updateSearch({ q: keywordInput.trim() || undefined, page: 0 }, { replace: true })
}}>
@ -324,13 +324,13 @@ export function MySkillsPage() {
updateSearch({ namespace: value === ALL_NAMESPACES_VALUE ? undefined : value, page: 0 })
}}
>
<SelectTrigger aria-label={t('mySkills.namespaceFilterLabel')} className="sm:max-w-[14rem]">
<SelectTrigger data-analytics-id="skill.owned.namespace.interact" aria-label={t('mySkills.namespaceFilterLabel')} className="sm:max-w-[14rem]">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value={ALL_NAMESPACES_VALUE}>{t('mySkills.namespaceFilterAll')}</SelectItem>
<SelectItem data-analytics-id="skill.owned.namespace" value={ALL_NAMESPACES_VALUE}>{t('mySkills.namespaceFilterAll')}</SelectItem>
{(namespaceOptions ?? []).map((ns: { id: number; slug: string }) => (
<SelectItem key={ns.id} value={ns.slug}>
<SelectItem data-analytics-id="skill.owned.namespace" key={ns.id} value={ns.slug}>
@{ns.slug}
</SelectItem>
))}
@ -338,7 +338,7 @@ export function MySkillsPage() {
</Select>
)}
{hasActiveSearch ? (
<Button
<Button data-analytics-id="skill.owned.clear"
type="button"
size="sm"
variant="ghost"
@ -351,7 +351,7 @@ export function MySkillsPage() {
<div className="flex flex-wrap gap-2">
{availableFilters.map((option) => (
<Button
<Button data-analytics-id="skill.owned.filter"
key={option}
type="button"
size="sm"
@ -387,7 +387,7 @@ export function MySkillsPage() {
return (
<Card
<Card data-analytics-id={filter === "HIDDEN" ? undefined : "skill.owned.open"}
key={skill.id}
className={`p-5 group animate-fade-up delay-${Math.min(idx + 1, 6)} ${filter === 'HIDDEN' ? '' : 'cursor-pointer'}`}
onClick={filter === 'HIDDEN' ? undefined : () => handleSkillClick(skill.namespace, skill.slug, preview?.version)}
@ -405,7 +405,7 @@ export function MySkillsPage() {
<div className="mb-3 flex flex-wrap items-center gap-2 text-xs text-muted-foreground">
<span>{t(`mySkills.promotionRoles.${skill.managementState.promotionRole}`)}</span>
{relatedNamespace && relatedSlug && (
<button type="button" className="text-primary underline underline-offset-4"
<button data-analytics-id="skill.related.open" type="button" className="text-primary underline underline-offset-4"
onClick={event => {
event.stopPropagation()
handleSkillClick(relatedNamespace, relatedSlug)
@ -448,7 +448,7 @@ export function MySkillsPage() {
</div>
<div className="flex shrink-0 flex-wrap items-center gap-2 sm:max-w-[45%] sm:justify-end">
{canRestoreHidden ? (
<Button
<Button data-analytics-id="skill.restore.request"
size="sm"
variant="outline"
onClick={(event) => {
@ -459,7 +459,7 @@ export function MySkillsPage() {
{t('mySkills.restoreHidden')}
</Button>
) : filter === 'HIDDEN' || ownerReadOnly ? null : skill.status !== 'ARCHIVED' && (
<Button
<Button data-analytics-id="skill.update.open"
size="sm"
variant="outline"
onClick={(event) => {
@ -475,7 +475,7 @@ export function MySkillsPage() {
visibility={skill.visibility ?? 'PUBLIC'} disabled={hasPendingPreview} />
)}
{filter === 'HIDDEN' || ownerReadOnly ? null : hasPendingPreview && ownerPreviewVersion ? (
<Button
<Button data-analytics-id="skill.review.withdraw"
size="sm"
variant="outline"
onClick={(event) => {
@ -491,7 +491,7 @@ export function MySkillsPage() {
{t('mySkills.withdrawReview')}
</Button>
) : skill.canSubmitPromotion && publishedVersion ? (
<Button
<Button data-analytics-id={skill.managementState?.promotionRole === 'TEAM_SOURCE' ? 'skill.promotion.update.request' : 'skill.promotion.create.request'}
size="sm"
variant="outline"
onClick={(event) => {
@ -507,7 +507,7 @@ export function MySkillsPage() {
{t(skill.managementState?.promotionRole === 'TEAM_SOURCE' ? 'mySkills.updateGlobalVersion' : 'mySkills.promoteToGlobal')}
</Button>
) : skill.status === 'ARCHIVED' ? (
<Button
<Button data-analytics-id="skill.unarchive.request"
size="sm"
variant="outline"
onClick={(event) => {
@ -522,7 +522,7 @@ export function MySkillsPage() {
{t('mySkills.unarchive')}
</Button>
) : publishedVersion ? (
<Button
<Button data-analytics-id="skill.archive.request"
size="sm"
variant="outline"
onClick={(event) => {
@ -551,7 +551,7 @@ export function MySkillsPage() {
</div>
{skillPage.total > PAGE_SIZE ? (
<Pagination page={page} totalPages={totalPages} onPageChange={(next) => updateSearch({ page: next })} />
<Pagination analyticsId="skill.owned.paginate" page={page} totalPages={totalPages} onPageChange={(next) => updateSearch({ page: next })} />
) : null}
</>
) : (
@ -560,7 +560,7 @@ export function MySkillsPage() {
description={hasActiveSearch ? t('mySkills.emptySearchDescription') : t(emptyStateKey.description)}
action={
hasActiveSearch ? (
<Button size="lg" variant="outline" onClick={handleClearSearch}>
<Button data-analytics-id="skill.owned.clear" size="lg" variant="outline" onClick={handleClearSearch}>
{t('mySkills.clearSearch')}
</Button>
) : undefined
@ -568,7 +568,7 @@ export function MySkillsPage() {
/>
)}
<ConfirmDialog
<ConfirmDialog confirmAnalyticsId="skill.restore.confirm" cancelAnalyticsId="skill.restore.cancel"
open={!!restoreHiddenTarget}
onOpenChange={(open) => {
if (!open) {
@ -582,6 +582,8 @@ export function MySkillsPage() {
/>
<ConfirmDialog
confirmAnalyticsId={skillPage?.items.find((skill) => skill.id === promotionTarget?.skillId)?.managementState?.promotionRole === 'TEAM_SOURCE' ? 'skill.promotion.update.confirm' : 'skill.promotion.create.confirm'}
cancelAnalyticsId={skillPage?.items.find((skill) => skill.id === promotionTarget?.skillId)?.managementState?.promotionRole === 'TEAM_SOURCE' ? 'skill.promotion.update.cancel' : 'skill.promotion.create.cancel'}
open={!!promotionTarget}
onOpenChange={(open) => {
if (!open) {
@ -594,7 +596,7 @@ export function MySkillsPage() {
onConfirm={handleSubmitPromotion}
/>
<ConfirmDialog
<ConfirmDialog confirmAnalyticsId="skill.archive.confirm" cancelAnalyticsId="skill.archive.cancel"
open={!!archiveTarget}
onOpenChange={(open) => {
if (!open) {
@ -607,7 +609,7 @@ export function MySkillsPage() {
onConfirm={handleArchiveSkill}
/>
<ConfirmDialog
<ConfirmDialog confirmAnalyticsId="skill.unarchive.confirm" cancelAnalyticsId="skill.unarchive.cancel"
open={!!unarchiveTarget}
onOpenChange={(open) => {
if (!open) {
@ -620,7 +622,7 @@ export function MySkillsPage() {
onConfirm={handleUnarchiveSkill}
/>
<ConfirmDialog
<ConfirmDialog confirmAnalyticsId="skill.review.withdraw.confirm" cancelAnalyticsId="skill.review.withdraw.cancel"
open={!!withdrawTarget}
onOpenChange={(open) => {
if (!open) {

View file

@ -52,25 +52,25 @@ export function MySuitesPage() {
return (
<div className="space-y-4 animate-fade-up">
<SuiteWorkspaceHeader title={t('suite.myTitle')} description={t('suite.workspace.description')}
actions={<Button size="sm" onClick={() => navigate({ to: '/dashboard/suites/new' })}>{t('suite.create')}</Button>} />
actions={<Button data-analytics-id="suite.create.open" size="sm" onClick={() => navigate({ to: '/dashboard/suites/new' })}>{t('suite.create')}</Button>} />
<div className="flex flex-wrap items-center gap-2">
<form className="flex w-full items-center gap-2 sm:w-auto" onSubmit={event => { event.preventDefault(); update({ query: queryInput.trim() }) }}>
<form data-analytics-id="suite.owned.search" className="flex w-full items-center gap-2 sm:w-auto" onSubmit={event => { event.preventDefault(); update({ query: queryInput.trim() }) }}>
<div className="relative min-w-0 flex-1 sm:w-72">
<Search className="pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" aria-hidden="true" />
<Input className="h-8 pl-8 pr-8 text-xs" value={queryInput} maxLength={200}
aria-label={t('suite.workspace.searchLabel')} placeholder={t('suite.workspace.searchPlaceholder')}
onChange={event => setQueryInput(event.target.value)} />
{queryInput && <button type="button" aria-label={t('suite.workspace.clearSearch')}
{queryInput && <button data-analytics-id="suite.query.clear" type="button" aria-label={t('suite.workspace.clearSearch')}
className="absolute right-1 top-1/2 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded-sm text-muted-foreground hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
onClick={() => setQueryInput('')}><X className="h-3.5 w-3.5" aria-hidden="true" /></button>}
</div>
<Button type="submit" size="sm" variant="outline" className="h-8 text-xs">{t('nav.search')}</Button>
</form>
<Select value={filters.state} onValueChange={state => update({ state })}>
<SelectTrigger className="h-8 w-32 text-xs" aria-label={t('suite.workspace.stateFilter')}><SelectValue /></SelectTrigger>
<SelectContent>{FILTERS.map(state => <SelectItem key={state} value={state}>{t(`suite.workspace.filter.${state}`)}</SelectItem>)}</SelectContent>
<SelectTrigger data-analytics-id="suite.owned.interact" className="h-8 w-32 text-xs" aria-label={t('suite.workspace.stateFilter')}><SelectValue /></SelectTrigger>
<SelectContent>{FILTERS.map(state => <SelectItem data-analytics-id="suite.owned.filter" key={state} value={state}>{t(`suite.workspace.filter.${state}`)}</SelectItem>)}</SelectContent>
</Select>
{data && <button type="button" aria-pressed={filters.state === 'ATTENTION'}
{data && <button data-analytics-id="suite.attention.filter" type="button" aria-pressed={filters.state === 'ATTENTION'}
onClick={() => update({ state: filters.state === 'ATTENTION' ? 'ALL' : 'ATTENTION' })}
className={cn('inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-xs focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
data.attentionCount ? 'bg-amber-500/10 text-amber-800 dark:text-amber-300' : 'text-muted-foreground', filters.state === 'ATTENTION' && 'ring-1 ring-amber-500/30')}>
@ -79,7 +79,7 @@ export function MySuitesPage() {
</div>
{workspace.isLoading ? <div className="h-64 animate-shimmer rounded-lg" />
: workspace.isError ? <div role="alert" className="rounded-lg border p-4 text-xs text-destructive">
{t('suite.workspace.error')}<Button variant="ghost" size="sm" onClick={() => workspace.refetch()}>{t('suite.workspace.reload')}</Button>
{t('suite.workspace.error')}<Button data-analytics-id="suite.owned.refresh" variant="ghost" size="sm" onClick={() => workspace.refetch()}>{t('suite.workspace.reload')}</Button>
</div> : data?.items.length ? <>
<div className="overflow-hidden rounded-lg border" aria-busy={stale || workspace.isFetching}>
<div className="hidden grid-cols-[minmax(0,1fr)_5rem_10rem_9rem_8rem] gap-3 border-b bg-muted/30 px-3 py-2 text-[11px] text-muted-foreground lg:grid">
@ -93,7 +93,7 @@ export function MySuitesPage() {
return <div key={`${item.namespace}/${item.slug}`}
className={cn('grid gap-2 px-3 py-3 sm:grid-cols-[minmax(0,1fr)_auto] lg:grid-cols-[minmax(0,1fr)_5rem_12rem_9rem_8rem] lg:items-center lg:gap-3', !item.suiteId && 'bg-blue-500/[0.025]')}>
<div className="min-w-0">
<button type="button" disabled={stale} onClick={() => item.suiteId ? viewSuite(item) : open(item)}
<button data-analytics-id={item.suiteId ? 'suite.management.open' : 'suite.operation.open'} type="button" disabled={stale} onClick={() => item.suiteId ? viewSuite(item) : open(item)}
className="flex max-w-full items-center gap-2 text-left text-xs font-semibold hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
<Boxes className="h-3.5 w-3.5 shrink-0 text-muted-foreground" aria-hidden="true" /><span className="truncate">{item.displayName}</span>
</button>
@ -112,7 +112,7 @@ export function MySuitesPage() {
{item.operationStatus && <p className="mt-0.5 truncate text-[11px] text-muted-foreground">{t(`suite.bundle.taskHint.${item.operationStatus}`)}</p>}
</div>
<span className="pl-5 text-[11px] text-muted-foreground sm:pl-0">{formatLocalDateTime(item.updatedAt, i18n.language)}</span>
<Button variant="ghost" size="sm" disabled={stale} onClick={() => open(item)} className="h-7 justify-self-end px-2 text-[11px] sm:col-span-2 lg:col-span-1">
<Button data-analytics-id={item.suiteId ? 'suite.management.open' : 'suite.operation.open'} variant="ghost" size="sm" disabled={stale} onClick={() => open(item)} className="h-7 justify-self-end px-2 text-[11px] sm:col-span-2 lg:col-span-1">
{item.operationStatus && !item.suiteId ? t(`suite.bundle.taskAction.${item.operationStatus}`) : t('suite.view')}
<ChevronRight className="ml-1 h-3 w-3" aria-hidden="true" />
</Button>
@ -122,7 +122,7 @@ export function MySuitesPage() {
</div>
<div className="flex flex-wrap items-center justify-between gap-2">
<span className="text-[11px] text-muted-foreground">{t('suite.workspace.total', { count: data.total, size: PAGE_SIZE })}</span>
<Pagination page={filters.page} totalPages={Math.max(1, Math.ceil(data.total / PAGE_SIZE))} onPageChange={page => update({ page })} />
<Pagination analyticsId="suite.owned.paginate" page={filters.page} totalPages={Math.max(1, Math.ceil(data.total / PAGE_SIZE))} onPageChange={page => update({ page })} />
</div>
</> : <EmptyState title={t(filters.query || filters.state !== 'ALL' ? 'suite.workspace.noMatches' : 'suite.myEmpty')} />}
</div>

View file

@ -77,14 +77,14 @@ export function NamespaceGithubSourcesPage() {
<DashboardPageHeader title={t('githubSync.teamTitle', { slug })} subtitle={t('githubSync.teamSubtitle')} />
<Card className="p-5 space-y-3">
<h2 className="text-lg font-semibold">{t('githubSync.addRepository')}</h2>
<form onSubmit={create} className="flex flex-wrap items-end gap-3">
<form data-analytics-id="github.namespace.create" onSubmit={create} className="flex flex-wrap items-end gap-3">
<label className="min-w-52 flex-1 text-sm">{t('githubSync.repository')}
<Input placeholder="owner/repository" value={repository} onChange={(event) => setRepository(event.target.value)} required />
</label>
<label className="text-sm">{t('githubSync.visibility')}
<select className="block h-9 rounded-md border bg-background px-2" value={visibility} onChange={(event) => setVisibility(event.target.value)}>
<option value="NAMESPACE_ONLY">{t('githubSync.namespaceOnly')}</option>
<option value="PUBLIC">{t('githubSync.public')}</option>
<option data-analytics-id="github.namespace.create.visibility.namespace" value="NAMESPACE_ONLY">{t('githubSync.namespaceOnly')}</option>
<option data-analytics-id="github.namespace.create.visibility.public" value="PUBLIC">{t('githubSync.public')}</option>
</select>
</label>
<Button type="submit" disabled={mutations.create.isPending}>{t('githubSync.add')}</Button>
@ -110,10 +110,10 @@ export function NamespaceGithubSourcesPage() {
<TableCell>{entry.enabled ? t('githubSync.active') : t('githubSync.paused')}</TableCell>
<TableCell>
<select aria-label={t('githubSync.visibility')} className="h-9 rounded-md border bg-background px-2" value={entry.sourceVisibility ?? 'NAMESPACE_ONLY'} disabled={!entry.id || mutations.setVisibility.isPending} onChange={(event) => entry.id && changeVisibility(entry.id, event.target.value)}>
<option value="NAMESPACE_ONLY">{t('githubSync.namespaceOnly')}</option><option value="PUBLIC">{t('githubSync.public')}</option>
<option data-analytics-id="github.namespace.visibility.namespace" value="NAMESPACE_ONLY">{t('githubSync.namespaceOnly')}</option><option data-analytics-id="github.namespace.visibility.public" value="PUBLIC">{t('githubSync.public')}</option>
</select>
</TableCell>
<TableCell><Button size="sm" variant="outline" disabled={!entry.id || mutations.setEnabled.isPending} onClick={() => entry.id && changeEnabled(entry.id, !entry.enabled)}>{entry.enabled ? t('githubSync.disable') : t('githubSync.enable')}</Button></TableCell>
<TableCell><Button data-analytics-id={entry.enabled ? 'github.namespace.disable' : 'github.namespace.enable'} size="sm" variant="outline" disabled={!entry.id || mutations.setEnabled.isPending} onClick={() => entry.id && changeEnabled(entry.id, !entry.enabled)}>{entry.enabled ? t('githubSync.disable') : t('githubSync.enable')}</Button></TableCell>
</TableRow>
))}</TableBody>
</Table>
@ -140,13 +140,13 @@ export function NamespaceGithubSourcesPage() {
<span>{t('githubSync.failed')}: <strong>{source.failedPackages ?? 0}</strong></span>
</div></TableCell>
<TableCell>{formatLocalDateTime(source.nextCheckAt, i18n.language)}</TableCell>
<TableCell className="space-y-2"><Button size="sm" variant="outline" onClick={() => { setSelectedSource(source.id ?? null); setSkillPage(0) }}>{t('githubSync.viewSkills')}</Button>{source.id != null ? <GithubSourceRescanButton sourceId={source.id} status={source.status} namespaceSlug={slug} /> : null}</TableCell>
<TableCell className="space-y-2"><Button data-analytics-id="github.source.skills" size="sm" variant="outline" onClick={() => { setSelectedSource(source.id ?? null); setSkillPage(0) }}>{t('githubSync.viewSkills')}</Button>{source.id != null ? <GithubSourceRescanButton sourceId={source.id} status={source.status} namespaceSlug={slug} /> : null}</TableCell>
</TableRow>
))}</TableBody>
</Table>
) : null}
{resolved.data && Math.ceil((resolved.data.total ?? 0) / (resolved.data.size || PAGE_SIZE)) > 1 ? (
<Pagination page={page} totalPages={Math.ceil((resolved.data.total ?? 0) / (resolved.data.size || PAGE_SIZE))} onPageChange={setPage} />
<Pagination analyticsId="github.namespace.paginate" page={page} totalPages={Math.ceil((resolved.data.total ?? 0) / (resolved.data.size || PAGE_SIZE))} onPageChange={setPage} />
) : null}
</Card>
<section className="space-y-3" aria-label={t('githubSync.runs')}>
@ -156,7 +156,7 @@ export function NamespaceGithubSourcesPage() {
</section>
{selectedSource !== null ? (
<Card className="p-5 space-y-3">
<div className="flex items-center justify-between"><h2 className="text-lg font-semibold">{t('githubSync.skillPaths')} · #{selectedSource}</h2><Button size="sm" variant="ghost" onClick={() => setSelectedSource(null)}>{t('githubSync.close')}</Button></div>
<div className="flex items-center justify-between"><h2 className="text-lg font-semibold">{t('githubSync.skillPaths')} · #{selectedSource}</h2><Button data-analytics-id="github.namespace.skills.close" size="sm" variant="ghost" onClick={() => setSelectedSource(null)}>{t('githubSync.close')}</Button></div>
<GithubSourceIgnoreEditor sourceId={selectedSource} namespaceSlug={slug} />
{skills.isLoading ? <p className="text-sm text-muted-foreground">{t('githubSync.loading')}</p> : null}
{skills.error ? <p role="alert" className="text-sm text-destructive">{t('githubSync.loadFailed')}: {skills.error.message}</p> : null}
@ -167,7 +167,7 @@ export function NamespaceGithubSourcesPage() {
</Table>
) : null}
{skills.data && Math.ceil((skills.data.total ?? 0) / (skills.data.size || PAGE_SIZE)) > 1 ? (
<Pagination page={skillPage} totalPages={Math.ceil((skills.data.total ?? 0) / (skills.data.size || PAGE_SIZE))} onPageChange={setSkillPage} />
<Pagination analyticsId="github.source.paginate" page={skillPage} totalPages={Math.ceil((skills.data.total ?? 0) / (skills.data.size || PAGE_SIZE))} onPageChange={setSkillPage} />
) : null}
</Card>
) : null}

View file

@ -181,8 +181,8 @@ export function NamespaceMembersPage() {
{canViewInvitations ? <div className="flex flex-wrap items-center justify-end gap-2">
{canViewInvitations ? (
<Dialog>
<DialogTrigger asChild><Button variant="outline">{t(canManageMembers ? 'namespaceManagement.invite' : 'invitation.historyTitle')}</Button></DialogTrigger>
<DialogContent className="w-[min(calc(100vw-2rem),40rem)] gap-5 p-5 sm:p-6">
<DialogTrigger asChild><Button data-analytics-id="namespace.invitation.open" variant="outline">{t(canManageMembers ? 'namespaceManagement.invite' : 'invitation.historyTitle')}</Button></DialogTrigger>
<DialogContent closeAnalyticsId="namespace.invitation.close" className="w-[min(calc(100vw-2rem),40rem)] gap-5 p-5 sm:p-6">
<DialogTitle>{t(canManageMembers ? 'namespaceManagement.invite' : 'invitation.historyTitle')}</DialogTitle>
<DialogDescription className="break-words">{namespace.displayName} <span className="text-muted-foreground">@{slug}</span></DialogDescription>
{canManageMembers ? <InvitationControls slug={slug} /> : <InvitationHistory key={slug} slug={slug} />}
@ -191,16 +191,16 @@ export function NamespaceMembersPage() {
) : null}
{canTransferOwnership ? (
<TransferOwnershipDialog namespace={namespace} members={members}>
<Button variant="outline">{t('members.transferOwnership')}</Button>
<Button data-analytics-id="namespace.ownership.open" variant="outline">{t('members.transferOwnership')}</Button>
</TransferOwnershipDialog>
) : null}
{canManageMembers ? (
<>
<BatchImportMembersDialog slug={slug}>
<Button variant="outline">{t('members.batchImport')}</Button>
<Button data-analytics-id="namespace.import.open" variant="outline">{t('members.batchImport')}</Button>
</BatchImportMembersDialog>
<AddNamespaceMemberDialog slug={slug}>
<Button>{t('members.addMember')}</Button>
<Button data-analytics-id="namespace.member.open">{t('members.addMember')}</Button>
</AddNamespaceMemberDialog>
</>
) : null}
@ -258,12 +258,12 @@ export function NamespaceMembersPage() {
}))
}}
>
<SelectTrigger ref={(element) => { roleSelectRefs.current[member.userId] = element }} className="w-36" aria-label={t('members.colRole')}>
<SelectTrigger data-analytics-id="namespace.member.role.draft.interact" ref={(element) => { roleSelectRefs.current[member.userId] = element }} className="w-36" aria-label={t('members.colRole')}>
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="MEMBER">{t('members.roleMember')}</SelectItem>
<SelectItem value="ADMIN">{t('members.roleAdmin')}</SelectItem>
<SelectItem data-analytics-id="namespace.member.role.draft.member" value="MEMBER">{t('members.roleMember')}</SelectItem>
<SelectItem data-analytics-id="namespace.member.role.draft.admin" value="ADMIN">{t('members.roleAdmin')}</SelectItem>
</SelectContent>
</Select>
</div>
@ -286,13 +286,13 @@ export function NamespaceMembersPage() {
<div className="flex items-center justify-end gap-1">
{roleValue !== member.role ? (
<>
<Button type="button" variant="ghost" size="icon"
<Button data-analytics-id="namespace.member.role.save" type="button" variant="ghost" size="icon"
aria-label={t('members.saveRole')} title={t('members.saveRole')}
disabled={isSavingRole || isRemoving}
onClick={() => handleRoleSave(member.userId, member.role)}>
{isSavingRole ? <Loader2 className="h-4 w-4 animate-spin" aria-hidden="true" /> : <Check className="h-4 w-4" aria-hidden="true" />}
</Button>
<Button type="button" variant="ghost" size="icon"
<Button data-analytics-id="namespace.member.role.cancel" type="button" variant="ghost" size="icon"
aria-label={t('members.cancelRole')} title={t('members.cancelRole')}
disabled={isSavingRole || isRemoving}
onClick={() => {
@ -303,7 +303,7 @@ export function NamespaceMembersPage() {
</Button>
</>
) : null}
<Button type="button" variant="ghost" size="icon"
<Button data-analytics-id="namespace.member.remove" type="button" variant="ghost" size="icon"
className="text-destructive hover:bg-destructive/10 hover:text-destructive"
aria-label={t('members.remove')} title={t('members.remove')}
disabled={isRemoving || isSavingRole}
@ -328,11 +328,11 @@ export function NamespaceMembersPage() {
)}
{totalMembers > MEMBER_PAGE_SIZE ? (
<Pagination page={page} totalPages={totalPages} onPageChange={setPage} />
<Pagination analyticsId="namespace.member.paginate" page={page} totalPages={totalPages} onPageChange={setPage} />
) : null}
</div>
<ConfirmDialog
<ConfirmDialog confirmAnalyticsId="namespace.member.remove.confirm" cancelAnalyticsId="namespace.member.remove.cancel"
open={!!pendingRemoval}
onOpenChange={(open) => {
if (!open) {

View file

@ -54,7 +54,7 @@ function ReviewListSection({ namespaceId, slug }: { namespaceId?: number; slug:
return (
<div className="flex flex-col gap-3 border-t border-border/60 px-5 py-4 text-sm text-muted-foreground md:flex-row md:items-center md:justify-between">
<p>{t('nsReviews.pageSummary', { total: totalElements, page: currentPage + 1 })}</p>
<Pagination page={currentPage} totalPages={totalPages} onPageChange={(nextPage) => changePage(status, nextPage)} />
<Pagination analyticsId="review.namespace.paginate" page={currentPage} totalPages={totalPages} onPageChange={(nextPage) => changePage(status, nextPage)} />
</div>
)
}
@ -94,7 +94,7 @@ function ReviewListSection({ namespaceId, slug }: { namespaceId?: number; slug:
<p className="mt-3 text-sm text-muted-foreground">{review.reviewComment}</p>
) : null}
<div className="mt-4 flex justify-end">
<Link
<Link data-analytics-id="review.detail.open"
to={buildNamespaceReviewDetailPath(slug, review.id)}
className="inline-flex items-center rounded-md border border-border/60 px-3 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent hover:text-accent-foreground"
>
@ -114,11 +114,11 @@ function ReviewListSection({ namespaceId, slug }: { namespaceId?: number; slug:
<div className="w-full max-w-48">
<label htmlFor="namespace-review-status" className="mb-2 block text-sm font-medium text-muted-foreground">{t('nsReviews.statusLabel')}</label>
<Select value={activeStatus} onValueChange={(value) => setActiveStatus(value as ReviewStatus)}>
<SelectTrigger id="namespace-review-status"><SelectValue /></SelectTrigger>
<SelectTrigger data-analytics-id="review.namespace.status.interact" id="namespace-review-status"><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem value="PENDING">{t('nsReviews.tabPending')}</SelectItem>
<SelectItem value="APPROVED">{t('nsReviews.tabApproved')}</SelectItem>
<SelectItem value="REJECTED">{t('nsReviews.tabRejected')}</SelectItem>
<SelectItem data-analytics-id="review.namespace.status" value="PENDING">{t('nsReviews.tabPending')}</SelectItem>
<SelectItem data-analytics-id="review.namespace.status" value="APPROVED">{t('nsReviews.tabApproved')}</SelectItem>
<SelectItem data-analytics-id="review.namespace.status" value="REJECTED">{t('nsReviews.tabRejected')}</SelectItem>
</SelectContent>
</Select>
</div>
@ -127,12 +127,12 @@ function ReviewListSection({ namespaceId, slug }: { namespaceId?: number; slug:
{t('nsReviews.sortLabel')}
</label>
<Select value={sortDirection} onValueChange={handleSortChange}>
<SelectTrigger id="namespace-review-sort">
<SelectTrigger data-analytics-id="review.namespace.sort.interact" id="namespace-review-sort">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="DESC">{t('nsReviews.sortNewest')}</SelectItem>
<SelectItem value="ASC">{t('nsReviews.sortOldest')}</SelectItem>
<SelectItem data-analytics-id="review.namespace.sort" value="DESC">{t('nsReviews.sortNewest')}</SelectItem>
<SelectItem data-analytics-id="review.namespace.sort" value="ASC">{t('nsReviews.sortOldest')}</SelectItem>
</SelectContent>
</Select>
</div>
@ -172,8 +172,8 @@ export function NamespaceReviewsPage() {
search: { queue: value === 'sync' ? 'sync' : undefined }, replace: true,
})}>
<TabsList>
<TabsTrigger value="user">{t('reviews.typeSkill')}</TabsTrigger>
<TabsTrigger value="sync">{t('reviews.typeSync')}</TabsTrigger>
<TabsTrigger data-analytics-id="review.namespace.user.tab" value="user">{t('reviews.typeSkill')}</TabsTrigger>
<TabsTrigger data-analytics-id="review.namespace.sync.tab" value="sync">{t('reviews.typeSync')}</TabsTrigger>
</TabsList>
<TabsContent value="user" className="mt-5">
<ReviewListSection namespaceId={namespace?.id} slug={slug} />

Some files were not shown because too many files have changed in this diff Show more