Skip to content

Guided Buying: J3 decision surface (Dana Kim) and workbench polish - #1066

Draft
petervachon wants to merge 70 commits into
mainfrom
GuidedBuying_Journey3
Draft

Guided Buying: J3 decision surface (Dana Kim) and workbench polish#1066
petervachon wants to merge 70 commits into
mainfrom
GuidedBuying_Journey3

Conversation

@petervachon

Copy link
Copy Markdown
Collaborator

Summary

This branch carries the Guided Buying prototype's J3 storyline (a second decision-making persona, Dana Kim, alongside the existing requester/buyer/approver personas) through the request → validation → decision flow, plus supporting workbench and requester-surface work built up over the branch's history.

Most recent additions in this push:

  • Dana Kim's decision surface: a budget-owner persona with her own persona-scoped Approvals queue and a full REQ-10482 decision record (recurring commitment, order form attachment, a procurement-validation check set distinct from the hardware-purchase set, and a downstream track stage so her approval isn't the end of the journey). A P2-only module states the multi-year renewal horizon without repeating the rail's own budget card.
  • Shared evidence overlay: exception evidence and the order-form preview are now one component reused by both Sam Rivera's workbench and Dana's decision page, replacing a private, unexported copy.
  • Timezone fix: every seeded J3 timestamp now renders through one UTC-based formatter (a real bug had local-time rendering shifting UTC-anchored times depending on the runtime's zone); the scenario's fixed "today" moved forward so no derived day-count reads negative or zero.
  • Workbench queue table polish: exception badges get their own column (with a tooltip naming overflow exceptions instead of a bare "+N"), a REQ column, reordered Requester/Assignee columns, consistent "MMM D, YYYY" dates, wider column padding, and clickable KPI cards that quick-filter the table (matching Approvals' own pattern).

Test plan

  • pnpm lint / pnpm typecheck / pnpm build clean
  • Switch to Dana Kim via the persona switcher; confirm Approvals shows only her own request and the decision page renders in both P1 and P2
  • Approve / send back / reject REQ-10482 end to end
  • Open both "view evidence" links and the order form preview from Dana's decision page; confirm Sam Rivera's own workbench detail view is unchanged
  • Workbench queue: click each KPI card, confirm it filters and toggles off; hover a "+N" exception badge

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings August 19, 2026 23:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Comment on lines +223 to +226
([entry]) => {
if (entry) setToolbarStuck(!entry.isIntersecting);
},
{ root, threshold: 0 },
@@ -0,0 +1,70 @@
import { motion } from "framer-motion";
import type { ReactNode } from "react";
import { cn } from "@/lib/utils";
petervachon and others added 27 commits August 19, 2026 19:24
Experiment → Guided Buying docs page links to a full-screen /guided-buying
prototype, rendered in a separate React root to escape the Nextra docs layout.

Catalog "Selection" workspace:
- scan-row and card layouts (toggle) with a recommendation lead row
- product detail overlay, cart peek drawer, full-canvas compare table
- filters (brand/category/price/stock) with agent chips and price basis
- routable, deep-linkable state (?item / ?compare) and Review & submit stub

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Build out the Guided Buying prototype's front-door flow and the buyer's
escalation queue, all scripted/mocked atop the Apollo AI Chat pattern.

Buy conversation (catalog/v1):
- Intake hero → in-chat Bridge: streamed restatement, then an inferred
  request envelope (cost center / ship-to / need-by / approver with
  provenance + edit affordances) and the routing consequence, revealed
  with a staggered field animation.
- Continue to selection → sourcing summary + a results carousel rendered
  inline in the thread (pick + 2 alternatives, skeleton→reveal), with the
  pick mirroring the catalog's Picked-for-you treatment.
- Add to cart confirms in-chat with amount + approval-limit status and a
  Review affordance; cart pill pulses on increment.
- ConversationProvider drives the shared thread across the Buy hero and
  the docked rail; catalog cards are fully clickable for details.

Workbench (workbench/): the off-catalog fork's escalation queue, adapted
from the Invoice Processing layout — list with stat cards + Quote (amber)
/ Contract (red) chips, and a three-region detail (queue · finding +
Approve/Counter/Reject + Autopilot composer · Activity/Details/Line
items/Source). Seeded with the standing-desks quote and mobile-lines
contract. Actions stubbed.

Shared Ai Chat tweaks: hover-only message actions, tighter empty-state
composer, stable scrollbar gutter.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nd finish lines

Pull the buy flow back to the intended model — chat as the front door and a
tertiary escape hatch, a guided structured middle, and real finish lines.

- Intake stays conversational; once a request is made, a guided surface
  (BuyScaffold + GuidedBuy) presents the envelope/results directly, no transcript
- Constant header anchor (title + subtext) with staggered slide transitions, a
  consistent back control, and reserved bar height so the anchor never shifts
- Agentic Bridge edit: per-field pickers with reasons + cost-center→approver
  cascade; routing line indented to the card; em-dash removed
- Cart as a first-class object: persistent cart button (transitions in on
  Selection), peek with editable quantities, card-level steppers, and a primary
  "Review & submit · N · $total" that feeds the one unified Review page
- Configure + catalog submission finish lines: outcome headline, agent line
  naming the destination, dynamic recap, single primary exit, no in-flow back
- One Autopilot FAB replacing all scattered ask affordances (currently hidden
  behind a flag), with a persistent context-aware mini-chat thread
- Selection product matches shown as a 3-up grid instead of a cut-off carousel
- Shell: two demo seats (requester/buyer) with a Switch user menu item
- Buy intake composer gains attachment UI; example chips get a "Try an example" label

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…mpt continuity, copy

- Bridge → Configure now reads as an expansion (rail reveals from the right,
  center fades, header anchored) instead of a horizontal swipe
- Configure rail cleaned up: sentence case, connecting-line timeline with dashed
  not-started dots, baseline-aligned header, more title→timeline space
- Carry the user's prompt through the flow: a "Request · From you" row on both
  Bridges (editable free text on catalog, read-only on contract) and the prompt
  as the Review hero for continuity
- Bridge field picker closes with the reverse of its open (a touch quicker); the
  edit pencil swaps to a check while a field is open
- Rebrand "Autopilot" → "AI Assistant" and "Picked for you" → "Best match" in
  user-facing text (code identifiers unchanged)
- Hide the Autopilot FAB behind a flag (kept fully wired for later)
- Copy: intake/Bridge/Selection headers + subtext, intake placeholder
- Fix: contract finish line "Back to Buy" now resets to a fresh Intake
  (honors resetChat) instead of returning to the in-flight Bridge

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cles

The not-completed step markers were inline spans, so size-4 didn't apply and
they collapsed to a thin vertical sliver. Add block + a 2px ring so they match
the completed checkmark circles: solid border for the current step, dotted for
upcoming.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ed Buying

- Configure timeline dots render as proper circles (checks for done, solid ring
  current, dotted upcoming)
- Configure option cards use the card glow selectable state (glass), keeping the
  teal selected outline
- Match preview cards and both Bridge envelopes use the glass variant
- Configure step content staggers in (question, note, options, actions)
- Selection "Review & submit" transitions in like the top-bar buttons
- Soften the card selectable AI glow opacity (shared card component)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ests queue

Add the third use case (services sourcing / RFQ) and the requester's Requests
surface to the Guided Buying prototype.

Services sourcing:
- Swap the desks chip for "Hire 2 contract designers for the Q3 rebrand"; the
  services Bridge routes an RFQ to procurement.
- Workbench gains REQ-2053 with a vendor shortlist (indicative estimates, agent
  pick, provenance) and an RFQ-as-primary action that sends to the shortlist.

Requests (the requester's seat, mirror of the buyer's Workbench):
- Seat-dependent nav: requester sees Requests, buyer sees Workbench; the identity
  chip swaps both and lands on each seat's queue.
- Workbench-style list (stat cards + table); detail is a right-side slide-over
  panel with the status timeline, an AutopilotIcon lead banner, and state-fit
  actions (Message procurement / Mark urgent in-flight, Reorder / View order when
  terminal). Notes and urgent flags surface in the buyer's Workbench.
- Submitting a contract or services request lands in its Requests panel; the
  standalone routed confirmation screen is dissolved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…at rail

Replace gradient circle + AutopilotIcon header with the AiMark (Astroid) icon
painted via SVG gradient def, and apply --ai-gradient-text clip to the wordmark.
Renames label from "AI Assistant" to "Autopilot" per project brand.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…uided Buying

- Add FlowPhaseBar component: horizontal phase indicator with dot/check
  glyphs, muted connector lines, completed phases clickable as back-nav
- Wire CATALOG_PHASES (Details→Choose→Review→Done) and NON_CATALOG_PHASES
  (Details→Sent) into BuyFlow, Review, and CatalogSubmitted
- Fix B1 headline reset: replace didReset ref with __TSR_index-keyed effect
  so navigating to /buy again from the sidebar always resets to Intake
- Add fromReview HistoryState flag; Review's phase bar navigates back to Buy
  without clearing the conversation (preserves selection state)
- B2: extend RequestsContext with submittedRows/submitRequest; CatalogSubmitted
  registers REQ-2052 on mount so it appears in My Requests immediately
- B3: MatchCard title line-clamp-2 with fixed 2-line height for aligned cards
- B4: Add-button label unified to "Add N" on all three selection cards
- B5: Retire gradient fills — Best match badges and send button replaced with
  ai-gradient-start/15 soft-tint; glow effects kept at opacity-15
- B6: Date format changed from MM/DD/YYYY to DD MMM YYYY across all request rows
- B7: KPI hint copy "still with procurement" → "pending approval or sourcing"
- B8: Remove Dashboard from sidebar nav (route and page preserved)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…uying shelf build

Add a P1/P2 tier toggle to the Guided Buying prototype for CGA (now) vs V2
(next) feature comparison. Key additions:

- TierContext / TierProvider with localStorage persistence
- <P1> and <P2> gate components; useTier() only in permitted files
- TierToggle segmented control injected into ApolloShell via new headerSlot prop
- GB prototype tokens added to globals.css (--gb-tealbg, --gb-tealline, etc.)
- J1-01: chip starters copy cleanup (no trailing periods)
- J1-02: TeamsResumeCard with teal border, resume to bridge, step name "Picks up
  at Details" instead of drifting step number
- J1-04: AI reasoning strip above match grid, not-picked italic reasons on alt
  cards, AI pick badge with P1/P2 text swap, teal evidence chips on lead card,
  action chip row (Why not the XPS?, Compare all three, Ask)
- J1-05: P2 personalized strip with provenance chips (lucide icons replacing
  emoji), Ordered in May chip on lead, Yoga set-aside via setAside prop on
  MatchCard (unified component, no separate card — prevents layout drift),
  Update my preferences chip at P2
- KPI grid: auto-fit minmax(200px,1fr) — 3 tiles at P1, 4 at P2, no dead space
- Spend under management tile: teal border, +$27,735 delta, P2 only
- Chip text raised to 11px minimum

Browser-verified at 1440px: KPI grid auto-fit confirmed; Yoga slot height
347px at P1 and P2 (0px delta).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…mit A)

Replace ad-hoc ACCENT/gb-teal Button overrides and chip constants with Apollo
toolkit primitives across the catalog flow.

- MatchCarousel: Card variant="glass" + AiGlow variant="card" for lead card
  (drops selectable="ai" collision); Badge status="ai" for AI pick badge;
  Badge variant="secondary" for evidence chips; Badge status="ai" variant="secondary"
  for memory chips; Button variant="ai-outline" for Ask chip; reasoning strip
  uses --ai-gradient + --insight-200 border
- All 10 catalog files: remove const ACCENT and every className override that
  applied it; Button default renders bg-primary already
- Remove direct bg-(--gb-teal) className from Button in ServiceBridge,
  ServicesBridge, NotInCatalogBanner, ProductCard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tem (Commit B)

Replace all --gb-* prototype tokens with canonical Apollo tokens and delete
the --gb-* definitions from globals.css.

- --gb-teal → --primary across all 14 affected files (spans, borders, rings,
  backgrounds, text, dot indicators)
- --gb-indigo → --insight-600 (TierToggle P2 active state, TeamsResumeCard icon fill)
- --gb-indigobg → --insight-50 (TeamsResumeCard icon area background)
- WorkbenchDetail timeline dots: amber-500 → --warning, emerald-500 → --success
- Delete all 8 --gb-* custom property definitions from app/globals.css

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- MatchCarousel: add AI disclosure line (Info icon + "The output is AI
  generated. Please review.") below the card grid
- MatchCarousel: Yoga card renders identically at both tiers on arrival;
  set-aside state reserved for stop-3 dock correction (wires in separately)
- MatchCarousel: remove "32GB min · saved Jun 12" third provenance chip
  from j1-05 P2 reasoning strip
- ServiceBridge: add AI disclosure line below the interpreted-summary
  routing line, above the CTA

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…off JourneyBar

PM feedback 4 tasks: JourneyBar stage interactivity fix (Received non-button, delivery
receipt link), Details button on shelf cards via ProductDetailOverlay, CatalogSubmitted
"What happens next" JourneyBar on /track, PO record route at /po/$id with print stylesheet.

GROUP 2 cleanup: caveat moved below journey card in RequestWindow (consistent with the
other five caveat placements); yogaSetAside state renamed to correctionMade throughout
BuyFlow, GuidedBuy, MatchCarousel, ShelfDock.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… tiles

Removes the P2-gated "Spend under management" tile; hub shows exactly 3 tiles at both
tiers with the auto-fit grid unchanged.

Adds an AI attention line above the tiles, derived from in-flight request data: approver
name and pending-days count parsed from REQUEST_DETAILS, item noun extracted from the
request title. P2 tier appends one inline sentence ("I sent a reminder this morning.")
without altering the P1 sentence. Follow up button routes to /requests/$id at both tiers.
AiCaveat below the attention line at both tiers. Renders nothing if no in-flight request
exists.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Thread userMenuAdditionalItems through ApolloShell → ShellLayout →
ShellSidebar → UserProfile → UserProfileMenuItems, replacing the
headerSlot TierToggle. TierMenuSection renders two DropdownMenuItems
with a Check icon on the active tier, grouped under a "Prototype tier"
label.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Avatar background shifts with tier: primary for P1/Now, --insight-600
for P2/Next. Thread avatarClassName through ApolloShell → ShellLayout
→ ShellSidebar → UserProfile → AvatarFallback. Add colored legend dots
(size-2 rounded-full in icon-sized containers) to the tier menu items so
they align horizontally with the Toggle theme and Language icons below.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wrap the 3-up match grid in a -mx-20 breakout div so cards have more
horizontal room without widening the surrounding content (reasoning
strip, chips, caveat stay at max-w-[720px]).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Back | stepper (absolute center) | Reset+Cart all live in one h-12 band
with a hairline border-b. Scroll area moved below the band so the chrome
is fixed while content scrolls. phaseBar no longer lives in the anchor
div — it sits in the band between the flanking controls.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oose

MatchCarousel now shows the user's original requestText (from
useConversation) as a quoted line above the AI reasoning strip —
making the human ask visually distinct from AI output. P1 strip
shortened: trailing "Here are all three matches so you can see why."
removed (already implied by the cards below).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each non-lead, non-set-aside MatchCard now gets a "Why not this?" ghost
button that opens the ShelfDock scoped to that item (Yoga or XPS).
ShelfDock gains a `subject: CatalogItem` prop; defense copy switches
between XPS_DEFENSE and YOGA_DEFENSE based on subject.id.

"Update my preferences" moves into the P2 reasoning strip (after badge
chips). The chip row below the grid is removed; the Ask button moves
beside the Review CTA in the bottom row.

BuyFlow adds shelfDockSubject state and passes it to ShelfDock.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
INFERRED_REQUEST_QUANTITY corrected from 2 to 15 so "Add N" and cart
totals reflect the canonical journey (15 × $1,849 EPP). SAMPLE_REQUEST
summary and the Intake CATALOG_STARTER chip updated to match "15 laptops
for Fusion Event contractors" — keeps the requestText hero on the Choose
screen consistent with the cards.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…bject

At P2, the Teams resume card and the AiChatInput now share a single
continuous outline: the band provides top+left+right borders (rounded-t-xl,
border-2 border-input, insight-50 tint), the form provides left+right+bottom
(border-t-0 rounded-b-xl). No gap, no double border at the seam.

AiChatInput gains an `embedded` prop that drops the outer pt-3/px-4 padding
(aligning left/right borders with the band above), suppresses the glow, and
removes the focus box-shadow that would bleed into the band. Corner radius
changes between tiers are the deliberate, accepted consequence of attachment.

Resume demoted to ghost button — one primary action on the Intake screen.
Band background is --insight-50 so it reads as provenance, not a peer card.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Done screen: header chrome, receipt-style summary card, animated confirm
  check, and reordered action bar with the AI caveat above it
- Add consistent step-transition fades across Choose, Review, and Done
- Bridge: read-only Request row with a Revise action that reparses the
  envelope and preserves any fields the user overrode
- Fix BuyFlow's reset effect wiping conversation state on navigation to
  Review/Done, which had silently broken the header title everywhere
- Assistant panel: split the Details entry into records vs. guessed fields,
  with hover tooltips on the pencil/revise icons
- Request detail: adopt PageHeader, two-column layout with a sidebar for
  record metadata and linked records, gated to the P2 tier as before
- Split request titles into a short generated title (used as chrome) and
  the verbatim prompt (shown in full in the sidebar)
- Fix the Requests list/detail title mismatch by sourcing both from the
  same generated title instead of a separately re-derived cart summary

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…tions

Request detail:
- Merge the agent line and stage bar into one AI-summary lead card: mark +
  label, a state-aware sentence with the notable fact highlighted via
  --ai-gradient, and a new ActivityTrack (bigger nodes, pulsing ring on the
  current stage, event pins for user/agent activity).
- Header now only carries a primary action when one is genuinely owed
  (Confirm receipt when delivered, Respond when sent back); status badge
  removed since state already reads from the summary and stage track.
- Nudge and Mark urgent moved into the lead card as real outline buttons
  with icons; completed state keeps button chrome (filled-muted, check
  icon, "today" label) instead of collapsing to plain text.
- Reference column de-carded to a plain labelled list, widened to 200px,
  aligned to the card's first content line, 8px-base vertical rhythm.

Requests list:
- Add a "delivered" status (wired end-to-end via REQ-2031: row, detail,
  and close-window data) so Confirm receipt has somewhere real to go.
- Row-level Confirm receipt action for delivered rows, plus a hover-reveal
  overflow menu for copy link / view PO.
- Attention line now summarizes count and opens a filtered view when more
  than one request needs attention, instead of only ever naming one.
… URLs, inline cart editing

Delivery receipt:
- Remove the standalone Close Window and /close/$id route; a request that
  reaches "delivered" now shows that state on its own detail page instead
  of a second page with different header chrome.
- "Confirm receipt" opens a modal (ordered qty, quantity-received stepper
  with live match/short warning, damaged-items checkbox, optional note)
  instead of committing silently or navigating away.
- Confirming plays the Done screen's check animation (extracted to a
  shared ConfirmCheck), appends a Communication entry, and — when partial
  or damaged — states that in the summary and on the stage track.
- Linked records (PO/PR chips) migrate from the removed page's data into
  the sidebar, driven by RequestDetail instead of hardcoded JSX.

Decision window — notifications and post-approval states:
- Replace the persistent "Approved" banner with a Sonner toast per the
  in-product notification guidelines; add a global Toaster host.
- Add a header Status badge + Approved date field so the state change
  stays visible once the toast dismisses.
- Every element gets a distinct approved-state instead of showing
  pre-decision copy after the fact: AI summary states the outcome (PO
  sent, expected delivery), budget/device management restate in present
  tense, the PO chip becomes a real linked record, a confirmation line +
  "View order" replaces the decision buttons, and the approval itself
  (with any note left in the composer) appends to Communication.

Real URLs:
- Switch the TanStack router from memory to browser history with a
  basepath, add a Next.js catch-all route (split into a literal page.tsx
  + sibling [...slug] since Nextra's page-map needs a literal file) so
  reloading or sharing a deep link works instead of 404ing.
- Make the Buy flow's Bridge/Selection phases addressable via
  /buy?phase=..., with instant seeding (bypassing the scripted stream) for
  deep links and reloads; Review and the Done screen seed the same way
  when reached with an empty cart.
- Fix a stray re-render (router state updates a tick before BuyFlow
  unmounts on its way to /review) that was silently resetting the
  conversation, breaking Review's Back button.

Review screen — inline cart editing:
- Remove "Edit cart" (it navigated away to change a number already on
  screen); line items become the cart itself — quantity stepper, unit
  price, remove control, live-recalculating totals.
- Add "Add items from the catalog" as a drawer over Review instead of a
  navigation; removing the last item leaves an empty state with the add
  link and disables submit, without navigating away.
- Fix the cart pricing bug: the drawer, header cart pill, and add-to-cart
  toast all priced off the browse-time list/EPP filter instead of the
  fixed EPP price the cart actually charges, so opening the cart could
  make the same order look like it got more expensive.

Bump @tanstack/react-router to 1.170.18 (apollo-vertex only).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…f to Details

New /home route: a composer identical to Buy's Intake (same AiChatInput,
Teams-resume band, starter chips), plus a tiered "Your requests" list
(P1 factual status line, P2 appends an agent-voice line and the AI
caveat) with a single uniform stage icon per row. Added above Buy in
the sidebar nav and as the app's default landing.

Submitting (typed text, Enter, or the laptops chip) seeds the
conversation via sendCatalogRequest and navigates to /buy?phase=bridge,
so Details' Request row and Need by popover reflect the real typed
text instead of the canonical demo default. The other two chips route
to a plain /buy — they don't have an addressable Details step yet.

AiChatEmptySuggestions gained additive label/value support so chips can
show a short label while still submitting the full sentence; Buy's own
chips now share the same STARTER_SUGGESTIONS constant.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 20, 2026 13:17
@petervachon
petervachon force-pushed the GuidedBuying_Journey3 branch from 579aa9a to 5138ac7 Compare August 20, 2026 13:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Collapses Priya onto Marcus's shared nav array, /home route, and Home
component instead of a second surface per person: priyaNavItems and
/start retire, ?as=priya disambiguates a cold load on the shared route,
and /requests scopes by persona (requesterPersonaId) the same way
/approvals already scopes by approverPersonaId. Seeds 3 requests for
Priya (REQ-10482 fully real, two bracketed pending a content ruling).
RequestWindow's and DecisionWindow's message composer reused the
recipient's own name/avatar (approver or requester) for the sender too,
correct for the placeholder naming who receives it, wrong for whose
message it actually is. Both now resolve the active persona via
usePersona() instead.

Also part of the same cleanup pass: personas.ts/route-tree.tsx/
HomeRoute.tsx broadened cold-load persona resolution (?as=priya) to
every shared requester surface, not just /home, and fixed a chip-count
mismatch on Priya's home mini-list — already folded into the parity
commit above since both landed in the same working tree before either
was committed.
ConnectMeet showed as Selected before the requester acted. Vendor
selection now requires an explicit click (vendorConfirmed, separate
from the pre-filled selectedVendor default Review/Submitted still fall
back to), clicking the selected row again un-selects it, and Continue
to Data & Info stays disabled until a selection is confirmed.
Adds the identity row (vendor, what's being bought, extraction
provenance) that was missing entirely, collapses three identical
per-year rows into one commitment line with the schedule disclosed
rather than always-equal, and reuses Marcus's prose treatment for the
second card instead of bare label/value pairs. BrandMark now takes a
vendor name directly (it only ever read that field off CatalogItem),
so the identity row can reuse it without a fabricated cart item.

Also sweeps British spellings to US English throughout the guided-buying
templates (licence -> license, centre -> center) in every rendered
string, resolving the Chunk C1 escalation on that spelling. REQ-10482's
requester-parity row and identity/order-summary/second-card wording
(from the parity commits above) already carried some of this file's
other edits before any of tonight's work was committed separately.
The stage list was a card inside a card inside a dashed box: removes
the inner card entirely (the outer request card already provides one),
and replaces the dashed Legal/Security pair with the solid rail the
timeline variant already used for the identical data, extending to a
third concurrent stage instead of needing a wider box. System chips
now only show for stages actually leaving this tool (Jira/DocuSign/
Coupa), driven by the stage's own owner field. The first pending stage
renders as next with a filled bullet and a bracketed state line; every
other stage stays hollow.

Also fixes the card's summary row clipping behind the sticky footer:
the scroll container's bottom buffer (pb-10, 40px) was shorter than
the footer's own rendered height (~64px). Sentence-cases stage labels
(Procurement Validation -> Procurement validation, etc.) and PR / PO ->
PR and PO, single-sourced in journeys.ts.
Copilot AI review requested due to automatic review settings August 20, 2026 21:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 117 out of 147 changed files in this pull request and generated no new comments.

Suppressed comments (2)

apps/apollo-vertex/package.json:66

  • @tanstack/router-core is pinned to 1.171.17 while @tanstack/react-router is ^1.170.18. Keeping TanStack Router packages on mismatched versions can cause duplicate installs and type/runtime incompatibilities. Suggest aligning them to the same release (or sourcing needed types from the existing @tanstack/react-router dependency to avoid an extra direct dep).
    apps/apollo-vertex/app/guided-buying/guided-buying-mount.tsx:38
  • The component always renders the full-screen "Loading prototype…" element even after the real Guided Buying shell is rendered into the separate React root. Even if it ends up visually behind the shell (DOM order / z-index), it remains in the DOM/accessibility tree and can be announced by screen readers alongside the actual app. Consider rendering null after mount, or at least marking the placeholder aria-hidden / removing it once the external root is created.

petervachon and others added 4 commits August 21, 2026 15:30
…letion state

- Details pane: two-column label-above-value grid, section headings
  removed (grouping still carried by spacing), commodity/vendor/term/
  money facts derived from the seed instead of a flat admin-only list
- Placeholder register: each entry can carry a provisional display
  value alongside its ruling description, with a dev-only reveal mode
  that marks provisional strings without touching layout
- Completion state leads with the outcome (contract value and elapsed
  duration) instead of the automation claim, adds terms/price outcome
  cards, and reads resolution rows in first person for the buyer
- Workbench header: record-level disposition slot removed until its
  behaviour is ruled on; queue card gets a primary ring at 8px radius
- Exception evidence metric column renders its unit beneath the value
  instead of inline

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… view

Copies the card grid, glow, prompt bar and insight renderers verbatim
from PR 616's dashboard experiment, strips the scripted demo pieces and
dev control panels, and repoints the data layer at Elena's own
analytics module instead of the experiment's hardcoded datasets.

Restores the background glow after an earlier pass wrongly dropped it,
guards the KPI badge against rendering empty, wires her sub findings
into the card expand state, and fixes a height cascade bug that kept
expanding cards from actually growing in the grid.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… states

Builds out the four insight cards ported in 86055ee into real, data-backed
visuals: donut/proportion-bar/stage-duration chart types, per-card icons,
and a designed expanded state for each card that adds detail rather than
replacing the face (stage bars gain the commodity breakdown beneath them
with a connecting line, intake quality gains its return-reason breakdown,
off contract spend gains its supporting facts column).

Adds the underlying data (return reasons, commodity cycle time, on/off
contract split) to analytics.ts and registers the new provisional copy in
placeholders.ts. Adds a fade-to-skeleton-to-content reveal sequence on
expand, a width-only growth path for cards that don't need more height,
and assorted page-header and hero-trend polish.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds an AI mark to each insight card's corner (only where a scripted
answer is registered), opening the existing composer grounded to that
card: it auto-asks on click, shows the answer as a right-aligned bubble
with suggested follow ups, and dims the other cards while active.

Also fixes a truncation tooltip that could get stuck open under quick,
repeated hovering (replaced with a native title attribute), aligns KPI
numbers across cards regardless of whether they show an expand control,
swaps two KPI numbers to the shared ai-gradient-text token, removes the
stage list's rail now that it read as too busy, and nudges the page
header's glow and Share button.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 25, 2026 16:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 117 out of 167 changed files in this pull request and generated 4 comments.

Comment on lines +35 to +38
useLayoutEffect(() => {
const el = ref.current;
setIsTruncated(el != null && el.scrollWidth > el.clientWidth);
}, [text]);
Comment on lines +18 to +21
const TierContext = createContext<TierContextValue>({
tier: "p1",
setTier: () => {},
});
Comment on lines +6 to +11
* Gates a composer's send control on attachment presence rather than typed
* text, for J3's document-led entry points. AiChatInput owns pendingFiles
* internally and exposes no way to read it, so this reads the one signal it
* does expose (onPendingFilesChange) and turns it into a boolean a caller
* can feed straight back into AiChatInput's own existing `disabled` prop,
* rather than a new disabled mechanism of this component's own.
Comment on lines +20 to +34
<button
type="button"
onClick={onClose}
className="absolute top-5 right-5 z-20 size-7 rounded-md flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-all"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className="size-4"
>
…page

Adds a P2 recommendation to the "where the time goes" card that Elena can
send to a new CoE queue, splits the stage and commodity breakdowns into
two columns so the recommendation fits without clipping, and adds Ravi
Mehta as a P2-only persona with a queue and finding detail page where he
can review evidence, run a summary test, and publish. Publishing updates
the same seeded record Elena's card reads, so her card picks up a
published state without a second block. Also fixes a stale re-render on
"Send to CoE" caused by the React Compiler memoizing a mutable module
level lookup, and nudges two chart faces up 8px to align with their
headers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 25, 2026 20:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 115 out of 172 changed files in this pull request and generated 1 comment.

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

apps/apollo-vertex/registry/ai-chat/components/ai-chat-input.tsx:155

  • sendDisabled only disables the send button, but pressing Enter in the textarea still calls submitMessage() and will submit even when sendDisabled is true (e.g. attachment-required flows). This bypasses the intended gate for keyboard users.
    apps/apollo-vertex/package.json:66
  • @tanstack/router-core is pinned to a different minor version than @tanstack/react-router. These packages are tightly coupled and mixed versions can lead to duplicate installations and type/runtime mismatches. Align the versions (or remove the direct dependency if it’s only needed for types).

Comment on lines +77 to +89
<TableRow
key={finding.id}
onClick={() =>
void navigate({
to: "/coe/$id",
params: { id: finding.id },
})
}
className={cn(
"min-h-[52px]",
"cursor-pointer hover:bg-muted/50",
)}
>
…App previews

Next.js basePath doesn't rewrite plain <img> src attributes, only its own
next/image, next/link, and next/script, so every hardcoded root relative
asset path (the shell's own UiPath logo, and the Autopilot icon used in
three outcomes components) 404'd once served from a Coded App preview's
sub-path. Adds a shared assetPath() helper, the same fix app/layout.tsx's
navbar logo already used, and applies it everywhere else the same bug
was reachable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 26, 2026 10:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 115 out of 173 changed files in this pull request and generated 2 comments.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

apps/apollo-vertex/registry/ai-chat/components/ai-chat-input.tsx:155

  • sendDisabled only disables the send button, but sending can still be triggered via Enter (textarea keydown) or form submit, so the gate can be bypassed. If sendDisabled is meant to block sending, it should also be enforced in submitMessage.

Comment on lines +3 to +10
import { useEffect, useState } from "react";

export type ViewMode = "desktop" | "compact" | "stacked";

export function useViewMode(
ref: React.RefObject<HTMLDivElement | null>,
): ViewMode {
const [mode, setMode] = useState<ViewMode>("desktop");
Comment on lines +8 to +13
<a
href="/guided-buying"
target="_blank"
rel="noreferrer"
className="not-prose inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground no-underline transition-colors hover:bg-primary/90"
>
…enus

Splits the flat persona list into "Journey 1: Catalog" (Marcus, Alex) and
"Journey 3: Software" (Priya, Sam, Dana, Elena, Ravi under P2), each its
own DropdownMenuSub flyout matching the existing Toggle theme/Language
treatment, rather than two labeled but flat sections.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 26, 2026 12:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 115 out of 173 changed files in this pull request and generated no new comments.

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

apps/apollo-vertex/registry/ai-chat/components/ai-chat-input.tsx:114

  • The onPendingFilesChange effect intentionally omits the callback from its dependency list, which can call a stale handler if a parent re-renders with a new function (and it requires an eslint disable). Including the callback keeps behavior correct and removes the need for the disable.
    apps/apollo-vertex/package.json:66
  • @tanstack/router-core is pinned to 1.171.17 while @tanstack/react-router resolves to 1.170.x (see pnpm-lock). Mixing TanStack router package versions can lead to duplicate installs and type incompatibilities (especially since RoutePaths is used for type-level route validation). Align the versions to the same release line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:apollo-vertex size:XXL 1,000+ changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants