Skip to content

Add sample for du validation station in coded action app - #709

Open
Sandeepan-Ghosh-0312 wants to merge 13 commits into
mainfrom
feat/addSampleForDUCodedActionApp
Open

Add sample for du validation station in coded action app#709
Sandeepan-Ghosh-0312 wants to merge 13 commits into
mainfrom
feat/addSampleForDUCodedActionApp

Conversation

@Sandeepan-Ghosh-0312

@Sandeepan-Ghosh-0312 Sandeepan-Ghosh-0312 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Adds two Coded Action App samples for the Document Understanding Validation Station, and brings the two existing standalone validation samples onto the same widget version and loading model.

What's new

Sample Shows
action-app-with-document-validation The whole app UI is the ValidationStation widget. Reads the task, hands contentValidationData to the widget, completes the action on submit.
action-app-with-document-validation-subcomponents The same review flow composed from the five subcomponents — document viewer, document type, extraction fields, line-item editor, business rules — in a custom grid, linked by one shared instanceId.

Both are complete Vite + React 19 + TS apps with a README, action-schema.json, uipath.json.example and a preview GIF, and both are listed in the Template Gallery.

Also in here

All four DU validation samples moved to @uipath/ui-widgets-validation-station@1.1.0-rc.0 — the two new ones plus document-validation-app (was 1.0.0) and document-validation-subcomponents-app (was 1.0.1). That release changes two things:

  • The widget is now loaded, not imported. It ships as a separate bundle served from <app base>/du-vs-wc, registered by a configureValidationStationWc() call at startup. scripts/stage-du-wc.mjs stages it into public/du-vs-wc via predev/prebuild hooks; Vite serves public/ verbatim in dev and copies it to dist/ on build. This replaces two hand-written Vite plugins, so vite.config.ts now carries no bundling code of its own. includeFonts: true is required — the bundle's fonts.css is the only source of @font-face, so without it every icon renders blank.
  • API changes: the folderId prop is gone (the folder comes from the payload), useBucketArtifactsuseDuDocumentArtifacts, and the save callbacks are renamed and re-signatured (onSubmitComplete(result)onSubmit(request, result?), etc.). result is now optional, and absent means nothing was persisted — so it's treated as a failure rather than completing a task over unsaved edits.

Docs fixes for two things that cost real debugging time:

  • The redirect URI guidance said https://cloud.uipath.com/<orgId>/<tenantId>/actions_. Those are GUIDs, but the placeholders read as the org and tenant names in the address bar — and registering the name-based URI fails with invalid_request / Invalid redirect_uri with nothing pointing at the cause. The host was also hardcoded, so anyone on alpha or staging registered a URI their environment never sends. Applied to all five coded action app READMEs and the getting-started guide.
  • Neither new README said how to run the app before deploying it, and the obvious guess is wrong: a coded action app is an iframe that receives its task over postMessage, so opening localhost:5173 directly fails with "Discarding event from invalid origin". There's now a Run it locally step covering the Action Center debug page.

Gallery: both new entries had "preview": null despite shipping GIFs, so their cards fell back to placeholder posters. Also added document-validation-subcomponents-app, which was the only sample missing from the gallery entirely, and moved its GIF to the conventional screenshots/preview.gif.

Review notes

  • Requires @uipath/ui-widgets-validation-station@1.1.0, now published as latest. All four samples pin it exactly — the package changed its API in a minor (1.0.1 → 1.1.0), so a ^ range is not safe.
  • dist/ is ~84 MB per sample. The widget bundle self-hosts its own fonts (~40 MB of woff2). Trimming them was tried and reverted — an iframe inherits no @font-face rules from the page around it, so the icons break.
  • The two .uis template links and three screenshot placeholders in the new READMEs are left as-is pending a check on who wrote them — the files were never added to the repo.

Verification

tsc, eslint and npm run build clean on all four samples against the published 1.1.0; dist/du-vs-wc/ verified to contain main.js, polyfills.js, styles.css, fonts.css and du-assets/. The staging script now asserts those landed, so a partial copy fails the build instead of 404ing at runtime. End-to-end run confirmed in Action Center against a live DU validation action.

No SDK (src/) code is touched.

@Sandeepan-Ghosh-0312
Sandeepan-Ghosh-0312 requested a review from a team September 2, 2026 18:27
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://UiPath.github.io/uipath-typescript/pr-preview/pr-709/

Built to branch gh-pages at 2026-09-10 08:36 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Comment thread docs/samples/index.md Outdated
{ "id": "action-app-with-image", "title": "Action App — Image", "description": "Coded Action App for loan-application review. Reviewers assess applicant details, view a bundled loan-application image, and complete the task with an Approve or Reject decision.", "category": "action-apps", "framework": "React", "tags": ["Action Center","Coded Action App","Images"], "path": "samples/coded-action-apps/action-app-with-image", "preview": "samples/coded-action-apps/action-app-with-image/screenshots/preview.gif" },
{ "id": "action-app-with-storage-bucket-document", "title": "Action App — Storage Bucket Document", "description": "Coded Action App for loan-application review that loads its document from a Storage Bucket by bucket name and file path, as opposed to receiving a direct file attachment.", "category": "action-apps", "framework": "React", "tags": ["Action Center","Coded Action App","Storage Buckets","Documents"], "path": "samples/coded-action-apps/action-app-with-storage-bucket-document", "preview": "samples/coded-action-apps/action-app-with-storage-bucket-document/screenshots/preview.gif" }
{ "id": "action-app-with-storage-bucket-document", "title": "Action App — Storage Bucket Document", "description": "Coded Action App for loan-application review that loads its document from a Storage Bucket by bucket name and file path, as opposed to receiving a direct file attachment.", "category": "action-apps", "framework": "React", "tags": ["Action Center","Coded Action App","Storage Buckets","Documents"], "path": "samples/coded-action-apps/action-app-with-storage-bucket-document", "preview": "samples/coded-action-apps/action-app-with-storage-bucket-document/screenshots/preview.gif" },
{ "id": "action-app-with-document-validation", "title": "Action App — Document Validation", "description": "Coded Action App whose entire UI is the Document Understanding Validation Station. A reviewer corrects extracted fields and line-item tables inside a Document Understanding validation action, then submits, saves a draft, or reports an exception.", "category": "action-apps", "framework": "React", "tags": ["Action Center","Coded Action App","Document Understanding","Validation Station","HITL"], "path": "samples/coded-action-apps/action-app-with-document-validation", "preview": null }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Convention from Agents.md (Samples & Template Gallery section):

Every app under samples/ must ship a preview GIF at samples/<app>/screenshots/ (e.g. preview.gif) showing the app in use. The app README and the docs Template Gallery both render it — a missing GIF leaves an empty poster tile in the gallery.

No screenshots/preview.gif is included in this PR and the gallery entry has "preview": null. Please add the GIF and update this entry to "preview": "samples/coded-action-apps/action-app-with-document-validation/screenshots/preview.gif" before merging.

// genuine ES-module imports (`Sec-Fetch-Dest: script`) pass through to Vite.
function serveDuValidationStationRawCss(): Plugin {
const pattern = new RegExp(
`/@uipath/du-validation-station-wc/(${WC_RUNTIME_CSS.join('|')})$`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The dot (.) in styles.css and fonts.css is unescaped in a RegExp constructor — it matches any character, not a literal period. In practice the URL is specific enough that this never causes a wrong match, but it is technically incorrect.

Suggested change
`/@uipath/du-validation-station-wc/(${WC_RUNTIME_CSS.join('|')})$`,
`/@uipath/du-validation-station-wc/(${WC_RUNTIME_CSS.map(f => f.replace(/\./g, '\\.')).join('|')})$`,

const require = createRequire(import.meta.url);

const WC_ROOT = dirname(
require.resolve('@uipath/du-validation-station-wc/package.json'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@uipath/du-validation-station-wc is consumed here at build time but is only reachable as a transitive dependency of @uipath/ui-widgets-validation-station — it is not listed in package.json. If the parent package ever stops depending on it (or pins a different version), require.resolve will throw and the build breaks with no obvious cause.

Add it as a direct devDependency to make the relationship explicit:

"@uipath/du-validation-station-wc": "1.0.0-rc.1"

@claude

claude Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Three findings this run — see inline comments for details and suggestions.

  1. Missing preview GIF (docs/samples/index.md L144) — gallery entry ships with null; convention requires a screenshots/preview.gif.
  2. Unescaped . in regex (vite.config.ts L51) — styles.css|fonts.css dots match any character; suggestion attached.
  3. Implicit transitive dependency (vite.config.ts L11) — @uipath/du-validation-station-wc is used at build time but not listed in package.json.

@Sandeepan-Ghosh-0312 Sandeepan-Ghosh-0312 changed the title Feat/add sample for du coded action app Add sample for du validation station in coded action app Sep 2, 2026
@claude

claude Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

✅ No issues found. Checked for bugs and CLAUDE.md compliance.

Comment on lines +98 to +116
1. Import the [Template With Document Validation.uis](./Template%20With%20Document%20Validation.uis) solution in **Studio Web**.

<!-- TODO: attach screenshot — importing the solution in Studio Web -->
_Screenshot placeholder — importing the solution in Studio Web._

2. In the **Properties** panel of the User Task node, update the **Action App** field to point to your deployed coded action app.

<!-- TODO: attach screenshot — User Task properties, Action App field -->
_Screenshot placeholder — pointing the User Task at the deployed app._

3. Click **Debug** to run the process — this will create an Action Center task backed by your app.
4. Open Action Center and complete the task to verify the full flow end-to-end.

--- OR ---

Create the task using an RPA workflow in **Studio Desktop** that uses the **Create App Task** activity, pointing to your deployed coded action app and passing the required inputs.

<!-- TODO: attach screenshot — Create App Task activity in Studio Desktop -->
_Screenshot placeholder — the Create App Task activity._

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This section ships with two pieces of unfinished content that will be visible to users as-is:

  1. Broken link (line 98)[Template With Document Validation.uis](./Template%20With%20Document%20Validation.uis) references a file not included in this PR. Add the .uis file to the sample directory, or replace the link with instructions for creating the workflow by hand.

  2. Visible placeholder text (lines 101, 106, 116)_Screenshot placeholder — ..._ is Markdown italic, not an HTML comment. It renders as visible text on GitHub and the docs site. Replace with actual screenshots, or remove the lines entirely until the screenshots are ready.

@claude

claude Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

One new finding this run — see inline comment for details.

Unfinished README section (README.md L98–116) — the "Viewing the coded action app in Action Center" section has a broken link to a .uis file not in the PR, and three _Screenshot placeholder_ strings that render as visible italic text on GitHub and the docs site.

const require = createRequire(import.meta.url);

const WC_ROOT = dirname(
require.resolve('@uipath/du-validation-station-wc/package.json'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@uipath/du-validation-station-wc is consumed here at build time via require.resolve, but it is only a transitive dependency of @uipath/ui-widgets-validation-station — it is not listed in package.json. If the parent package ever stops depending on it or pins a different version, this call will throw with no obvious cause.

Add it as a direct devDependency to make the relationship explicit (same issue flagged on the sibling action-app-with-document-validation/vite.config.ts):

Suggested change
require.resolve('@uipath/du-validation-station-wc/package.json'),
require.resolve('@uipath/du-validation-station-wc/package.json'),
"@uipath/du-validation-station-wc": "1.0.0-rc.1"

(in devDependencies of package.json)

// genuine ES-module imports (`Sec-Fetch-Dest: script`) pass through to Vite.
function serveDuValidationStationRawCss(): Plugin {
const pattern = new RegExp(
`/@uipath/du-validation-station-wc/(${WC_RUNTIME_CSS.join('|')})$`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The dot (.) in styles.css and fonts.css is unescaped inside the RegExp constructor — it matches any character, not a literal period. In practice the URL is specific enough that it never causes a wrong match, but it is technically incorrect (same bug flagged on the sibling action-app-with-document-validation/vite.config.ts).

Suggested change
`/@uipath/du-validation-station-wc/(${WC_RUNTIME_CSS.join('|')})$`,
`/@uipath/du-validation-station-wc/(${WC_RUNTIME_CSS.map(f => f.replace(/\./g, '\\.')).join('|')})$`,

Comment on lines +120 to +138
1. Import the [Template With Document Validation Subcomponents.uis](./Template%20With%20Document%20Validation%20Subcomponents.uis) solution in **Studio Web**.

<!-- TODO: attach screenshot — importing the solution in Studio Web -->
_Screenshot placeholder — importing the solution in Studio Web._

2. In the **Properties** panel of the User Task node, update the **Action App** field to point to your deployed coded action app.

<!-- TODO: attach screenshot — User Task properties, Action App field -->
_Screenshot placeholder — pointing the User Task at the deployed app._

3. Click **Debug** to run the process — this will create an Action Center task backed by your app.
4. Open Action Center and complete the task to verify the full flow end-to-end.

--- OR ---

Create the task using an RPA workflow in **Studio Desktop** that uses the **Create App Task** activity, pointing to your deployed coded action app and passing the required inputs.

<!-- TODO: attach screenshot — Create App Task activity in Studio Desktop -->
_Screenshot placeholder — the Create App Task activity._

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This section has the same two problems flagged on the sibling action-app-with-document-validation/README.md:

  1. Broken link (line 120)[Template With Document Validation Subcomponents.uis](./Template%20With%20Document%20Validation%20Subcomponents.uis) references a file not included in this PR. Add the .uis file to the sample directory, or replace the link with instructions for creating the workflow manually.

  2. Visible placeholder text (lines 123, 128, 138)_Screenshot placeholder — ..._ is Markdown italic, not an HTML comment. It renders as visible italic text on GitHub and the docs site. Replace with actual screenshots, or remove the lines entirely until the screenshots are ready.

@claude

claude Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Three new findings in the newly added action-app-with-document-validation-subcomponents/ — see inline comments for details. These are the same issues already flagged on the sibling action-app-with-document-validation/ sample.

  1. Implicit transitive dependency (vite.config.ts L11) — @uipath/du-validation-station-wc is used via require.resolve at build time but is not listed in package.json as a direct devDependency.
  2. Unescaped . in regex (vite.config.ts L51) — dots in styles.css / fonts.css match any character; suggestion attached.
  3. Unfinished README section (README.md L120–138) — broken link to a .uis file not in the PR, and three _Screenshot placeholder_ strings that render as visible italic text.

@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

@claude

claude Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ No issues found. Checked for bugs and CLAUDE.md compliance.

@claude

claude Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ No issues found. Checked for bugs and CLAUDE.md compliance.

3 similar comments
@claude

claude Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ No issues found. Checked for bugs and CLAUDE.md compliance.

@claude

claude Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ No issues found. Checked for bugs and CLAUDE.md compliance.

@claude

claude Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ No issues found. Checked for bugs and CLAUDE.md compliance.

Comment thread docs/samples/index.md Outdated
{ "id": "action-app-with-image", "title": "Action App — Image", "description": "Coded Action App for loan-application review. Reviewers assess applicant details, view a bundled loan-application image, and complete the task with an Approve or Reject decision.", "category": "action-apps", "framework": "React", "tags": ["Action Center","Coded Action App","Images"], "path": "samples/coded-action-apps/action-app-with-image", "preview": "samples/coded-action-apps/action-app-with-image/screenshots/preview.gif" },
{ "id": "action-app-with-storage-bucket-document", "title": "Action App — Storage Bucket Document", "description": "Coded Action App for loan-application review that loads its document from a Storage Bucket by bucket name and file path, as opposed to receiving a direct file attachment.", "category": "action-apps", "framework": "React", "tags": ["Action Center","Coded Action App","Storage Buckets","Documents"], "path": "samples/coded-action-apps/action-app-with-storage-bucket-document", "preview": "samples/coded-action-apps/action-app-with-storage-bucket-document/screenshots/preview.gif" }
{ "id": "action-app-with-storage-bucket-document", "title": "Action App — Storage Bucket Document", "description": "Coded Action App for loan-application review that loads its document from a Storage Bucket by bucket name and file path, as opposed to receiving a direct file attachment.", "category": "action-apps", "framework": "React", "tags": ["Action Center","Coded Action App","Storage Buckets","Documents"], "path": "samples/coded-action-apps/action-app-with-storage-bucket-document", "preview": "samples/coded-action-apps/action-app-with-storage-bucket-document/screenshots/preview.gif" },
{ "id": "action-app-with-document-validation", "title": "Action App — Document Validation", "description": "Coded Action App whose entire UI is the Document Understanding Validation Station. A reviewer corrects extracted fields and line-item tables inside a Document Understanding validation action, then submits, saves a draft, or reports an exception.", "category": "action-apps", "framework": "React", "tags": ["Action Center","Coded Action App","Document Understanding","Validation Station","HITL"], "path": "samples/coded-action-apps/action-app-with-document-validation", "preview": "samples/coded-action-apps/action-app-with-document-validation/screenshots/preview.gif" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The gallery description ends with "then submits, saves a draft, or reports an exception." — but the README explicitly documents that the Report as exception button is hidden (options.hideReportAsExceptionButton: true) because the underlying API call (submitExceptionReport) targets a Document Understanding validation task id, which this app task doesn't have.

A user who clones the sample after reading the gallery will expect to find that button and won't.

Suggested change
{ "id": "action-app-with-document-validation", "title": "Action App — Document Validation", "description": "Coded Action App whose entire UI is the Document Understanding Validation Station. A reviewer corrects extracted fields and line-item tables inside a Document Understanding validation action, then submits, saves a draft, or reports an exception.", "category": "action-apps", "framework": "React", "tags": ["Action Center","Coded Action App","Document Understanding","Validation Station","HITL"], "path": "samples/coded-action-apps/action-app-with-document-validation", "preview": "samples/coded-action-apps/action-app-with-document-validation/screenshots/preview.gif" },
{ "id": "action-app-with-document-validation", "title": "Action App — Document Validation", "description": "Coded Action App whose entire UI is the Document Understanding Validation Station. A reviewer corrects extracted fields and line-item tables inside a Document Understanding validation action, then submits or saves a draft.", "category": "action-apps", "framework": "React", "tags": ["Action Center","Coded Action App","Document Understanding","Validation Station","HITL"], "path": "samples/coded-action-apps/action-app-with-document-validation", "preview": "samples/coded-action-apps/action-app-with-document-validation/screenshots/preview.gif" },

@claude

claude Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

One new finding this run — see inline comment for details.

Gallery description inaccuracy (docs/samples/index.md L145) — the action-app-with-document-validation entry says "then submits, saves a draft, or reports an exception", but the README explicitly hides the Report as exception button (hideReportAsExceptionButton: true) because the underlying API call requires a DU validation task id this app task never has. Suggestion attached.

Comment thread samples/coded-action-apps/README.md Outdated
| [`action-app-with-file-attachment-document`](./action-app-with-file-attachment-document) | The document arrives as a **direct file attachment** on the task | Previewing and downloading a task file attachment via `Attachments` | `OR.Folders.Read` |
| [`action-app-with-storage-bucket-document`](./action-app-with-storage-bucket-document) | The document lives in an Orchestrator **Storage Bucket** | Looking up a bucket by name and fetching a file by path via `Buckets` | `OR.Buckets.Read` |
| [`action-app-with-data-fabric-entity`](./action-app-with-data-fabric-entity) | Applicant data is stored in a **Data Fabric** entity | Reading an entity record, viewing its file attachment, and writing the decision back via `Entities` | `DataFabric.Schema.Read`, `DataFabric.Data.Read`, `DataFabric.Data.Write` |
| [`action-app-with-document-validation`](./action-app-with-document-validation) | A **Document Understanding** workflow raises a validation action | Embedding the **Validation Station** widget as the whole app — field correction, table editing, submit, save-as-draft, and report-as-exception | `OR.Buckets`, `OR.Tasks` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The "What it demonstrates" column lists report-as-exception as one of the demonstrated behaviours, but the sample explicitly hides that button (options.hideReportAsExceptionButton: true) and the README's own Report as exception section explains why it can never work for an app task. A developer who clones the sample after reading this table will expect to find that flow and won't.

Suggested change
| [`action-app-with-document-validation`](./action-app-with-document-validation) | A **Document Understanding** workflow raises a validation action | Embedding the **Validation Station** widget as the whole app — field correction, table editing, submit, save-as-draft, and report-as-exception | `OR.Buckets`, `OR.Tasks` |
| [`action-app-with-document-validation`](./action-app-with-document-validation) | A **Document Understanding** workflow raises a validation action | Embedding the **Validation Station** widget as the whole app — field correction, table editing, submit and save-as-draft | `OR.Buckets`, `OR.Tasks` |

@claude

claude Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

One new finding this run — see inline comment for details.

Inaccurate feature listing (samples/coded-action-apps/README.md L16) — the overview table says the sample demonstrates "report-as-exception" but that button is explicitly hidden (hideReportAsExceptionButton: true) and the sample's own README explains why it cannot work. Suggestion attached.

@@ -25,3 +25,6 @@ dist-ssr
*.sw?
.env
uipath.json

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: not related to PR but remove uipath.json from gitignore

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the coded apps samples have uipath.json in gitignore but not the coded action apps samples. Which one needs to change?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

need to remove for both

@Sandeepan-Ghosh-0312
Sandeepan-Ghosh-0312 force-pushed the feat/addSampleForDUCodedActionApp branch from f1a908f to abf9594 Compare September 10, 2026 08:30
@claude

claude Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

✅ No issues found. Checked for bugs and CLAUDE.md compliance.

…dation

feat(samples): add a coded action app for Document Understanding validation

Adds `action-app-with-document-validation`, a Coded Action App whose entire UI
is the Document Understanding Validation Station widget. When a DU workflow
raises a validation action, Action Center opens this app and the reviewer
corrects extracted fields, edits line-item tables, and submits.

Unlike the existing `document-validation-app` web app, this ships no task
inbox, task list, or OAuth flow: Action Center routes the reviewer to a single
action and injects the session, so the app only reads the task and renders the
widget.

- `contentValidationData` is declared with the dedicated `ContentValidationData`
  action-schema type rather than as an `object` with its members inlined. The
  CLI maps it to
  `UiPath.DocumentProcessing.Contracts.Actions.ContentValidationData`, and only
  recurses into nested `properties` when the type is literally `object`, so an
  inlined shape would both drop those members and degrade the field to
  `System.Object`.
- A single `Submit` outcome. A validation action is finished or it is not, so
  there is no approve/reject decision to record.
- Report-as-exception persists via `OrchestratorDuModule.submitExceptionReport`
  and does not complete the action; the report transitions the task on the DU
  side, matching what the web app sample does.
- No toolbar of its own. `IValidationStationOptions` can only hide two of the
  widget's four built-in buttons, so a custom bar could only duplicate them.
- Themes map Action Center's value through to the widget, including the
  high-contrast variants, with `AutoTheme` resolved against
  `prefers-color-scheme`.
- `vite.config.ts` copies the web component's runtime assets next to the build
  output and serves its stylesheets as raw CSS in dev; a green build alone does
  not prove either works, since the widget loads them at runtime.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… 1.1.0-rc.0

Upgrades both coded action app samples from @uipath/ui-widgets-validation-station
1.0.1 to 1.1.0-rc.0, which changes how the Validation Station is loaded and how it
reports saves.

API migration:
- The `folderId` prop is gone; the widget scopes itself to the folder named on
  `contentValidationData`, so the task's folder is merged into the payload when it
  arrives without one.
- `useBucketArtifacts(sdk, data, folderId)` -> `useDuDocumentArtifacts(sdk, data)`.
- Save callbacks renamed and re-signatured: `onSubmitComplete(result)` ->
  `onSubmit(request, result?)`, `onSaveAsDraftComplete` -> `onSaveAsDraft`,
  `onReportExceptionComplete(documentId, reason)` -> `onReportException(request)`,
  with the reason read off `request.exceptionReport`. `result` is now optional and
  absent means nothing was persisted, so it is treated as a failure rather than
  completing the action over unsaved edits.

Web component loading:
- The component is no longer resolved next to the app's own chunks; it loads from
  `<app base>/du-vs-wc`. `src/main.tsx` now calls `configureValidationStationWc()`,
  without which the custom elements were never registered.
- `scripts/stage-du-wc.mjs` stages the bundle into `public/du-vs-wc`, which Vite
  serves verbatim in dev and copies to `dist/` on build. This replaces the two
  custom Vite plugins, so vite.config.ts carries no bundling code of its own.
- `includeFonts: true` is required: the app renders in an iframe, which inherits no
  `@font-face` rules from the page around it, so the widget's icons render blank
  without the bundle's own Apollo and Material Icons faces.

Also drops the dropped-dependency leftovers `define: { global: 'globalThis' }` and
`optimizeDeps.exclude`, ignores the staged bundle in git and eslint, and updates
both READMEs to describe the staging step.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ioanajoj and others added 11 commits September 10, 2026 14:04
…tion 1.1.0-rc.0

Brings document-validation-app (was 1.0.0) and document-validation-subcomponents-app
(was 1.0.1) onto the same version and loading model as the coded action app samples.

API migration:
- The `folderId` prop is gone; the widget scopes itself to the folder named on
  `contentValidationData`, so the task's folder is merged into the payload when it
  arrives without one.
- `useBucketArtifacts(sdk, data, folderId)` -> `useDuDocumentArtifacts(sdk, data)`.
- Save callbacks renamed and re-signatured: `onSubmitComplete(result)` ->
  `onSubmit(request, result?)`, `onSaveAsDraftComplete` -> `onSaveAsDraft`,
  `onReportExceptionComplete(documentId, reason)` -> `onReportException(request)`,
  with the reason read off `request.exceptionReport`. `result` is now optional and
  absent means nothing was persisted, so it is treated as a failure rather than
  completing the task over unsaved edits.

Web component loading:
- The component is no longer resolved next to the app's own chunks; it loads from
  `<app base>/du-vs-wc`. `src/main.tsx` now calls `configureValidationStationWc()`,
  without which the custom elements were never registered.
- `scripts/stage-du-wc.mjs` stages the bundle into `public/du-vs-wc`, which Vite
  serves verbatim in dev and copies to `dist/` on build. This replaces the two
  custom Vite plugins, so vite.config.ts carries no bundling code of its own.
- `includeFonts: true` is required: nothing else on the page declares the Apollo or
  Material Icons faces, so without them the widget's icons render blank.

Also drops the dropped-dependency leftovers `define: { global: 'globalThis' }` and
`optimizeDeps.exclude`, ignores the staged bundle in git and eslint, and rewrites the
runtime-assets and troubleshooting sections of both READMEs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`useAuth.tsx` exported both the `AuthProvider` component and the `useAuth` hook,
which trips `react-refresh/only-export-components` - the one lint error standing in
each of these two apps, predating this branch.

Splits the file so the hook keeps its path and the provider moves out:
- `hooks/useAuth.ts` - `AuthContextType`, `AuthContext`, `useAuth`; no components,
  so the rule no longer applies.
- `hooks/AuthProvider.tsx` - the provider alone.

Only App.tsx changes: every other importer wants just `useAuth`, and
`hooks/useAuth` resolves the same after the .tsx -> .ts rename. `AuthContext` is now
exported so the two files can share it.

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

Addresses a code review of the validation-station migration.

- ReviewWorkspace built its folder-merged payload inline, so a fresh object came
  out of every render. `useDuDocumentArtifacts` keys its fetch effect on that
  object's identity - its own source says callers must pass a stable reference -
  so the fetch resolved, re-rendered, and fetched again without end, hammering the
  storage bucket. The other three samples already memoised this; now all four do.
- Presence checks on the payload's folder now use `!= null`. The widget's own guard
  is `!!(data?.FolderKey || data?.FolderId)`, so a wire value of `FolderId: null`
  read as present here and absent there, and the merge was skipped.
- The subcomponents action app README still documented `folderId` on
  CompactFieldsForm, a prop removed in the same migration.
- `@uipath/du-validation-station-wc` is now a declared devDependency. The staging
  script resolves it directly and only worked because npm hoisted it out of
  @uipath/ui-widgets-validation-station.
- The staging script asserts the five files the loader requests actually landed, so
  a partial copy fails the build instead of 404ing at runtime; skips the vendor's
  package metadata, which was being served from the app's own origin; and is now
  byte-identical across all four samples.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Three cleanups from a review pass, no behaviour change.

- WorkspaceProps hand-copied the three save-callback signatures character for
  character from the widget's exported `DuSaveCallbacks`. It now extends
  `Required<DuSaveCallbacks>` instead, so the compiler keeps them in step rather
  than leaving a copy to rot - which is what this migration had to repair.
- `buildFilter()` in ReviewInbox took no arguments and returned a fixed string, so
  it is now the constant it always was. Its sibling in ValidationInbox does take a
  status and stays a function.
- `completeTask` was a useCallback wrapping four lines with a single caller; it is
  inlined, which also drops it from handleSubmit's dependency array. Its comment
  only restated the call - the replacement records the part that isn't obvious,
  that completeTask replaces the task's data.

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

`https://cloud.uipath.com/<orgId>/<tenantId>/actions_` is strictly correct but reads
as the org and tenant names in the browser address bar, which is the wrong
substitution: the app sends the org and tenant GUIDs. Registering the name-based URI
gets `invalid_request` / `Invalid redirect_uri` from Identity, with nothing pointing
at the cause.

The host was also hardcoded to `cloud.uipath.com`, so anyone on alpha or staging
registered a URI their environment never sends - and the surrounding claim that the
entry is added automatically on first deploy does not always hold, which is exactly
when the name-based guess goes unnoticed.

Now says GUIDs explicitly, makes the host a placeholder, says to confirm rather than
assume the entry exists, and points at the `/identity_/connect/authorize` request as
the way to read the exact value. Applied to all five coded action app READMEs and
the getting-started guide. The debug page URL in the same guide keeps org and tenant
*names* - that one really does address them by name - and now says so.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Neither README said how to exercise the app before deploying it, and the obvious
guess is wrong: a coded action app is an iframe inside Action Center and receives
its task over postMessage, so opening http://localhost:5173 directly fails with
"Discarding event from invalid origin" - there is no host to hand it a task.

Adds a "Run it locally" step covering the Action Center debug page that plays that
host, what to put in each of its three fields, and the two things that make it fail
in a way the page does not explain: task data that names a bucket the signed-in user
cannot read, and a redirect URI that was never registered.

Notes that the debug page addresses org and tenant by name, unlike the redirect URI,
and points the deployed-app section at the local one so the two paths are not
mistaken for each other.

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

Both entries were added to the Template Gallery with "preview": null while the
samples ship a preview.gif each. The field gates both the animated thumbnail and
the "Live preview" badge, so the two cards fell back to a generated monogram poster
- the only placeholder tiles among the action apps, despite having the assets.

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

It was the only sample with a package.json missing from the gallery, and it kept its
GIF at demo/screen-recording.gif rather than the screenshots/preview.gif every other
sample uses - most likely why it was passed over when the gallery was assembled.

Moves the GIF to the conventional path, repoints the README at it, and adds the
entry next to its sibling document-validation-app, since the two are the monolithic
and composed versions of the same review flow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`@uipath/ui-widgets-validation-station` 1.1.0 is now published as `latest`; the four
samples were pinned to 1.1.0-rc.0 while it was the only build carrying this API.

Version bump only. The published typings are byte-identical to the release
candidate's and it pins the same `@uipath/du-validation-station-wc` (1.0.0-rc.1), so
no sample code changes - typecheck, lint and build are clean on all four, and
`dist/du-vs-wc/` still stages as expected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The comment claimed the endpoint "transitions the task on the Document
Understanding side", which was an assumption carried since the samples were
written - the SDK response reports only success, never task state.

Confirmed against a live task: calling SubmitExceptionReport with a taskId
completes the task server-side. So the behaviour was right; only the wording was
hedged. Also notes why the pane appears unchanged afterwards - the task is closed,
Action Center just has not reloaded.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
hide report exception + update previews and docs
@Sandeepan-Ghosh-0312
Sandeepan-Ghosh-0312 force-pushed the feat/addSampleForDUCodedActionApp branch from abf9594 to 4e10f6f Compare September 10, 2026 08:35
@claude

claude Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

✅ No issues found. Checked for bugs and CLAUDE.md compliance.

1 similar comment
@claude

claude Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

✅ No issues found. Checked for bugs and CLAUDE.md compliance.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants