Skip to content

feat(apollo-vertex): add ConfidenceSignal component - #1034

Open
petervachon wants to merge 2 commits into
mainfrom
feat/confidence-signal-vertex
Open

feat(apollo-vertex): add ConfidenceSignal component#1034
petervachon wants to merge 2 commits into
mainfrom
feat/confidence-signal-vertex

Conversation

@petervachon

Copy link
Copy Markdown
Collaborator

Summary

Mirrors #1001 onto a branch in this repo (not a fork) so the CI checks
gated on head.repo.fork == false (Build, Lint, Format, Check Dependency
Consistency) actually run. Chloe doesn't have write access to apollo-ui
yet, so those checks were silently skipped rather than failing on #1001.

Same single commit, same author, no changes to the code itself.

Verified locally

  • biome check on the new confidence-signal files: clean
  • tsc --noEmit: zero errors in the new files
  • Dev server renders /components/confidence-signal correctly

Note: pnpm build's typecheck step currently fails on
app/components/form-wizard/form-wizard-demo.tsx — pre-existing on
main, unrelated to this change.

Closes nothing — #1001 stays open as the original PR; this is just to
get real CI signal while the access issue is sorted out separately.

🤖 Generated with Claude Code

Adds a signal-bar AI confidence chip (high/medium/low/unknown) with
min/med/max density variants, a tooltip on every chip, and a popover for
factor breakdowns and next-step CTAs, plus an opt-in one-time acquire
animation that respects prefers-reduced-motion.

The action CTA (nextStep) is required for medium/low confidence per team
decision, and optional for high/unknown, enforced via a discriminated
union type. Level labels and default explanations resolve through
react-i18next under the confidence_signal_* prefix.

Registered in registry.json with docs at /components/confidence-signal.
Copilot AI lite review requested due to automatic review settings August 10, 2026 16:19
@petervachon
petervachon requested a review from a team as a code owner August 10, 2026 16:19
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments are ready.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Aug 10, 2026, 09:32:41 AM
apollo-docs Ready Preview · Logs Aug 10, 2026, 09:32:41 AM
apollo-landing Ready Preview · Logs Aug 10, 2026, 09:32:41 AM
apollo-vertex Ready Preview · Logs Aug 10, 2026, 09:32:41 AM

@github-actions github-actions Bot added the size:XL 500-999 changed lines. label Aug 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1950 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1720
ISC 89
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.3.2 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package bundle size on this PR (no JS/TS source changes detected under packages/* or web-packages/*).

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core
@uipath/apollo-react
@uipath/apollo-wind
@uipath/ap-chat

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

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

Adds a new ConfidenceSignal UI component to the apps/apollo-vertex registry, along with documentation and i18n copy, so it can be consumed via the Vertex component registry and showcased under /components/confidence-signal.

Changes:

  • Introduces ConfidenceSignal (chip + tooltip, optional popover with factors/CTAs) and supporting subcomponents (bars, chip, factors, CTA, per-level config).
  • Registers the component in apps/apollo-vertex/registry.json and adds English translation keys.
  • Adds the docs page and navigation metadata entry for the component.

Reviewed changes

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

Show a summary per file
File Description
apps/apollo-vertex/registry/confidence-signal/confidence-signal.tsx Main component wiring tooltip + optional popover; exports public API types.
apps/apollo-vertex/registry/confidence-signal/confidence-signal-levels.ts Defines levels, CTA/factor types, and per-level copy + visual configuration.
apps/apollo-vertex/registry/confidence-signal/confidence-signal-factors.tsx Renders factor breakdown rows for the popover body.
apps/apollo-vertex/registry/confidence-signal/confidence-signal-cta.tsx Renders CTA as link-button (href) or button (onClick).
apps/apollo-vertex/registry/confidence-signal/confidence-signal-chip.tsx Renders the chip/button with icon + label and accessibility labeling.
apps/apollo-vertex/registry/confidence-signal/confidence-signal-bars.tsx SVG signal bars with optional “acquire” animation (reduced-motion aware).
apps/apollo-vertex/registry.json Registers the new confidence-signal component and its registry targets/deps.
apps/apollo-vertex/locales/en.json Adds confidence_signal_* English strings for labels/explanations.
apps/apollo-vertex/app/components/confidence-signal/page.mdx Adds the documentation page and usage examples.
apps/apollo-vertex/app/components/_meta.ts Adds the component to the components navigation list.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Storybook visual diff

✅ No stories are affected by this PR's changes; nothing to compare. Logs

Updated (PT): Aug 10, 2026, 09:33:25 AM

…-signal

The registry check flags any component that references an Apollo CSS
variable without providing it via cssVars or a registryDependency.
confidence-signal mapped color-warning-foreground in its theme block
but never supplied the light/dark literal, unlike every other entry
that uses this token (e.g. alert). Same oklch value in both themes,
matching the existing convention elsewhere in registry.json.

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

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 10 out of 10 changed files in this pull request and generated no new comments.

Suppressed comments (2)

apps/apollo-vertex/registry/confidence-signal/confidence-signal-cta.tsx:50

  • Button doesn’t set a default type, so this CTA renders as a submit button by default. If ConfidenceSignal is used inside a form, clicking the nextStep CTA could unintentionally submit the form. Set type="button" for the button-rendered CTA.
    <Button
      variant="outline"
      size="sm"
      className={cn("w-full", className)}
      onClick={cta.onClick}

apps/apollo-vertex/registry/confidence-signal/confidence-signal-factors.tsx:37

  • The React key for factor rows isn’t guaranteed to be unique. Two identical {label, value} pairs will collide, causing React warnings and potentially stale row rendering. Include the index (or a stable id field) in the key to ensure uniqueness.
      {factors.map((factor) => (
        // Labels are not guaranteed unique, so pair label with value: two rows
        // that match on both are indistinguishable to the reader anyway.
        <ConfidenceSignalFactorRow
          key={`${factor.label}:${factor.value}`}

@petervachon petervachon self-assigned this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:apollo-vertex size:XL 500-999 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants