Skip to content

feat(apollo-react): add LockableValueField HITL prototype#893

Draft
dbacomputer wants to merge 1 commit into
mainfrom
hitl-prototype
Draft

feat(apollo-react): add LockableValueField HITL prototype#893
dbacomputer wants to merge 1 commit into
mainfrom
hitl-prototype

Conversation

@dbacomputer

Copy link
Copy Markdown
Collaborator

Summary

Prototype for a Quick Approve panel demonstrating quick-form editing inside the Property Panel experience — built on top of the InputGroup primitive from #890.

  • LockableValueField — a string field with:
    • A left lock icon → popover with Unlocked / Locked (locked = read-only, not disabled).
    • A right "T" icon → popover with Fixed value / Expression, swapping the field's label and styling the value as code in Expression mode.
    • An AI-assist popover (describe what you want → Generate) and an Insert-variable affordance.
  • "Lockable Field" story — a full Quick Approve panel:
    • Header matching the standard panel pattern (icon, title, subtext, action button).
    • Parameters / Error handling / Advanced tabs, matching other panel stories.
    • Delivery channel multi-select (Slack, Email, Action Center, Microsoft Teams).
    • Assignment criteria search + dropdown, side by side.
    • Quick form section (UI/JSON toggle) containing a draggable, deletable, reorderable list of fields — seeded with Invoice Number, Submission Date, Approved Amount, each marked required.

Notes for reviewers

  • This is a review prototype, not production-wired — no schema/backend integration yet.
  • The requested user-round-arrow-left icon isn't in the installed lucide-react@0.577.0 (added in 1.20.0); used UserRoundCheck instead rather than bumping a shared dependency across a major version for one icon. Flagging in case a real icon upgrade is wanted later.
  • Drag-and-drop uses the @dnd-kit dependency already used by StageNode, following the same sensor setup convention.

Test plan

  • pnpm exec tsc --noEmit — clean
  • pnpm biome check — clean
  • pnpm vitest run (NodePropertyPanel) — 9/9 existing tests pass, no regressions
  • Manually verified in Storybook: lock/unlock read-only behavior, type-switcher popover, AI-assist popover, delivery-channel multi-select, assignment dropdown, UI/JSON toggle, drag-reorder, delete, add-case

🤖 Generated with Claude Code

Prototype for a Quick Approve panel demonstrating quick-form editing
inside the Property Panel experience.

- LockableValueField: a string field built on apollo-wind's InputGroup,
  with a lock/unlock popover (locked = read-only, not disabled) and a
  Fixed value / Expression type-switcher popover, plus an AI-assist
  popover (describe + generate) and an Insert-variable affordance.
- NodePropertyPanel "Lockable Field" story: a Quick Approve panel with
  a Delivery channel multi-select, an Assignment criteria search +
  dropdown, and a Quick form section (UI/JSON toggle) containing a
  draggable, deletable, re-orderable list of LockableValueField rows
  seeded with Invoice Number / Submission Date / Approved Amount.

Built entirely on existing apollo-wind primitives (InputGroup,
DropdownMenu, Popover, MultiSelect, Select, Card, ToggleGroup) and the
existing @dnd-kit dependency already used by StageNode, following this
file's established prototype conventions (PanelFrame, CasePanel-style
row chrome). No production wiring yet — this is a review prototype.
Copilot AI review requested due to automatic review settings July 7, 2026 15:56
@github-actions

github-actions Bot commented Jul 7, 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 07, 2026, 09:01:22 AM
apollo-docs 🟢 Ready Preview, Logs Jul 07, 2026, 09:01:22 AM
apollo-landing 🟢 Ready Preview, Logs Jul 07, 2026, 09:01:22 AM
apollo-vertex 🟢 Ready Preview, Logs Jul 07, 2026, 09:01:22 AM

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1948 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1718
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.2.4 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

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 HITL-oriented LockableValueField prototype to the NodePropertyPanel Storybook surface, demonstrating quick-form editing patterns (lock/read-only, fixed vs expression, AI assist affordance) and a draggable list of fields.

Changes:

  • Introduces LockableValueField (lock toggle + value-type switcher + AI/insert affordances) built on @uipath/apollo-wind’s InputGroup.
  • Adds a new “Lockable Field” Storybook story that renders a Quick Approve-style panel, including a draggable/reorderable list of lockable fields.
  • Exports LockableValueField and its types from the NodePropertyPanel barrel.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/apollo-react/src/canvas/components/NodePropertyPanel/NodePropertyPanel.stories.tsx Adds the “Lockable Field” prototype story, including DnD-based field reordering and panel UI.
packages/apollo-react/src/canvas/components/NodePropertyPanel/LockableValueField.tsx Adds the new LockableValueField component (lock + mode switch + AI/insert affordances) using apollo-wind primitives.
packages/apollo-react/src/canvas/components/NodePropertyPanel/index.ts Re-exports LockableValueField and related types from the NodePropertyPanel module.

Comment on lines +190 to +197
<InputGroupInput
id={id}
readOnly={locked}
value={value}
onChange={(e) => onValueChange?.(e.target.value)}
placeholder={FIELD_PLACEHOLDER[mode]}
className={mode === 'expression' ? 'font-mono' : undefined}
/>
Comment on lines +65 to +69
export function LockableValueField({
value = '',
onValueChange,
locked = true,
onLockedChange,
Comment on lines +2788 to +2791
>
<Plus size={12} />
Add case
</button>
@github-actions

github-actions Bot commented Jul 7, 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.82 MB 57.31 MB ±0
@uipath/apollo-react 34.4% 3.8% (2/53) 7.27 MB 27.64 MB +3.7 KB
@uipath/apollo-wind 40.3% 395.0 KB 2.57 MB −2 B
@uipath/ap-chat 85.8% 43.41 MB 55.85 MB ±0

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

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

Labels

pkg:apollo-react size:XL 500-999 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants