feat(frontend): Make Home about the work, and the overview about the agent - #5772
feat(frontend): Make Home about the work, and the overview about the agent#5772ardaerzin wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis change adds session handoff, shared session actions, agent overview surfaces, a redesigned Home experience, and a Sessions UX plan. It also adds seed attachments, template list support, agent activity data, full-height layout requests, and a warning color token. ChangesAgent UX surfaces
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant SessionListCard
participant useOpenAgentSession
participant pendingSessionOpenAtom
participant AgentChatPanel
participant session-adoption atom
SessionListCard->>useOpenAgentSession: open session target
useOpenAgentSession->>pendingSessionOpenAtom: store target
useOpenAgentSession->>AgentChatPanel: navigate to playground
AgentChatPanel->>pendingSessionOpenAtom: consume target
AgentChatPanel->>session-adoption atom: adopt or create session
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 14
🧹 Nitpick comments (14)
web/oss/src/components/pages/sessions/components/SessionListCard.tsx (1)
118-121: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueShorten the design-rationale comments.
These comments explain visual intent over several lines. The guidelines limit in-code comments to one short line, with longer comments reserved for surprising constraints such as bugs, races, or ordering requirements. The
flex-1vsgrownote at Lines 237-241 qualifies; these two do not.As per coding guidelines: "Keep in-code comments to at most one short line; use longer comments only for genuinely surprising constraints such as bugs, races, or ordering requirements."
Also applies to: 137-141
Source: Coding guidelines
web/oss/src/components/pages/agent-home/components/YourAgentsTable/AgentRow.tsx (2)
48-79: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winMemoize the dropdown menu configuration.
Dropdownreceives a new menu object, item array, and icon elements on everyAgentRowrender. Build the menu withuseMemoand depend onactionsandrecord.Source: Coding guidelines
9-17: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueShorten non-essential implementation comments.
These comments explain product history or layout preference. Reduce each to one short constraint-focused line, or move the rationale to PR documentation.
web/oss/src/components/pages/agent-home/components/YourAgentsTable/AgentRow.tsx#L9-L17: reduce the roster-layout rationale to one short constraint.web/oss/src/components/pages/agent-home/components/YourAgentsTable/AgentRow.tsx#L45-L46: remove or shorten the badge-placement rationale.web/oss/src/components/pages/agent-home/components/YourAgentsTable/AgentActivityCell.tsx#L7-L13: reduce the activity-column history to one short constraint.web/oss/src/components/pages/agent-home/components/YourAgentsTable/AgentActivityCell.tsx#L19-L20: reduce the empty-state rationale to one short line.web/oss/src/components/pages/agent-home/assets/agentName.ts#L8-L15: remove the historical naming explanation.web/oss/src/components/pages/agent-home/assets/agentName.ts#L34-L35: use one short truncation constraint.web/oss/src/components/pages/agent-home/hooks/useAgentHomeActions.ts#L17-L20: reduce the handler-placement explanation.web/oss/src/components/pages/agent-home/hooks/useAgentHomeActions.ts#L50-L52: remove the historical roster explanation.web/oss/src/components/TemplateStrip/components/StripRow.tsx#L8-L14: reduce the rail-layout rationale to one short constraint.web/oss/src/components/TemplateStrip/components/StripRow.tsx#L45-L46: remove or shorten the badge-layout rationale.As per coding guidelines, “Keep in-code comments to at most one short line; use longer comments only for genuinely surprising constraints such as bugs, races, or ordering requirements.”
Source: Coding guidelines
web/oss/src/components/TemplateStrip/components/StripRow.tsx (1)
28-32: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse a supported semantic color token.
bg-[var(--ag-strip-selected-bg)]bypasses the approved theme-color sources. Replace it with a semantic Tailwind color utility or a supportedvar(--ag-color*)variable for the selected state.Source: Coding guidelines
web/oss/src/components/pages/agent-home/components/HomeTaskComposer.tsx (1)
29-29: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove the unused
composerRef.
composerRefis only forwarded toRichChatInput. No code in this file reads the handle. Drop the ref and theuseRefimport if nothing else needs them.web/oss/src/components/pages/agent-home/components/HomeSessionsSection.tsx (1)
4-4: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDrop the unused default parameter.
React always calls a component with a props object, so
= {}never applies. Remove it.-const HomeSessionsSection = ({limit}: {limit?: number} = {}) => ( +const HomeSessionsSection = ({limit}: {limit?: number}) => (web/oss/src/components/NewAgentButton/index.tsx (2)
23-26: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winEncode the template key in the query string.
goCreateinterpolatestemplateKeydirectly. UseencodeURIComponentso a key that contains&,=, or a space still round-trips throughrouter.query.template.StripHomereads that param back and matches it againstAGENT_TEMPLATES.- void router.push( - templateKey ? `${baseAppURL}?new=1&template=${templateKey}` : `${baseAppURL}?new=1`, - ) + void router.push( + templateKey + ? `${baseAppURL}?new=1&template=${encodeURIComponent(templateKey)}` + : `${baseAppURL}?new=1`, + )
32-86: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low valueMemoize the dropdown items.
The
menu.itemsarray holds JSX and is rebuilt on every render ofNewAgentButton. Wrap it inuseMemokeyed onbaseAppURL, and wrapgoCreateinuseCallback.As per coding guidelines: "Memoize inline arrays containing objects or JSX when passing them as props to avoid unnecessary rerenders."
Source: Coding guidelines
web/oss/src/components/pages/agent-home/StripHome.tsx (2)
74-79: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract the create-surface URL builder.
${baseAppURL}?new=1&template=${template.key}is built here, inweb/oss/src/components/NewAgentButton/index.tsxat Line 25, and${baseAppURL}?new=1is built again inweb/oss/src/components/pages/agent-home/components/YourAgentsTable/index.tsx. Three call sites now encode the same route contract thatuseAgentHomeVariantsparses. Put acreateAgentHref(baseAppURL, templateKey?)helper next touseAgentHomeVariantsand call it from all three sites. That also gives the encoding fix one home.
136-145: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueShorten the layout rationale comments.
These four blocks run 5 to 10 lines each and describe layout intent rather than a constraint a reader could break. Reduce each to one line, or move the reasoning to the PR description.
As per coding guidelines: "Keep in-code comments to at most one short line; use longer comments only for genuinely surprising constraints such as bugs, races, or ordering requirements."
Also applies to: 168-174, 248-252, 260-264
Source: Coding guidelines
web/oss/src/components/TemplateStrip/index.tsx (1)
232-267: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winThese
isListbranches are unreachable.The list layout returns at Line 156. Below that point
layout !== "list", soisListis alwaysfalse. The ternary at Line 234 always picks"text-[14.5px]", and the guard at Line 239 always renders the inline tabs.showPagerat Line 132 also always takes the non-list path. Remove the three deadisListchecks so a later reader does not treat them as live behavior.♻️ Proposed cleanup
- <span - className={`font-semibold text-[var(--ag-colorText)] ${ - isList ? "text-[13px]" : "text-[14.5px]" - }`} - > + <span className="text-[14.5px] font-semibold text-[var(--ag-colorText)]"> {STRIP_COPY.label} </span> - {isList ? null : ( - <div className="flex items-center"> + <div className="flex items-center">Close the block accordingly, and simplify Line 132:
- const showPager = isList ? false : isGrid ? filtered.length > PAGE_SIZE : scrollPager.showPager + const showPager = isGrid ? filtered.length > PAGE_SIZE : scrollPager.showPagerweb/oss/src/components/UsageSummary/index.tsx (2)
100-103: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winThe collapsed strip still mounts the full dashboard.
HeightCollapserenders its children whether or notopenis true.AnalyticsDashboardtherefore loads its dynamic chunk and renders fourWidgetCards with charts on every page that shows the rail, including Home and the agent overview. The default variant at Line 136 avoids this by gating onexpanded.Gate the child on
expandedwhile keeping the collapse animation for the open transition.♻️ Proposed fix
<HeightCollapse open={expanded}> - <AnalyticsDashboard layout="stack" showTimeRangeSelector={false} /> + {expanded ? ( + <AnalyticsDashboard layout="stack" showTimeRangeSelector={false} /> + ) : null} </HeightCollapse>
56-58: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUpdate the "2×2 grid" comment.
The stats array now holds two entries, so
grid-cols-2renders a single row of two cells. The comment describes four.web/oss/src/components/AgentCard/index.tsx (1)
8-12: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueReduce the new narrative comments.
Replace these comments with one short constraint comment, or move the product rationale to design documentation.
web/oss/src/components/AgentCard/index.tsx#L8-L12: reduce the adapter rationale to one short constraint comment.web/oss/src/components/pages/agent-home/components/YourAgentsTable/columns.tsx#L17-L24: remove the product-history rationale.web/oss/src/components/pages/agent-home/components/YourAgentsTable/index.tsx#L40-L47: reduce the variant and roster rationale.web/oss/src/components/pages/agent-home/components/YourAgentsTable/index.tsx#L127-L129: remove the visual-design rationale.web/oss/src/components/pages/agent-home/components/YourAgentsTable/index.tsx#L159-L160: remove the icon-selection rationale.web/oss/src/components/pages/agent-home/assets/constants.ts#L36-L38: remove the copy rationale.web/oss/src/components/pages/agent-home/assets/templates.ts#L24-L31: move the future-population rationale to documentation.As per coding guidelines, “Keep in-code comments to at most one short line; use longer comments only for genuinely surprising constraints such as bugs, races, or ordering requirements.”
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 84c2bac4-7a2a-44d0-8510-23c91f3ee6e9
📒 Files selected for processing (47)
docs/design/agenta-sessions-ux/plan.mdweb/oss/src/components/AgentCard/index.tsxweb/oss/src/components/AgentChatSlice/AgentChatPanel.tsxweb/oss/src/components/AgentChatSlice/assets/sessionOpenTarget.test.tsweb/oss/src/components/AgentChatSlice/assets/sessionOpenTarget.tsweb/oss/src/components/AgentChatSlice/hooks/useOpenAgentSession.tsweb/oss/src/components/AgentChatSlice/hooks/useSessionActions.tsxweb/oss/src/components/AgentChatSlice/hooks/useStartAgentSession.tsweb/oss/src/components/AgentChatSlice/state/firstRunSeed.tsweb/oss/src/components/AgentChatSlice/state/pendingSessionOpen.tsweb/oss/src/components/Drives/agentDrive.tsweb/oss/src/components/Layout/Layout.tsxweb/oss/src/components/NewAgentButton/index.tsxweb/oss/src/components/NextTriggers/index.tsxweb/oss/src/components/SeedAttachments/index.tsxweb/oss/src/components/TemplateStrip/components/StripRow.tsxweb/oss/src/components/TemplateStrip/index.tsxweb/oss/src/components/UsageSummary/index.tsxweb/oss/src/components/pages/agent-home/StripHome.tsxweb/oss/src/components/pages/agent-home/assets/agentName.test.tsweb/oss/src/components/pages/agent-home/assets/agentName.tsweb/oss/src/components/pages/agent-home/assets/constants.tsweb/oss/src/components/pages/agent-home/assets/templates.tsweb/oss/src/components/pages/agent-home/components/HomeAutomationsSection.tsxweb/oss/src/components/pages/agent-home/components/HomeSessionsSection.tsxweb/oss/src/components/pages/agent-home/components/HomeTaskComposer.tsxweb/oss/src/components/pages/agent-home/components/YourAgentsTable/AgentActivityCell.tsxweb/oss/src/components/pages/agent-home/components/YourAgentsTable/AgentRow.tsxweb/oss/src/components/pages/agent-home/components/YourAgentsTable/columns.tsxweb/oss/src/components/pages/agent-home/components/YourAgentsTable/index.tsxweb/oss/src/components/pages/agent-home/components/YourAgentsTable/useAgentActivity.tsweb/oss/src/components/pages/agent-home/hooks/useAgentHomeActions.tsweb/oss/src/components/pages/agent-home/hooks/useAgentHomeVariants.tsweb/oss/src/components/pages/agent-home/index.tsxweb/oss/src/components/pages/agents/store.tsweb/oss/src/components/pages/app-management/store/appWorkflowStore.tsweb/oss/src/components/pages/observability/dashboard/AnalyticsDashboard.tsxweb/oss/src/components/pages/overview/agent/AgentConfigurationCard.tsxweb/oss/src/components/pages/overview/agent/AgentFilesCard.tsxweb/oss/src/components/pages/overview/agent/AgentOverview.tsxweb/oss/src/components/pages/overview/agent/agentConfigSummary.test.tsweb/oss/src/components/pages/overview/agent/agentConfigSummary.tsweb/oss/src/components/pages/overview/agent/state.tsweb/oss/src/components/pages/sessions/components/SessionListCard.tsxweb/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/overview/index.tsxweb/oss/src/state/layout/fullHeight.tsweb/oss/tailwind.config.ts
| <Tooltip title={vm.isPinned ? "Unpin" : "Pin"}> | ||
| <span | ||
| role="button" | ||
| tabIndex={-1} | ||
| aria-label={vm.isPinned ? "Unpin session" : "Pin session"} | ||
| onClick={(event) => { | ||
| event.stopPropagation() | ||
| togglePin(vm.id) | ||
| }} | ||
| className={`shrink-0 text-colorTextTertiary ${ | ||
| vm.isPinned ? "" : "opacity-0 group-hover:opacity-100" | ||
| }`} | ||
| > | ||
| <PushPinIcon | ||
| size={14} | ||
| weight={vm.isPinned ? "fill" : "regular"} | ||
| /> | ||
| </span> | ||
| </Tooltip> |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Make the pin control keyboard reachable and move it out of the row button.
The pin control is a span with role="button" and tabIndex={-1}. Keyboard users cannot reach it, so pinning is impossible without a mouse. The control is also nested inside the row <button> (Line 113), which is invalid interactive nesting and can break assistive technology.
Render the row button and the pin control as siblings inside a wrapper, and give the pin control tabIndex={0} plus a key handler, or make it a real <button type="button">.
♿ Sketch of the structural fix
- <Tooltip title={vm.isPinned ? "Unpin" : "Pin"}>
- <span
- role="button"
- tabIndex={-1}
+ <Tooltip title={vm.isPinned ? "Unpin" : "Pin"}>
+ <button
+ type="button"
aria-label={vm.isPinned ? "Unpin session" : "Pin session"}
onClick={(event) => {
event.stopPropagation()
togglePin(vm.id)
}}
- className={`shrink-0 text-colorTextTertiary ${
+ className={`shrink-0 cursor-pointer border-0 bg-transparent p-0 text-colorTextTertiary ${
vm.isPinned ? "" : "opacity-0 group-hover:opacity-100"
}`}
>
<PushPinIcon
size={14}
weight={vm.isPinned ? "fill" : "regular"}
/>
- </span>
+ </button>
</Tooltip>Note: a nested <button> is still invalid inside a <button>. Change the row element to a <div role="button"> wrapper with the title area as the clickable region, or lift the pin control to a sibling of the row button.
468dfc5 to
0d2d3cd
Compare
0e00cd5 to
c422e24
Compare
c422e24 to
3853d9e
Compare
|
@coderabbitai review |
|
3853d9e to
34c7614
Compare
|
@coderabbitai review |
|
0d2d3cd to
f092df6
Compare
34c7614 to
1ca64a0
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
web/oss/src/components/pages/agent-home/components/HomeAutomationsSection.tsx (1)
3-20: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReduce the new explanatory comments.
Keep only a short comment when the code needs context. Remove comments that restate component intent or prop behavior.
web/oss/src/components/pages/agent-home/components/HomeAutomationsSection.tsx#L3-L20: Replace the multi-line product and layout explanations with at most one short comment for the non-obvious trigger filter behavior.web/oss/src/components/NextTriggers/index.tsx#L8-L11: Remove the adapter comment or reduce it to one short line.As per coding guidelines, "Keep in-code comments to at most one short line; use longer comments only for genuinely surprising constraints such as bugs, races, or ordering requirements."
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2e5fb835-3be1-4080-a5fe-d24e4c9e6f46
📒 Files selected for processing (47)
docs/design/agenta-sessions-ux/plan.mdweb/oss/src/components/AgentCard/index.tsxweb/oss/src/components/AgentChatSlice/AgentChatPanel.tsxweb/oss/src/components/AgentChatSlice/assets/sessionOpenTarget.test.tsweb/oss/src/components/AgentChatSlice/assets/sessionOpenTarget.tsweb/oss/src/components/AgentChatSlice/hooks/useOpenAgentSession.tsweb/oss/src/components/AgentChatSlice/hooks/useSessionActions.tsxweb/oss/src/components/AgentChatSlice/hooks/useStartAgentSession.tsweb/oss/src/components/AgentChatSlice/state/firstRunSeed.tsweb/oss/src/components/AgentChatSlice/state/pendingSessionOpen.tsweb/oss/src/components/Drives/agentDrive.tsweb/oss/src/components/Layout/Layout.tsxweb/oss/src/components/NewAgentButton/index.tsxweb/oss/src/components/NextTriggers/index.tsxweb/oss/src/components/SeedAttachments/index.tsxweb/oss/src/components/TemplateStrip/components/StripRow.tsxweb/oss/src/components/TemplateStrip/index.tsxweb/oss/src/components/UsageSummary/index.tsxweb/oss/src/components/pages/agent-home/StripHome.tsxweb/oss/src/components/pages/agent-home/assets/agentName.test.tsweb/oss/src/components/pages/agent-home/assets/agentName.tsweb/oss/src/components/pages/agent-home/assets/constants.tsweb/oss/src/components/pages/agent-home/assets/templates.tsweb/oss/src/components/pages/agent-home/components/HomeAutomationsSection.tsxweb/oss/src/components/pages/agent-home/components/HomeSessionsSection.tsxweb/oss/src/components/pages/agent-home/components/HomeTaskComposer.tsxweb/oss/src/components/pages/agent-home/components/YourAgentsTable/AgentActivityCell.tsxweb/oss/src/components/pages/agent-home/components/YourAgentsTable/AgentRow.tsxweb/oss/src/components/pages/agent-home/components/YourAgentsTable/columns.tsxweb/oss/src/components/pages/agent-home/components/YourAgentsTable/index.tsxweb/oss/src/components/pages/agent-home/components/YourAgentsTable/useAgentActivity.tsweb/oss/src/components/pages/agent-home/hooks/useAgentHomeActions.tsweb/oss/src/components/pages/agent-home/hooks/useAgentHomeVariants.tsweb/oss/src/components/pages/agent-home/index.tsxweb/oss/src/components/pages/agents/store.tsweb/oss/src/components/pages/app-management/store/appWorkflowStore.tsweb/oss/src/components/pages/observability/dashboard/AnalyticsDashboard.tsxweb/oss/src/components/pages/overview/agent/AgentConfigurationCard.tsxweb/oss/src/components/pages/overview/agent/AgentFilesCard.tsxweb/oss/src/components/pages/overview/agent/AgentOverview.tsxweb/oss/src/components/pages/overview/agent/agentConfigSummary.test.tsweb/oss/src/components/pages/overview/agent/agentConfigSummary.tsweb/oss/src/components/pages/overview/agent/state.tsweb/oss/src/components/pages/sessions/components/SessionListCard.tsxweb/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/overview/index.tsxweb/oss/src/state/layout/fullHeight.tsweb/oss/tailwind.config.ts
🚧 Files skipped from review as they are similar to previous changes (43)
- web/oss/src/components/pages/overview/agent/state.ts
- web/oss/src/components/pages/agents/store.ts
- web/oss/src/components/AgentCard/index.tsx
- web/oss/src/components/pages/agent-home/hooks/useAgentHomeVariants.ts
- web/oss/src/components/pages/agent-home/assets/constants.ts
- web/oss/src/components/pages/app-management/store/appWorkflowStore.ts
- web/oss/src/components/pages/agent-home/hooks/useAgentHomeActions.ts
- web/oss/src/components/pages/agent-home/components/YourAgentsTable/useAgentActivity.ts
- web/oss/src/components/pages/agent-home/index.tsx
- web/oss/src/components/pages/agent-home/assets/agentName.ts
- web/oss/src/components/AgentChatSlice/assets/sessionOpenTarget.test.ts
- web/oss/src/components/AgentChatSlice/hooks/useStartAgentSession.ts
- web/oss/src/components/pages/agent-home/components/YourAgentsTable/AgentActivityCell.tsx
- web/oss/src/state/layout/fullHeight.ts
- web/oss/src/components/AgentChatSlice/state/pendingSessionOpen.ts
- web/oss/src/components/AgentChatSlice/assets/sessionOpenTarget.ts
- web/oss/src/components/pages/observability/dashboard/AnalyticsDashboard.tsx
- web/oss/src/components/TemplateStrip/components/StripRow.tsx
- web/oss/src/components/pages/agent-home/components/YourAgentsTable/AgentRow.tsx
- web/oss/src/components/pages/agent-home/components/YourAgentsTable/columns.tsx
- web/oss/src/components/pages/overview/agent/AgentFilesCard.tsx
- web/oss/src/components/AgentChatSlice/state/firstRunSeed.ts
- web/oss/src/components/AgentChatSlice/AgentChatPanel.tsx
- web/oss/src/components/pages/agent-home/assets/agentName.test.ts
- web/oss/src/components/pages/agent-home/components/HomeTaskComposer.tsx
- web/oss/src/components/UsageSummary/index.tsx
- web/oss/tailwind.config.ts
- web/oss/src/components/NewAgentButton/index.tsx
- web/oss/src/components/pages/overview/agent/AgentOverview.tsx
- web/oss/src/components/pages/overview/agent/agentConfigSummary.ts
- web/oss/src/components/Layout/Layout.tsx
- web/oss/src/components/pages/agent-home/assets/templates.ts
- web/oss/src/components/AgentChatSlice/hooks/useSessionActions.tsx
- web/oss/src/components/SeedAttachments/index.tsx
- web/oss/src/components/pages/overview/agent/AgentConfigurationCard.tsx
- web/oss/src/components/pages/overview/agent/agentConfigSummary.test.ts
- web/oss/src/components/Drives/agentDrive.ts
- web/oss/src/components/pages/agent-home/components/HomeSessionsSection.tsx
- web/oss/src/components/pages/agent-home/StripHome.tsx
- web/oss/src/components/pages/sessions/components/SessionListCard.tsx
- web/oss/src/components/TemplateStrip/index.tsx
- web/oss/src/components/AgentChatSlice/hooks/useOpenAgentSession.ts
- web/oss/src/components/pages/agent-home/components/YourAgentsTable/index.tsx
| - `openAgentSession({sessionId, appId, title})` → `router.push(`${baseAppURL}/${appId}/playground`)`, | ||
| carrying the target through a small carrier atom (`pendingSessionOpenAtom`) because the | ||
| playground page mounts after navigation. Precedent: `agentFirstRunSeedAtom` | ||
| (`AgentChatSlice/state/firstRunSeed.ts`) solves the identical handoff. | ||
| - Consumed after the chat scope resolves → `adoptSessionAtomFamily(appId)({id, title})`, which | ||
| already handles the "this browser has never seen this session" case; records hydration then | ||
| fills the transcript. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== target doc excerpt =="
sed -n '180,210p' docs/design/agenta-sessions-ux/plan.md || true
echo
echo "== find identifier usages =="
rg -n "openAgentSession|pendingSessionOpenAtom|sessionOpenTarget|pendingSessionOpen|adoptSessionAtomFamily" . || true
echo
echo "== locate relevant files =="
git ls-files | rg 'firstRunSeed|session|Atom|Atoms|atoms' | head -200Repository: Agenta-AI/agenta
Length of output: 19567
Use the actual session-opener APIs in the deep-link plan.
Update this section to call sessionOpenTarget(row) for the target, then dispatch pendingSessionOpenAtom before navigation; the plan should not expose openAgentSession(...) or pendingSessionOpenAtom unless those names are real exports.
| 1. ~~**Origin stamp**~~ — pulled forward and built, because the list was otherwise shipping with | ||
| automation runs mixed into your own work. The dispatcher mints the session id, stamps | ||
| `tags["ag.origin"]`, and records it on the delivery; the query grows `origin` / | ||
| `exclude_origin`, and the list hides automations by default. Both dispatch compositions — | ||
| the in-process one in `routers.py` and the queue worker in `worker_queues.py` — build a | ||
| `SessionStreamsService`, so a trigger is stamped whichever path runs it. | ||
| 2. ~~**Delivery → session link**~~ — built with the stamp above. Home's automation rows can now | ||
| resolve their session; wiring the click is the remaining FE step. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Make the backend checkpoint status consistent.
This section marks the origin stamp and delivery-to-session link as built. Earlier sections still state that no origin marker exists and that automation rows lack a session link at Lines 234 and 266-267. Update those sections or label them explicitly as pre-change facts. Keep one authoritative status for this contract.
…ut the agent Home becomes a workspace: a task composer, the sessions and automation-runs columns, the agents roster and usage as rail cards, next triggers, and a page-level New agent action. The agent overview gets its configuration, files, sessions and triggers on the same section language. Cross-page sections (UsageSummary, NextTriggers, SeedAttachments, AgentCard, NewAgentButton) move up to components/ for reuse, all composing the packages below — no list or grouping logic lives in the pages.
1ca64a0 to
187acb4
Compare
…gents The rail card rendered the whole roster, so a project with many agents pushed the sessions below the fold. It now sorts by updatedAt (the query's descending window follows creation) and shows five; the full list stays one click away behind All agents.
|
Landed in |
Context
First app lane of the sessions/agents UX stack. Home was a document about making agents; the agent overview was a variant table. The rework makes Home answer "what needs me" and the overview describe the agent itself. The gate for this lane: no logic in the pages; every list rule, row derivation and grouping comes from the packages below.
Changes
StripHome) becomes a workspace: a task composer that starts a session (attachments are collected but not yet consumed; that is the top lane), the sessions and automation-runs columns bounded and grouped by@agenta/sessions, the agents roster and usage as rail cards, next triggers, and a page-level New agent action.components/for reuse:UsageSummary,NextTriggers,SeedAttachments,AgentCard(now an adapter over@agenta/entity-ui/agent),NewAgentButton.sessionOpenTarget+pendingSessionOpen).Tests / notes
@agenta/osstsc on this lane shows exactly one error: thetriggerBoundAgentIdimport in the lane below, whichentities/trigger-helpers(targetsmain) resolves. Nothing else.sessionOpenTargetandagentNamecarry unit tests.What to QA