Skip to content

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

Draft
dbacomputer wants to merge 3 commits into
mainfrom
hitl-prototype
Draft

feat(apollo-react): add LockableValueField HITL prototype#893
dbacomputer wants to merge 3 commits 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 08, 2026, 12:08:17 PM
apollo-docs 🟢 Ready Preview, Logs Jul 08, 2026, 12:08:17 PM
apollo-landing 🟢 Ready Preview, Logs Jul 08, 2026, 12:08:17 PM
apollo-vertex 🟢 Ready Preview, Logs Jul 08, 2026, 12:08:17 PM

@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.3% 3.9% (5/129) 7.28 MB 27.68 MB +9.9 KB
@uipath/apollo-wind 40.3% 398.9 KB 2.60 MB +4.0 KB
@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.

…build

Storybook imports apollo-wind's tailwind.css directly as its Tailwind
entry point, including for apollo-react's canvas stories, but the
@source glob only covered apollo-wind's own files. Utility classes
unique to apollo-react (e.g. container-query variants) silently
produced no CSS since they were never scanned.

Also pins @tailwindcss/vite to an exact version already cleared by the
pnpm minimumReleaseAge policy, keeping it aligned with the tailwindcss
core version resolved elsewhere in the workspace.
Iterates the HITL "Quick Approve" panel prototype for coworker
feedback:

- Field-type switching (string, integer, date, boolean, single/multi
  select, file) with per-type value controls and Fixed/Expression
  copy.
- Responsive header: field-type/AI-assist/insert-variable controls
  collapse to icon-only in narrow containers, plus a `compact` prop to
  force that layout for side-by-side comparison.
- Real tooltips on the icon-only header controls instead of native
  title attributes.
- Edit/Preview/JSON toggle for the Quick Form card, restyled to
  borderless square icon buttons matching the compact header controls.
- Showcase panel documenting the component with live Full view /
  Compact view examples.
Copilot AI review requested due to automatic review settings July 8, 2026 19:03
@github-actions github-actions Bot added size:XXL 1,000+ changed lines. and removed size:XL 500-999 changed lines. labels Jul 8, 2026

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 5 out of 6 changed files in this pull request and generated 9 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment on lines +15 to +19
/* Storybook (apps/storybook/.storybook/preview.tsx) imports this file
* directly, making it the Tailwind entry point for the whole app — including
* apollo-react's canvas stories. Without this, utility classes unique to
* apollo-react (not already used somewhere in apollo-wind) silently produce
* no CSS, since they'd never be scanned otherwise. */
* apollo-react's canvas stories. Without this, utility classes unique to
* apollo-react (not already used somewhere in apollo-wind) silently produce
* no CSS, since they'd never be scanned otherwise. */
@source "../../../apollo-react/src/**/*.{js,jsx,ts,tsx}"; No newline at end of file
Comment on lines +219 to +223
{label ?? (
<Label htmlFor={id} className="text-xs font-medium text-foreground-muted">
{FIELD_LABEL[mode]}
{required && <span className="ml-0.5 text-destructive">*</span>}
</Label>
Comment on lines +408 to +416
{value ? (
new Date(value).toLocaleDateString(undefined, {
year: 'numeric',
month: 'long',
day: 'numeric',
})
) : (
<span className="text-muted-foreground">Pick a date</span>
)}
Comment on lines +392 to +396
id={id}
checked={value === 'true'}
onCheckedChange={(checked) => onValueChange?.(String(checked))}
disabled={locked}
/>
Comment on lines +2702 to +2715
const handleJsonChange = (value: string) => {
setJsonDraft(value);
try {
const parsed = JSON.parse(value);
if (!Array.isArray(parsed)) {
setJsonError('Expected a JSON array of fields.');
return;
}
setCases(parsed);
setJsonError(null);
} catch {
setJsonError('Invalid JSON.');
}
};
Comment on lines +8 to +13
export {
DEMO_SELECT_OPTIONS,
FIELD_TYPE_META,
LockableValueField,
parseListValue,
} from './LockableValueField';
* the direction a full code-editing surface would take. Select/multiselect
* options are demo placeholders; file uploads aren't persisted anywhere.
*/
export function LockableValueField({
Comment on lines +170 to +172
id?: string;
className?: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants