Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- CLI: Local Worker lifecycle controls with `worker status --all` and ownership-safe `worker stop`. (#195)

### πŸ’… Changed
- UI: refine standby banner notification chrome with an accent hairline, standby pulse, and monospace branch/PR chips. (#297)
- Task: simplify the node header into a Note-style actions menu, shorten the run button label, and compact agent session rows to icon, state, and time. (#294)
- Settings: reorganize the panel into user-oriented groups for display/fonts, canvas/windows, AI assistants, tasks/shortcuts, worker connections, integrations, and advanced tools while preserving search and legacy section routing. (#266)
- Worker: Desktop now versions local-worker reuse and repairs legacy connection files before reconnecting, preventing installed upgrades from reusing stale runtimes and bypassing persistence repair. (#264)
Expand Down
171 changes: 106 additions & 65 deletions src/app/renderer/shell/components/AppNotifications.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import React from 'react'
import { Bot, X } from 'lucide-react'
import {
GitBranch,
GitCommitHorizontal,
GitPullRequest,
LayoutGrid,
ListTodo,
X,
} from 'lucide-react'
import { useTranslation } from '@app/renderer/i18n'

export type AgentStandbyNotificationGitContext =
Expand Down Expand Up @@ -93,76 +100,110 @@ export function AppNotifications({
onActivate(notification)
}}
>
<span className="app-notification__icon" aria-hidden="true">
<Bot size={18} />
</span>
<span className="app-notification__content">
<span className="app-notification__title">{notification.title}</span>
<span className="app-notification__subtitle">{subtitle}</span>
{contextVisibility.showTask ||
contextVisibility.showSpace ||
contextVisibility.showBranch ||
contextVisibility.showPullRequest ? (
<span className="app-notification__context">
{contextVisibility.showTask && notification.taskTitle ? (
<span
className="app-notification__chip"
data-testid="app-notification-chip-task"
title={notification.taskTitle}
>
<span className="app-notification__chip-kind">{taskKindLabel}</span>
<span className="app-notification__chip-value">{notification.taskTitle}</span>
</span>
) : null}

{contextVisibility.showSpace && notification.spaceName ? (
<span
className="app-notification__chip"
data-testid="app-notification-chip-space"
title={notification.spaceName}
>
<span className="app-notification__chip-kind">{spaceKindLabel}</span>
<span className="app-notification__chip-value">{notification.spaceName}</span>
</span>
) : null}
<span className="app-notification__meta">
<span className="app-notification__subtitle">
<span className="app-notification__status-dot" aria-hidden="true" />
{subtitle}
</span>
{contextVisibility.showTask ||
contextVisibility.showSpace ||
contextVisibility.showBranch ||
contextVisibility.showPullRequest ? (
<span className="app-notification__context">
{contextVisibility.showTask && notification.taskTitle ? (
<span
className="app-notification__chip"
data-testid="app-notification-chip-task"
title={`${taskKindLabel}: ${notification.taskTitle}`}
aria-label={`${taskKindLabel}: ${notification.taskTitle}`}
>
<ListTodo
size={12}
className="app-notification__chip-icon"
aria-hidden="true"
/>
<span className="app-notification__chip-value">
{notification.taskTitle}
</span>
</span>
) : null}

{contextVisibility.showBranch && notification.gitContext ? (
<span
className="app-notification__chip"
data-testid="app-notification-chip-branch"
title={
notification.gitContext.kind === 'branch'
? notification.gitContext.name
: notification.gitContext.head
}
>
<span className="app-notification__chip-kind">
{notification.gitContext.kind === 'branch'
? branchKindLabel
: detachedKindLabel}
{contextVisibility.showSpace && notification.spaceName ? (
<span
className="app-notification__chip"
data-testid="app-notification-chip-space"
title={`${spaceKindLabel}: ${notification.spaceName}`}
aria-label={`${spaceKindLabel}: ${notification.spaceName}`}
>
<LayoutGrid
size={12}
className="app-notification__chip-icon"
aria-hidden="true"
/>
<span className="app-notification__chip-value">
{notification.spaceName}
</span>
</span>
<span className="app-notification__chip-value">
{notification.gitContext.kind === 'branch'
? notification.gitContext.name
: notification.gitContext.shortHead}
) : null}

{contextVisibility.showBranch && notification.gitContext ? (
<span
className="app-notification__chip app-notification__chip--code"
data-testid="app-notification-chip-branch"
title={
notification.gitContext.kind === 'branch'
? `${branchKindLabel}: ${notification.gitContext.name}`
: `${detachedKindLabel}: ${notification.gitContext.head}`
}
aria-label={
notification.gitContext.kind === 'branch'
? `${branchKindLabel}: ${notification.gitContext.name}`
: `${detachedKindLabel}: ${notification.gitContext.shortHead}`
}
>
{notification.gitContext.kind === 'branch' ? (
<GitBranch
size={12}
className="app-notification__chip-icon"
aria-hidden="true"
/>
) : (
<GitCommitHorizontal
size={12}
className="app-notification__chip-icon"
aria-hidden="true"
/>
)}
<span className="app-notification__chip-value">
{notification.gitContext.kind === 'branch'
? notification.gitContext.name
: notification.gitContext.shortHead}
</span>
</span>
</span>
) : null}
) : null}

{contextVisibility.showPullRequest && notification.pullRequest ? (
<span
className="app-notification__chip"
data-testid="app-notification-chip-pr"
title={`${notification.pullRequest.title} (#${notification.pullRequest.number})`}
>
<span className="app-notification__chip-kind">PR</span>
<span className="app-notification__chip-value">
{`#${notification.pullRequest.number}`}
{contextVisibility.showPullRequest && notification.pullRequest ? (
<span
className="app-notification__chip app-notification__chip--code"
data-testid="app-notification-chip-pr"
title={`${notification.pullRequest.title} (#${notification.pullRequest.number})`}
aria-label={`PR #${notification.pullRequest.number}: ${notification.pullRequest.title}`}
>
<GitPullRequest
size={12}
className="app-notification__chip-icon"
aria-hidden="true"
/>
<span className="app-notification__chip-value">
{`#${notification.pullRequest.number}`}
</span>
</span>
</span>
) : null}
</span>
) : null}
) : null}
</span>
) : null}
</span>
</span>
<button
type="button"
Expand All @@ -176,7 +217,7 @@ export function AppNotifications({
onDismiss(notification.id)
}}
>
<X size={16} aria-hidden="true" />
<X size={14} aria-hidden="true" />
</button>
</div>
)
Expand Down
Loading
Loading