Files
fusion/packages/dashboard/app/components/GitHubStarPrompt.css
gsxdsm 962b97ce84 FN-5967: add first-task GitHub star prompt
Show a one-time GitHub star prompt after a task first reaches done.

- detect task status transitions into done and trigger the prompt only in project view
- add a dismissible GitHub star prompt component plus localStorage-backed persistence hook
- cover the new prompt behavior with component, hook, and transition helper tests
- document the prompt behavior and styling guidance in the dashboard guide

Files changed:
 docs/dashboard-guide.md                            |  3 +
 packages/dashboard/app/App.tsx                     | 21 +++++-
 .../dashboard/app/components/GitHubStarPrompt.css  | 76 ++++++++++++++++++++++
 .../dashboard/app/components/GitHubStarPrompt.tsx  | 53 +++++++++++++++
 .../app/components/__tests__/App.test.tsx          | 12 +++-
 .../components/__tests__/GitHubStarPrompt.test.tsx | 40 ++++++++++++
 .../hooks/__tests__/useGitHubStarPrompt.test.ts    | 64 ++++++++++++++++++
 .../dashboard/app/hooks/useGitHubStarPrompt.ts     | 46 +++++++++++++
 8 files changed, 313 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-5967

Fusion-Task-Lineage: 5fffdf4d-61d8-4ac8-bcf4-8b453b639b28
2026-06-03 22:35:28 -07:00

77 lines
1.5 KiB
CSS

.github-star-prompt {
position: fixed;
right: var(--space-lg);
bottom: var(--space-lg);
z-index: 1002;
width: min(calc(var(--space-2xl) * 10), calc(100vw - (var(--space-lg) * 2)));
padding: var(--space-lg);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
background: var(--surface);
box-shadow: var(--shadow-lg);
}
.github-star-prompt__header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: var(--space-md);
}
.github-star-prompt__title-wrap {
display: inline-flex;
align-items: center;
gap: var(--space-sm);
color: var(--text);
}
.github-star-prompt__title-wrap h3 {
margin: 0;
font-size: var(--space-lg);
}
.github-star-prompt p {
margin: var(--space-md) 0 0;
color: var(--text-muted);
line-height: 1.5;
}
.github-star-prompt__actions {
display: flex;
justify-content: flex-start;
margin-top: var(--space-lg);
}
.github-star-prompt__cta {
display: inline-flex;
align-items: center;
gap: var(--space-sm);
}
.github-star-prompt__dismiss {
color: var(--text-muted);
}
.github-star-prompt__dismiss:hover {
color: var(--text);
}
@media (max-width: 768px) {
.github-star-prompt {
right: var(--space-md);
bottom: calc(var(--space-2xl) * 3 + var(--space-lg));
left: var(--space-md);
width: auto;
padding: var(--space-md);
}
.github-star-prompt__actions {
width: 100%;
}
.github-star-prompt__cta {
width: 100%;
justify-content: center;
}
}