Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(reviews): add PR status tabs and linked session chips (#7714)
dev-rb75b7903137fd
diff --git a/apps/web/src/features/block-pr/views/PrDetail.tsx b/apps/web/src/features/block-pr/views/PrDetail.tsxindex a8d031cf4b..dba58fddc0 100644--- a/apps/web/src/features/block-pr/views/PrDetail.tsx+++ b/apps/web/src/features/block-pr/views/PrDetail.tsx@@ -9,6 +9,7 @@ import {StaticMarkdownContext,} from '@core/component/LexicalMarkdown/component/core/StaticMarkdown';import { GithubLabelPills } from '@entity/components/GithubLabelPill';+import { PrAgentSessionsChip } from '@entity/views/PrAgentSessionsChip';import { DebouncedNotificationReadMarker } from '@notifications';import {type GithubPullRequestWithDetails,@@ -343,6 +344,12 @@ function PrMetadata(props: {</Show></Layer></Show>+ <Layer depth={2}>+ <PrAgentSessionsChip+ url={props.pullRequest?.url ?? prHtmlUrl(props.prRef)}+ class="border-edge-muted bg-surface px-2 text-sm font-normal"+ />+ </Layer><GithubLabelPillslabels={props.pullRequest?.labels ?? []}class="contents"diff --git a/apps/web/src/features/entity/components/PrAgentSessionsChip.tsx b/apps/web/src/features/entity/components/PrAgentSessionsChip.tsxnew file mode 100644index 0000000000..705bffa7b5--- /dev/null+++ b/apps/web/src/features/entity/components/PrAgentSessionsChip.tsx@@ -0,0 +1,97 @@+import SparkleIcon from '@phosphor/sparkle.svg';+import { Button, cn, Dropdown } from '@ui';+import type { ParentProps } from 'solid-js';++function ChipLabel(props: { label: string }) {+ return (+ <>+ <SparkleIcon class="size-3 shrink-0 text-chat" aria-hidden="true" />+ <span class="min-w-0 truncate">{props.label}</span>+ </>+ );+}++export function PrAgentSessionChip(props: {+ label: string;+ disabled?: boolean;+ class?: string;+ onOpen: (event: MouseEvent) => void;+}) {+ return (+ <Button+ variant="ghost"+ size="xs"+ noTouchResize+ class={cn(+ 'h-auto min-w-0 max-w-48 gap-1.5 rounded-full border-edge bg-surface/50 px-1.5 py-1 text-xs font-medium leading-tight text-ink-muted',+ props.class+ )}+ title={props.label}+ label={`Open agent session: ${props.label}`}+ disabled={props.disabled}+ onClick={(event) => {+ event.stopPropagation();+ props.onOpen(event);+ }}+ onKeyDown={(event) => {+ if (event.key === 'Enter' || event.key === ' ') event.stopPropagation();+ }}+ >+ <ChipLabel label={props.label} />+ </Button>+ );+}++export function PrAgentSessionsCountChip(+ props: ParentProps<{+ count: number;+ open: boolean;+ onOpenChange: (open: boolean) => void;+ class?: string;+ }>+) {+ const label = () => `${props.count} agent sessions`;+ return (+ <Dropdown open={props.open} onOpenChange={props.onOpenChange}>+ <Dropdown.Trigger+ variant="ghost"+ size="xs"+ noTouchResize+ class={cn(+ 'h-auto min-w-0 max-w-48 gap-1.5 rounded-full border-edge bg-surface/50 px-1.5 py-1 text-xs font-medium leading-tight text-ink-muted',+ props.class+ )}+ title={label()}+ label={`Show ${label()}`}+ onClick={(event: MouseEvent) => event.stopPropagation()}+ onKeyDown={(event: KeyboardEvent) => {+ if (event.key === 'Enter' || event.key === ' ')+ event.stopPropagation();+ }}+ >+ <ChipLabel label={label()} />+ </Dropdown.Trigger>+ <Dropdown.Content+ class="min-w-56 max-w-80"+ onClick={(event: MouseEvent) => event.stopPropagation()}+ >+ <Dropdown.Group>+ <Dropdown.GroupLabel>Linked agent sessions</Dropdown.GroupLabel>+ {props.children}+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ );+}++export function PrAgentSessionMenuItem(props: {+ label: string;+ disabled?: boolean;+ onOpen: () => void;+}) {+ return (+ <Dropdown.Item disabled={props.disabled} onSelect={props.onOpen}>+ <ChipLabel label={props.label} />+ </Dropdown.Item>+ );+}diff --git a/apps/web/src/features/entity/composed/list-entity/foreign.tsx b/apps/web/src/features/entity/composed/list-entity/foreign.tsxindex d4eb1eeb49..027fc93830 100644--- a/apps/web/src/features/entity/composed/list-entity/foreign.tsx+++ b/apps/web/src/features/entity/composed/list-entity/foreign.tsx@@ -18,6 +18,7 @@ import {} from 'solid-js';import { Dynamic } from 'solid-js/web';import type { GithubPullRequestEntity } from '../../types/entity';+import { PrAgentSessionsChip } from '../../views/PrAgentSessionsChip';type PillProps = {children: JSX.Element;@@ -499,6 +500,7 @@ export function GithubPullRequestPills(props: {<ChatCircle class="size-3 shrink-0" />{numberFormatter.format(props.entity.metadata.comments.length)}</Pill>+ <PrAgentSessionsChip url={props.entity.metadata.url} /></>);}diff --git a/apps/web/src/features/entity/composed/list-entity/narrow-layout.tsx b/apps/web/src/features/entity/composed/list-entity/narrow-layout.tsxindex 0008e7a7de..58778270b3 100644--- a/apps/web/src/features/entity/composed/list-entity/narrow-layout.tsx+++ b/apps/web/src/features/entity/composed/list-entity/narrow-layout.tsx@@ -15,17 +15,15 @@ import {ChannelMessageSingleLine,} from './channel';import { EmailInboxChip } from './email';-import { GithubAuthorBadge } from './foreign';+import { GithubPullRequestPills } from './foreign';import { RowEnd } from './row-end';import { SOUP_ROW_CLASS } from './row-geometry';import { type LayoutProps, RowIndicator } from './shared';export function NarrowLayout(props: LayoutProps) {- const reviewWithAuthor = () => {+ const pullRequest = () => {const entity = props.entity;- if (!isGithubPrEntity(entity)) return;- if (!entity.metadata.authorLogin && !entity.metadata.authorId) return;- return entity;+ return isGithubPrEntity(entity) ? entity : undefined;};return (<Entity.Layout@@ -36,8 +34,10 @@ export function NarrowLayout(props: LayoutProps) {style={{'grid-template-columns':'var(--soup-row-indicator-width) 1fr max-content',- 'grid-template-rows': '44px',- 'grid-template-areas': '"indicator title timestamp"',+ 'grid-template-rows': pullRequest() ? '44px auto' : '44px',+ 'grid-template-areas': pullRequest()+ ? '"indicator title timestamp" ". body body"'+ : '"indicator title timestamp"',}}><Entity.Slot placement="indicator" class="relative">@@ -62,16 +62,6 @@ export function NarrowLayout(props: LayoutProps) {>{(entity) => <ChannelMessageSingleLine entity={entity()} />}</Show>- <Show when={reviewWithAuthor()}>- {(review) => (- <span class="max-w-32 shrink-0 overflow-hidden text-xs font-normal text-ink-muted">- <GithubAuthorBadge- entity={review()}- displayName={props.authorDisplayName}- />- </span>- )}- </Show><Show when={isEmailEntity(props.entity) && props.entity}>{(entity) => <EmailInboxChip entity={entity()} class="ml-auto" />}</Show>@@ -95,6 +85,20 @@ export function NarrowLayout(props: LayoutProps) {</Show></Entity.Slot>+ <Show when={pullRequest()}>+ {(review) => (+ <Entity.Slot+ placement="body"+ class="flex min-w-0 flex-wrap items-center gap-1.5 pb-2"+ >+ <GithubPullRequestPills+ entity={review()}+ authorDisplayName={props.authorDisplayName}+ />+ </Entity.Slot>+ )}+ </Show>+<Showwhen={props.scheduleStatus ||diff --git a/apps/web/src/features/entity/views/PrAgentSessionsChip.tsx b/apps/web/src/features/entity/views/PrAgentSessionsChip.tsxnew file mode 100644index 0000000000..fde850e83d--- /dev/null+++ b/apps/web/src/features/entity/views/PrAgentSessionsChip.tsx@@ -0,0 +1,97 @@+import { useSplitLayout } from '@components/app/split-layout/layout';+import { useAgentSessionMentionPreview } from '@queries/agent-session/mentions';+import { usePullRequestAgentSessionsQuery } from '@queries/agent-session/pull-requests';+import { type Accessor, createSignal, For, Show, Suspense } from 'solid-js';+import {+ PrAgentSessionChip,+ PrAgentSessionMenuItem,+ PrAgentSessionsCountChip,+} from '../components/PrAgentSessionsChip';++function useSessionDisplay(id: Accessor<string>, enabled: Accessor<boolean>) {+ const preview = useAgentSessionMentionPreview(id, enabled);+ const current = () => (preview.isSuccess ? preview.data : undefined);+ return {+ available: () => current()?.access === 'access',+ label: () => {+ const session = current();+ if (session?.access === 'access')+ return session.data.name || 'Agent session';+ if (session?.access === 'no_access') return 'Private agent session';+ if (session?.access === 'does_not_exist') return 'Deleted agent session';+ return preview.isError ? 'Agent session unavailable' : 'Agent session';+ },+ };+}++function LinkedSessionMenuItem(props: {+ sessionId: string;+ canOpen: boolean;+ onOpen: (sessionId: string) => void;+}) {+ const session = useSessionDisplay(+ () => props.sessionId,+ () => true+ );+ return (+ <PrAgentSessionMenuItem+ label={session.label()}+ disabled={!session.available() || !props.canOpen}+ onOpen={() => props.onOpen(props.sessionId)}+ />+ );+}++/** Shared, permission-aware linked-session metadata for PR rows and details. */+export function PrAgentSessionsChip(props: { url?: string; class?: string }) {+ const layout = useSplitLayout();+ const links = usePullRequestAgentSessionsQuery(() => props.url);+ const sessionIds = () => (props.url && links.isSuccess ? links.data : []);+ const single = useSessionDisplay(+ () => (sessionIds().length === 1 ? sessionIds()[0] : ''),+ () => sessionIds().length === 1+ );+ const [menuOpen, setMenuOpen] = createSignal(false);+ const openSession = (sessionId: string, newSplit = false) =>+ layout?.openWithSplit(+ { type: 'agent', id: sessionId },+ { preferNewSplit: newSplit }+ );++ return (+ <Suspense>+ <Show when={sessionIds().length > 0}>+ <Show+ when={sessionIds().length === 1}+ fallback={+ <PrAgentSessionsCountChip+ count={sessionIds().length}+ open={menuOpen()}+ onOpenChange={setMenuOpen}+ class={props.class}+ >+ <Show when={menuOpen()}>+ <For each={sessionIds()}>+ {(sessionId) => (+ <LinkedSessionMenuItem+ sessionId={sessionId}+ canOpen={Boolean(layout)}+ onOpen={openSession}+ />+ )}+ </For>+ </Show>+ </PrAgentSessionsCountChip>+ }+ >+ <PrAgentSessionChip+ label={single.label()}+ disabled={!single.available() || !layout}+ class={props.class}+ onOpen={(event) => openSession(sessionIds()[0], event.shiftKey)}+ />+ </Show>+ </Show>+ </Suspense>+ );+}diff --git a/apps/web/src/features/reviews-view/components/ReviewsControls.tsx b/apps/web/src/features/reviews-view/components/ReviewsControls.tsxindex 6175a04280..b72b907408 100644--- a/apps/web/src/features/reviews-view/components/ReviewsControls.tsx+++ b/apps/web/src/features/reviews-view/components/ReviewsControls.tsx@@ -15,6 +15,7 @@ import type {ReviewsFilterSelection,ReviewsReviewFilterId,ReviewsSortId,+ ReviewsStatusFilterId,} from '../reviews-types';export type ReviewsControlProps = {@@ -42,6 +43,12 @@ const SORT_OPTIONS: ListControlOption<ReviewsSortId>[] = [{ id: 'oldest', label: 'Oldest' },];+const STATUS_OPTIONS: ListControlOption<ReviewsStatusFilterId>[] = [+ { id: 'open', label: 'Open' },+ { id: 'closed', label: 'Closed' },+ { id: 'merged', label: 'Merged' },+];+const REVIEW_OPTIONS: ListControlOption<ReviewsReviewFilterId>[] = [{ id: 'reviewed_by_me', label: 'Reviewed by you' },{ id: 'not_reviewed_by_me', label: 'Not reviewed by you' },@@ -52,6 +59,7 @@ function filterGroups(props: ReviewsControlProps): ListFilterGroup<ReviewsFilterId, string>[] {return [+ { id: 'status', label: 'Status', options: STATUS_OPTIONS },{id: 'repository',label: 'Repository',diff --git a/apps/web/src/features/reviews-view/components/ReviewsStatusTabs.tsx b/apps/web/src/features/reviews-view/components/ReviewsStatusTabs.tsxnew file mode 100644index 0000000000..d6c05758c9--- /dev/null+++ b/apps/web/src/features/reviews-view/components/ReviewsStatusTabs.tsx@@ -0,0 +1,27 @@+import { Tabs } from '@ui';+import type { ReviewsStatusTabId } from '../reviews-types';++const STATUS_TABS: { value: ReviewsStatusTabId; label: string }[] = [+ { value: 'open', label: 'Open' },+ { value: 'closed', label: 'Closed' },+];++export function ReviewsStatusTabs(props: {+ value: ReviewsStatusTabId | undefined;+ onChange: (value: ReviewsStatusTabId) => void;+}) {+ const onChange = (value: string) => {+ if (value === 'open' || value === 'closed') {+ props.onChange(value);+ }+ };++ return (+ <Tabs+ aria-label="Pull request status"+ list={STATUS_TABS}+ value={props.value ?? ''}+ onChange={onChange}+ />+ );+}diff --git a/apps/web/src/features/reviews-view/core/reviews-status.ts b/apps/web/src/features/reviews-view/core/reviews-status.tsnew file mode 100644index 0000000000..665a5e6db9--- /dev/null+++ b/apps/web/src/features/reviews-view/core/reviews-status.ts@@ -0,0 +1,36 @@+import type {+ ReviewsStatusFilterId,+ ReviewsStatusTabId,+} from '../reviews-types';++/** Only highlight a tab when the menu selection matches the whole preset. */+export function reviewsStatusTab(+ statuses: readonly string[]+): ReviewsStatusTabId | undefined {+ if (statuses.length === 1 && statuses[0] === 'open') return 'open';+ if (+ statuses.length === 2 &&+ statuses.includes('closed') &&+ statuses.includes('merged')+ ) {+ return 'closed';+ }+ return undefined;+}++/** Keep the combined Closed preset visible, but hide custom multi-selections. */+export const showReviewsStatusTabs = (statuses: readonly string[]) =>+ statuses.length <= 1 || reviewsStatusTab(statuses) !== undefined;++const STATUS_TAB_SELECTIONS: Record<+ ReviewsStatusTabId,+ ReviewsStatusFilterId[]+> = {+ open: ['open'],+ closed: ['closed', 'merged'],+};++/** Closed includes merged PRs; menu choices remain independently selectable. */+export const reviewsStatusTabSelection = (+ tab: ReviewsStatusTabId+): ReviewsStatusFilterId[] => [...STATUS_TAB_SELECTIONS[tab]];diff --git a/apps/web/src/features/reviews-view/queries/use-reviews-query.ts b/apps/web/src/features/reviews-view/queries/use-reviews-query.tsindex 8cffde946f..382ca5924f 100644--- a/apps/web/src/features/reviews-view/queries/use-reviews-query.ts+++ b/apps/web/src/features/reviews-view/queries/use-reviews-query.ts@@ -71,6 +71,8 @@ const SCOPE_FIELDS: Partial<Record<ReviewsScope, string>> = {export const reviewsQueryBody = (filter: ReviewsServerFilter) => {const { filters, viewerGithubUserId: viewer } = filter;const pullRequest: TargetExpr[] = [];+ if (filters.status.length > 0)+ pullRequest.push(anyOf('githubPullRequestStatus', filters.status));if (filters.repository.length > 0)pullRequest.push(anyOf('githubPullRequestRepositoryId', filters.repository)diff --git a/apps/web/src/features/reviews-view/reviews-types.ts b/apps/web/src/features/reviews-view/reviews-types.tsindex f125331d6b..959f0a10d4 100644--- a/apps/web/src/features/reviews-view/reviews-types.ts+++ b/apps/web/src/features/reviews-view/reviews-types.ts@@ -14,7 +14,10 @@ export type ReviewsReviewFilterId =| 'reviewed_by_me'| 'not_reviewed_by_me'| 'awaiting_my_review';+export type ReviewsStatusFilterId = 'open' | 'closed' | 'merged';+export type ReviewsStatusTabId = 'open' | 'closed';export type ReviewsFilterId =+ | 'status'| 'repository'| 'author'| 'assignee'@@ -24,6 +27,7 @@ export type ReviewsFilterId =export type ReviewsFilterSelection = Record<ReviewsFilterId, readonly string[]>;export const EMPTY_REVIEWS_FILTERS: ReviewsFilterSelection = {+ status: [],repository: [],author: [],assignee: [],@@ -31,6 +35,12 @@ export const EMPTY_REVIEWS_FILTERS: ReviewsFilterSelection = {review: [],};+/** Default and reset state for the Reviews list. */+export const DEFAULT_REVIEWS_FILTERS: ReviewsFilterSelection = {+ ...EMPTY_REVIEWS_FILTERS,+ status: ['open'],+};+/** Sidebar order, which the tab hotkeys follow. */export const REVIEWS_SCOPES: readonly ReviewsScope[] = ['all',diff --git a/apps/web/src/features/reviews-view/reviews-view.tsx b/apps/web/src/features/reviews-view/reviews-view.tsxindex 96b1252686..26221780d5 100644--- a/apps/web/src/features/reviews-view/reviews-view.tsx+++ b/apps/web/src/features/reviews-view/reviews-view.tsx@@ -1,5 +1,6 @@import {SearchBar,+ useViewShell,ViewBreadcrumbs,ViewShell,} from '@app/components/view-shell';@@ -34,6 +35,12 @@ import {} from './components/ReviewsControls';import { ReviewsList } from './components/ReviewsList';import { ReviewsSidebar } from './components/ReviewsSidebar';+import { ReviewsStatusTabs } from './components/ReviewsStatusTabs';+import {+ reviewsStatusTab,+ reviewsStatusTabSelection,+ showReviewsStatusTabs,+} from './core/reviews-status';import { createReviewsListController } from './primitives/create-reviews-list-controller';import { useReviewsFacetsQuery } from './queries/use-reviews-facets-query';import { useReviewsQuery } from './queries/use-reviews-query';@@ -41,14 +48,16 @@ import { effectiveReviewsFilters, searchReviews } from './reviews-filter';import { reviewsHostedContent } from './reviews-hosted-content';import { reviewsTabSearch, reviewsTabSearchCodec } from './reviews-tab-search';import {- EMPTY_REVIEWS_FILTERS,+ DEFAULT_REVIEWS_FILTERS,REVIEWS_SCOPES,type ReviewsFilterId,type ReviewsFilterSelection,type ReviewsScope,type ReviewsSortId,+ type ReviewsStatusTabId,scopeMatchesViewerGithubId,} from './reviews-types';+import { ReviewsListTopBar } from './views/ReviewsListTopBar';const REVIEW_SCOPE_TITLES: Record<ReviewsScope, string> = {all: 'Pull requests',@@ -60,6 +69,17 @@ const REVIEW_SCOPE_TITLES: Record<ReviewsScope, string> = {const REVIEW_SCOPE_TABS: PillTabItem<ReviewsScope>[] = REVIEWS_SCOPES.map((scope) => ({ value: scope, label: REVIEW_SCOPE_TITLES[scope] }));+function ReviewsListScopeHeading(props: { title: string }) {+ const shell = useViewShell();+ return (+ <Show when={shell.breakpoints.narrow?.() || shell.aside.isCollapsed()}>+ <div class="flex h-8 min-w-0 items-center">+ <h2 class="truncate text-xl font-semibold text-ink">{props.title}</h2>+ </div>+ </Show>+ );+}+function ReviewsRoot() {const panel = useSplitPanelOrThrow();const layout = useSplitLayout();@@ -74,7 +94,7 @@ function ReviewsRoot() {const [search, setSearch] = createSignal('');const [sort, setSort] = createSignal<ReviewsSortId>('recently_updated');const [filters, setFilters] = createSignal<ReviewsFilterSelection>(- EMPTY_REVIEWS_FILTERS+ DEFAULT_REVIEWS_FILTERS);const listVisible = () => !params.foreignEntityId;const githubLink = useGithubLinkStatusQuery({ enabled: listVisible });@@ -111,7 +131,13 @@ function ReviewsRoot() {[group]: selected ? [...ids, id] : ids.filter((value) => value !== id),};});- const clearFilters = () => setFilters(EMPTY_REVIEWS_FILTERS);+ const clearFilters = () => setFilters(DEFAULT_REVIEWS_FILTERS);+ const statusTab = () => reviewsStatusTab(filters().status);+ const selectStatusTab = (status: ReviewsStatusTabId) =>+ setFilters((current) => ({+ ...current,+ status: reviewsStatusTabSelection(status),+ }));const clearSearch = () => setSearch('');const searchForTab = (tab: ReviewsScope) => ({[reviewsTabSearch.namespace]: reviewsTabSearchCodec.serialize({ tab }),@@ -172,25 +198,13 @@ function ReviewsRoot() {});const list = () => (<>- <ViewShell.TopBar>- <h1 class="hidden min-w-0 truncate text-sm font-semibold text-ink @max-[720px]/view-shell:block">- {scopeTitle()}- </h1>- <ViewBreadcrumbs.Outlet- class="@max-[720px]/view-shell:hidden"- aria-label="Review location"- />- </ViewShell.TopBar>+ <ReviewsListTopBar /><ViewShell.Header><Showwhen={isTouchDevice()}fallback={- <div class="flex min-w-0 flex-col @max-[720px]/view-shell:gap-3">- <div class="hidden h-8 items-center @max-[720px]/view-shell:flex">- <h1 class="truncate text-xl font-semibold text-ink">- {scopeTitle()}- </h1>- </div>+ <div class="flex min-w-0 flex-col gap-3">+ <ReviewsListScopeHeading title={scopeTitle()} /><div class="flex min-w-0 items-center justify-between gap-3"><SearchBarlabel="Search reviews"@@ -222,6 +236,11 @@ function ReviewsRoot() {/></div></Show>+ <Show when={showReviewsStatusTabs(filters().status)}>+ <div class="mt-3 min-w-0 overflow-x-auto">+ <ReviewsStatusTabs value={statusTab()} onChange={selectStatusTab} />+ </div>+ </Show></ViewShell.Header><ViewShell.Content><ReviewsList@@ -240,7 +259,10 @@ function ReviewsRoot() {: githubLink.data?.status}search={search()}- hasFilters={activeReviewsFilterCount(activeFilters()) > 0}+ hasFilters={+ activeReviewsFilterCount(activeFilters()) >+ (statusTab() === 'open' ? 1 : 0)+ }onClearFilters={clearFilters}onClearSearch={clearSearch}onOpen={openReview}diff --git a/apps/web/src/features/reviews-view/views/ReviewsListTopBar.tsx b/apps/web/src/features/reviews-view/views/ReviewsListTopBar.tsxnew file mode 100644index 0000000000..43660d308f--- /dev/null+++ b/apps/web/src/features/reviews-view/views/ReviewsListTopBar.tsx@@ -0,0 +1,24 @@+import {+ useViewShell,+ ViewBreadcrumbs,+ ViewShell,+} from '@app/components/view-shell';+import { Show } from 'solid-js';++/** Keep the workspace name visible when navigation no longer names the view. */+export function ReviewsListTopBar() {+ const shell = useViewShell();+ const compact = () =>+ shell.breakpoints.narrow?.() || shell.aside.isCollapsed();++ return (+ <ViewShell.TopBar>+ <Show+ when={compact()}+ fallback={<ViewBreadcrumbs.Outlet aria-label="Review location" />}+ >+ <h1 class="min-w-0 truncate text-sm font-semibold text-ink">Reviews</h1>+ </Show>+ </ViewShell.TopBar>+ );+}diff --git a/docs/AGENT_GUIDE/surfaces.md b/docs/AGENT_GUIDE/surfaces.mdindex a24ee6aeed..709216b91c 100644--- a/docs/AGENT_GUIDE/surfaces.md+++ b/docs/AGENT_GUIDE/surfaces.md@@ -361,7 +361,11 @@ focus without opening a task until activation. In an open task detail, theyreplace it with the next or previous task in the same filtered order.When `enable-tasks-reviews` is enabled, `Reviews` appears above `My Tasks` as a-shortcut to the separate Reviews view. It lists relevant open GitHub pull requests;+shortcut to the separate Reviews view. It lists accessible GitHub pull requests;+Open/Closed tabs below search and filters default to Open; Closed includes merged+PRs. Status also remains in the filter menu. Custom multi-status selections hide+the tabs except for the combined Closed preset.+The list topbar says Reviews at narrow widths or with its sidebar collapsed;selecting one opens `/app/reviews/pr/<foreignEntityId>` with a Reviews breadcrumb.See [Tasks](tasks.md#reviews-view) for verification.@@ -1519,6 +1523,14 @@ GitHub's permissions and branch protections decide; a refusal appears as a toastwith GitHub's reason, and a merge refreshes the PR status in place. Without a linkedGitHub account the toast points to Settings. Merged and closed PRs have no Mergebutton. PRs are not tasks and do not appear in the Tasks list.+The metadata pills beneath the PR title include linked agent sessions, using the+agent sparkle icon. A single session shows its name; several sessions show a+count chip opening a session list. Selecting a session opens it, with Shift-click+on the single-session chip opening another split. The same chip appears in PR+list metadata without activating its containing PR row. Empty links show no chip;+loading or inaccessible session previews are not navigable. PR status pills stay+passive; status filtering uses the Reviews list's Open/Closed sliding tabs and+filter menu.Opening **Changes** slides a full-height pane in from the right beside the PR details,including beside the PR top bar rather than underneath it. The PR details shrinkalongside the entry slide instead of eagerly jumping narrower. The Changes panediff --git a/docs/AGENT_GUIDE/tasks.md b/docs/AGENT_GUIDE/tasks.mdindex 971c7704b7..82a39f8f1f 100644--- a/docs/AGENT_GUIDE/tasks.md+++ b/docs/AGENT_GUIDE/tasks.md@@ -99,9 +99,18 @@ review requests.`Authored by me`, `Assigned to me`, and `Review requests` match the linkedGitHub user ID. If the link-status endpoint has no identity, the list explainswhy the tab is unavailable.-Search, filter, and sort controls appear above the list. Filters cover-repository, author, assignee, label, and, when a GitHub identity is linked,-reviews (Reviewed by you, Not reviewed by you, and Awaiting review from you).+Search, filter, and sort controls appear above the list. Below them, the same+sliding tabs used by Chat offer Open and Closed. Open is the default; Closed+includes both closed and merged PRs. The filter dropdown and mobile drawer also+offer independent Open, Closed, and Merged selections. Custom multi-status+selections hide the tabs, except the combined Closed preset keeps them visible.+A partial Closed-only or Merged-only selection leaves both tabs unhighlighted.+Status combines with other filters, counts toward filter badges, and applies+before pagination. Clearing filters resets to Open. Other filters cover repository,+author, assignee, label, and, when a GitHub identity is linked, reviews (Reviewed+by you, Not reviewed by you, and Awaiting review from you). The list topbar says+Reviews when narrow or when the sidebar is collapsed; the selected scope stays+visible as a heading above search.Saved review selections stay inactive, including their filter badge and empty-statecopy, while the GitHub identity is unavailable; they resume when it returns.Sort offers Recently updated, Least recently updated, Newest, and Oldest. When visible PRs@@ -112,6 +121,14 @@ author avatars and names, and a context menu. The current user's Macro displayname appears when their linked GitHub identity matches the PR author; otherauthors fall back to GitHub names. The virtualized list fetches more pages asyou scroll, including when local filtering removes most fetched rows.+Linked agent sessions appear alongside the row's other metadata pills and beneath+the PR detail title. Narrow PR rows put wrapping metadata below the title, keeping+session chips visible without squeezing the title. One session shows its name with the agent sparkle icon;+multiple sessions show a count chip that opens a list of names. Selecting a name+opens that session; Shift-click on the single-session chip opens another split.+Chip clicks do not open or select the containing PR row. Empty results have no+chip, and loading, private, deleted, or unavailable sessions never offer navigation.+The PR's status pill stays passive; status filtering lives in the Reviews list tabs.PR rows can be added to or removed from Favorites through their context menu orbulk entity actions. When at least one accessible PR is favorited, Reviews shows@@ -153,6 +170,15 @@ sidebar, return through the breadcrumb, and open a copied link in a second splitOpen a PR's Changes pane; check the file tree, a file's diff, **Unified / Split**,refresh after new commits, and that reloading with `s<N>.changes.pane` in the URLrestores the pane. Check session loading/error/empty copy and full-name tooltips.+Check both status tabs and the menu's individual statuses. Confirm Closed includes+merged PRs, custom multi-status choices hide the tabs, and Clear filters returns+to Open. Combine status with a repository filter while loading another page.+Repeat on touch. Check the tabs follow search and filters, and that the topbar+shows Reviews after narrowing or collapsing navigation.+Check zero, one, and multiple linked sessions in PR rows and beneath the detail+title, including keyboard activation and a long name. Open the count menu, choose+a session, and confirm the PR row was not activated. Check permission-denied and+loading session previews remain disabled.Use existing PRs and do not modify hosted data.## Create a task