Skip to content

feat(samples): add document-validation-subcomponents sample app#606

Merged
nickgatej merged 7 commits into
mainfrom
feat/add-coded-app-with-vs-subcomponents
Jul 20, 2026
Merged

feat(samples): add document-validation-subcomponents sample app#606
nickgatej merged 7 commits into
mainfrom
feat/add-coded-app-with-vs-subcomponents

Conversation

@nickgatej

@nickgatej nickgatej commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a React + TypeScript + Vite sample app (samples/document-validation-subcomponents-app) that builds a custom human-in-the-loop document review workspace by composing the individual subcomponents exported by @uipath/ui-widgets-validation-stationDocumentViewer, CompactDocTypeField, CompactFieldsForm, CompactTableEditor, and CompactBusinessRules — rather than the all-in-one ValidationStation component.
  • Demonstrates OAuth 2.0 authorization code + PKCE login against UiPath Cloud via the @uipath/uipath-typescript SDK.
  • Lists Document Validation tasks (Tasks.getAll with an OData filter) and hydrates one with its full validation payload (Tasks.getById with TaskType.DocumentValidation).
  • Fetches document artifacts once with the useBucketArtifacts hook and shares them across subcomponents via a single instanceId.
  • Supports complete (Task.complete), save-as-draft, and exception-report (OrchestratorDuModule.submitExceptionReport) flows.
  • Complements the sibling document-validation-app sample, which uses the monolithic ValidationStation component.

Test plan

  • npm install in samples/document-validation-subcomponents-app
  • npm run build succeeds
  • npm run lint passes
  • npm run dev — OAuth login, task list loads, subcomponents render and stay linked via shared instanceId
  • Complete, save-as-draft, and exception-report flows work against a live tenant

🤖 Generated with Claude Code

Add a React + TypeScript + Vite sample that builds a custom document
review workspace by composing the individual subcomponents exported by
@uipath/ui-widgets-validation-station (DocumentViewer, CompactDocTypeField,
CompactFieldsForm, CompactTableEditor, CompactBusinessRules) rather than the
all-in-one ValidationStation component.

- OAuth 2.0 authorization code + PKCE login via @uipath/uipath-typescript
- Lists Document Validation tasks and hydrates one with its full payload
- Shares bucket artifacts across subcomponents via a single instanceId
- Supports complete, save-as-draft, and exception-report flows

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nickgatej
nickgatej requested a review from a team July 15, 2026 14:08
@nickgatej nickgatej changed the title feat(samples): add document-validation-subcomponents sample app 🚧feat(samples): add document-validation-subcomponents sample app Jul 15, 2026
Comment thread samples/document-validation-subcomponents-app/package.json Outdated
Comment thread samples/document-validation-subcomponents-app/src/components/ReviewInbox.tsx Outdated
@claude

claude Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review findings

New issues posted this run:

  1. package.json line 13@uipath/ui-widgets-validation-station is referenced as a local .tgz file that is not committed to the repo; npm install will fail. The sibling document-validation-app uses "1.0.0" (registry version specifier). Same fix needed here.

  2. ReviewInbox.tsx line 175new OrchestratorDuModule(sdk) is constructed inline inside the handleReportException callback, allocating a new service object on every call. Should be memoized at component level the same way Tasks is (line 36).

  3. ReviewInbox.tsx lines 18 and 62 — OData filter and orderby values use PascalCase field names. Per CLAUDE.md, these should use the camelCase names the SDK surfaces. OData is case-insensitive so this will not fail at runtime, but it is inconsistent with every other example in the codebase.

Update both document-validation sample apps to use the published
1.0.1 npm release, replacing the local tgz reference in the
subcomponents app.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Re-opened threads from prior review

Three previously-resolved threads were re-opened because the requested changes were not made:

  1. ReviewInbox.tsx — OrchestratorDuModule inline construction: new OrchestratorDuModule(sdk) is still instantiated inside the handleReportException callback. Should be memoized at the component level like Tasks.

  2. ReviewInbox.tsx — PascalCase filter fields: buildFilter() still uses Type, IsDeleted, Status (PascalCase). Per CLAUDE.md, filter values should use the camelCase names the SDK surfaces.

  3. ReviewInbox.tsx — PascalCase orderby: orderby value still uses PascalCase (Priority, CreationTime). Should be priority, creationTime.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nickgatej nickgatej changed the title 🚧feat(samples): add document-validation-subcomponents sample app feat(samples): add document-validation-subcomponents sample app Jul 17, 2026
…README

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Re-opened threads from prior review

Two previously-resolved threads were re-opened because the requested changes were not made:

  1. ReviewInbox.tsx — PascalCase filter fields: buildFilter() still uses Type, IsDeleted, Status (PascalCase). Per CLAUDE.md, OData filter values should use the camelCase names the SDK surfaces: type, isDeleted, status.

  2. ReviewInbox.tsx — PascalCase orderby: orderby value still uses Priority desc,CreationTime asc. Should be priority desc,creationTime asc.

The other two issues from the prior review (local .tgz package reference and inline OrchestratorDuModule construction) are now fixed.

Aligns document-validation-subcomponents-app with the check-samples
example-config rule and the convention used by every other sample app.

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

@Raina451 Raina451 left a comment

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.

trying to understand, whats the difference between document-validation-subcomponents-app and existing one: https://github.com/UiPath/uipath-typescript/tree/main/samples/document-validation-app ?

Do we need 2 different samples?
CC: @maninder-uipath

@claude

claude Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Re-opened threads from prior review

Two previously-resolved threads were re-opened because the requested changes were not made:

  1. ReviewInbox.tsx line 18 — PascalCase filter fields: buildFilter() still uses Type, IsDeleted, Status (PascalCase). Per CLAUDE.md, OData filter values should use the camelCase names the SDK surfaces: type, isDeleted, status.

  2. ReviewInbox.tsx line 63 — PascalCase orderby: orderby value still uses Priority desc,CreationTime asc. Should be priority desc,creationTime asc.

@nickgatej

Copy link
Copy Markdown
Contributor Author

@Raina451 Yes, both are intentional. The newly added one uses the individual subcomponents so users can build a custom layout; the other uses the full component for the standard layout.

@nickgatej
nickgatej requested a review from Raina451 July 20, 2026 09:05

@Raina451 Raina451 left a comment

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.

minor comments. rest lgtm

Comment thread samples/document-validation-subcomponents-app/README.md Outdated
Comment thread samples/document-validation-subcomponents-app/uipath.json.example Outdated
@Raina451

Copy link
Copy Markdown
Collaborator

… commit note

Scope the subcomponents sample to OR.Tasks OR.Buckets OR.Folders.Read:
folder resolution is read-only, so OR.Folders.Read suffices. Also removes
the "Never commit uipath.json" note (the file is already gitignored) per
review feedback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Re-opened threads from prior review

Two previously-resolved threads were re-opened because the requested changes were not made:

  1. ReviewInbox.tsx line 18 — PascalCase filter fields: buildFilter() still uses Type, IsDeleted, Status (PascalCase). Per CLAUDE.md, OData filter values should use the camelCase names the SDK surfaces: type, isDeleted, status.

  2. ReviewInbox.tsx line 63 — PascalCase orderby: orderby value still uses Priority desc,CreationTime asc. Should be priority desc,creationTime asc.

@sonarqubecloud

Copy link
Copy Markdown

@nickgatej
nickgatej merged commit 5f69898 into main Jul 20, 2026
15 checks passed
@nickgatej
nickgatej deleted the feat/add-coded-app-with-vs-subcomponents branch July 20, 2026 13:40
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.

3 participants