Skip to content

fix(apollo-react): ModelPicker cost badges read Discovery's real CostDetails; built-in delete confirmation#958

Open
denispetre wants to merge 6 commits into
mainfrom
fix/model-picker-cost-shape-delete-confirm
Open

fix(apollo-react): ModelPicker cost badges read Discovery's real CostDetails; built-in delete confirmation#958
denispetre wants to merge 6 commits into
mainfrom
fix/model-picker-cost-shape-delete-confirm

Conversation

@denispetre

Copy link
Copy Markdown
Contributor

What changed?

Two ModelPicker follow-ups to #949, found while integrating Agent Builder against 6.0.0:

1. Cost badges never rendered — the gateway nests token costs as costDetails.flatCosts.inputTokenCost (cents per million tokens; tieredCosts[] for tiered pricing), but the picker's DiscoveryModel type and defaultCostTier read a flat costDetails.inputTokenCost that no deployment serves. Types now match the DTO, defaultCostTier bins the nested value (first tier for tiered pricing) at 100/500 cents per million, and stories/tests use the real shape.

2. Deleting a BYO configuration now asks first — a delete affects every consumer in the tenant, so the picker shows a built-in confirmation dialog (naming the configuration) before invoking onDeleteModel. The dialog honors the shadow-DOM popupContainer/disablePortal plumbing; strings added to all 14 picker catalogs (English fallback pending translation — added directly to the JSONs because lingui extract currently fails on main with a pre-existing duplicate-default in autopilot-chat.error.multiple-files).

Tests

79/79 in the component folder (delete test now exercises cancel + confirm); full package build green.

First consumer: UiPath/Agents#5858.

🤖 Generated with Claude Code

denispetre and others added 2 commits July 23, 2026 11:53
…adges

The gateway nests token costs as costDetails.flatCosts.inputTokenCost
(cents per million tokens; tieredCosts for tiered pricing) — the picker
read a flat inputTokenCost that never exists, so default cost badges
never rendered. Types now match the DTO and defaultCostTier bins the
nested value at 100/500 cents per million.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deleting a configuration affects every consumer in the tenant, so the
picker now shows a built-in confirmation dialog (naming the
configuration) before invoking onDeleteModel. The dialog honors the
shadow-DOM container/disablePortal plumbing; strings ship in all
picker catalogs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 23, 2026 08:55

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 was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-design 🟢 Ready Preview, Logs Jul 23, 2026, 07:56:22 AM
apollo-docs 🟢 Ready Preview, Logs Jul 23, 2026, 07:56:22 AM
apollo-landing 🟢 Ready Preview, Logs Jul 23, 2026, 07:56:22 AM
apollo-vertex 🟢 Ready Preview, Logs Jul 23, 2026, 07:56:22 AM

@github-actions github-actions Bot added pkg:apollo-react size:L 100-499 changed lines. labels Jul 23, 2026
@github-actions

github-actions Bot commented Jul 23, 2026

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

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core 9.0% 43.84 MB 57.45 MB ±0
@uipath/apollo-react 38.8% 72.0% (429/596) 7.45 MB 28.57 MB +3.8 KB
@uipath/apollo-wind 41.5% 96.4% (53/55) 401.6 KB 2.60 MB +29 B
@uipath/ap-chat 85.8% 43.44 MB 55.94 MB +1.8 KB

"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.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 23, 2026 14:44

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 was unable to review this pull request because the user who requested the review has reached their quota limit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 23, 2026 14:51

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 was unable to review this pull request because the user who requested the review has reached their quota limit.

role=alertdialog wired to its title/description ids, focus starts on
the safe action, and the paper uses the picker's design tokens
(background-raised/foreground vars, 10px radius, Apollo font) so it
matches the dropdown panel and follows the host theme. Axe-clean on
WCAG 2.1 A/AA.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 24, 2026 06:46

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 was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments are ready.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Jul 24, 2026, 07:04:05 AM
apollo-docs Ready Preview · Logs Jul 24, 2026, 07:04:05 AM
apollo-landing Ready Preview · Logs Jul 24, 2026, 07:04:05 AM
apollo-vertex Ready Preview · Logs Jul 24, 2026, 07:04:05 AM

Plain Dialog structure (secondary Cancel + contained destructive
action, disableElevation) matching how products' own confirmation
dialogs render under the Apollo MUI theme; alertdialog semantics and
safe-action focus kept.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 24, 2026 13: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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CalinaCristian
CalinaCristian requested a review from Copilot July 24, 2026 16:13

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 encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Labels

pkg:apollo-react size:L 100-499 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants