Skip to content

docs(validation-station): trim the README to what a basic setup needs - #218

Open
ioanajoj wants to merge 4 commits into
developfrom
docs/du-readmes-trim
Open

ioanajoj wants to merge 4 commits into
developfrom
docs/du-readmes-trim

Conversation

@ioanajoj

@ioanajoj ioanajoj commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Why

The Validation Station README had grown into a full reference (908 lines). It is mostly read by FDEs with a customer case and DU data to validate, usually in a Coded Action App. It should get them to a working setup without wading through every prop and release note.

What

The README now follows this order: pick your path → install → host the web component → quick start → saving → core props → troubleshooting → going further. It opens with a diagram, How documents get into the widgets: a Document Understanding workflow's ContentValidationData or a Flow IDP extract node's ProcessedDocument, sent as one payload or as individual inputs, to ValidationStation or its subcomponents.

File Lines Change
validation-station/README.md 908 → 263 Coded Action App quick start, IXP variant, standalone-app pointer, troubleshooting table
validation-station/docs/validation-station-subcomponents.md 362 → 189 "Five things to get right", a Coded Action App worked example, hide-don't-unmount note

The exported-types list and the prediction docs (predictedExtractionResult, EnablePredictionDiff, and their UPGRADING entries) are dropped. The rest moves to linked pages:

  • docs/data-sources.md: owning the round trip, IXP (ProcessedDocument)
  • docs/events-and-commands.md: all props, save/draft/exception flows, document state, overlay, taxonomy editor, languages, examples
  • docs/hosting.md: hosting in depth, Vite, fonts, notes
  • UPGRADING.md: WC release notes and migrating from 1.0.x
  • docs/assets/how-documents-get-in.svg: the diagram

Out of scope: the Classification Station and Document Viewer READMEs are unchanged. Neither package is published yet, and the Classification Station docs will need rework once its ContentValidationData input is removed.

Notes for review

  • Links to the moved pages and the diagram are absolute GitHub URLs on develop, so they resolve only after merge. The docs site renders only the README; the docs/ pages are reachable on GitHub.
  • To see the diagram before merge, open it from this branch: how-documents-get-in.svg. GitHub's file view shows "Unable to render code block" for it; the raw file and the README's image embed both render.
  • Checked: every repo link and heading anchor resolves; all linked uipath-typescript samples exist on main; every export and prop in the snippets exists in the package source. The snippets were not compiled.
  • Not verified against a sample: the IXP action-app completeTask shape.

🤖 Generated with Claude Code

The Validation Station, Classification Station and Document Viewer
READMEs now cover the path an FDE takes to a working Coded Action App:
pick a path (with a shared diagram of how documents get into the
widgets), install, host the web component, quick start, saving, core
props and troubleshooting. The depth moves to linked pages:

- validation-station/docs: data-sources.md, events-and-commands.md,
  hosting.md, and the shared diagram under assets/
- validation-station/UPGRADING.md: release notes and the 1.0.x migration
- classification-station/docs/reference.md: data sources, props, outputs

The subcomponents guide is rewritten around five rules and a Coded
Action App worked example. Development/License are wrapped in
docs:ignore in every README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Package Line Coverage
datatable 88.29%
multi-file-upload 87.27%
conversational-agent-chat 91.63%
validation-station 99.33%
classification-station 91.66%
document-viewer 89.38%
external-auth 97.26%
pdf-viewer 96.26%
decisions-and-reasons 98.50%

ioanajoj and others added 2 commits November 25, 2026 10:27
Classification Station and Document Viewer are unpublished, and the
Classification Station docs need rework once the CVD input is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…her widgets

- Rewrite the intro: what the component does and that the host app
  completes the task.
- "Document Understanding workflow" / "Flow IDP extract node" for where the
  payload comes from; "individual inputs" for the artifacts path.
- Name the subcomponents in the inputs table and link their page.
- Drop the standalone Document Viewer and Classification Station from the
  README and the diagram; they are out of scope here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ioanajoj ioanajoj changed the title docs(du): trim the DU widget READMEs to what a basic setup needs docs(validation-station): trim the README to what a basic setup needs Nov 25, 2026
…ity, tighten data sources

- Remove the 'Comparing against the prediction' section and every
  prediction mention in the README, data-sources and UPGRADING.
- Name the Create Document Validation Artifacts activity as the source of
  ContentValidationData (README and diagram).
- Add editing the taxonomy or extraction before handing it over as a reason
  for pre-fetched mode; drop the mixed-modes sentence.
- Shorten the 'Handle both callbacks' warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@sergiubologa sergiubologa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

left a few comments, but since this documentation will be used mostly by coding agents, I'll ask my agent to do a review from this perspective as well.

import type { DuFramework } from "@uipath/uipath-typescript/document-understanding";
import { useEffect, useState } from "react";
- **A Document Understanding workflow** hands over the `ContentValidationData` that its _Create Document Validation Artifacts_ activity outputs (IntelligentOCR, DocumentUnderstanding.Activities). Pass it as `data`.
- **A Flow IDP extract node** hands over a `ProcessedDocument` (IXP). Pass it as `processedDocument`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- **A Flow IDP extract node** hands over a `ProcessedDocument` (IXP). Pass it as `processedDocument`.
- **A Flow IXP extract node** hands over a `ProcessedDocument` (IXP). Pass it as `processedDocument`.

Comment on lines +9 to +22
Your workflow decides the contract:

> **Note: Theming**
> Add either a `light` or `dark` class to your HTML `<body>` element to enable proper theming.

```tsx
import {
configureValidationStationWc,
ValidationStation,
} from "@uipath/ui-widgets-validation-station";
import { UiPath } from "@uipath/uipath-typescript/core";
import type { DuFramework } from "@uipath/uipath-typescript/document-understanding";
import { useEffect, useState } from "react";
- **A Document Understanding workflow** hands over the `ContentValidationData` that its _Create Document Validation Artifacts_ activity outputs (IntelligentOCR, DocumentUnderstanding.Activities). Pass it as `data`.
- **A Flow IDP extract node** hands over a `ProcessedDocument` (IXP). Pass it as `processedDocument`.

// Once, at app startup — loads the web component from `du-vs-wc`, next to
// your app's own root by default. See "Hosting the web component" below.
configureValidationStationWc();
Send it as **① one payload**, with `sdk` + `data` or `sdk` + `processedDocument`, and the widget fetches the rest and saves the review. Or send **② the individual inputs** you already hold as `artifacts`, and save the review yourself. The quick start below takes ①.

function App({ task }: { task: { data: DuFramework.ContentValidationData } }) {
const [sdk, setSdk] = useState<UiPath | null>(null);
| Widget | DU ① | DU ② | IXP ① | IXP ② |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--: | :--: | :---: | :---: |
| `ValidationStation`, the whole screen | ✓ | ✓ | ✓ | ✓ |
| [Subcomponents](https://github.com/UiPath/uipath-ui-widgets/blob/develop/packages/validation-station/docs/validation-station-subcomponents.md) `CompactFieldsForm`, `CompactTableEditor`, `DocumentViewer` | ✓ | ✓ | ✓ | ✓ |
| [Subcomponents](https://github.com/UiPath/uipath-ui-widgets/blob/develop/packages/validation-station/docs/validation-station-subcomponents.md) `CompactBusinessRules`, `CompactDocTypeField` | ✓ | ✓ | — | — |

useEffect(() => {
const init = async () => {
const uipath = new UiPath({
baseUrl: "https://api.uipath.com",
orgName: "your-org",
tenantName: "your-tenant",
clientId: "your-client-id",
// `OR.Buckets` is the widget's own need; `OR.Tasks` is for the host
// code that fetches the task and completes it after submit.
scope: "OR.Buckets OR.Tasks",
redirectUri: "http://localhost:3000/callback",
});
await uipath.initialize();
setSdk(uipath);
};
init();
}, []);
Start with `ValidationStation`. Reach for the subcomponents only when the standard screen does not fit your layout.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is pretty hard to understand, even for me who knows these configs and contracts. Can we simplify it and make it correlated with the svg grafic above? For example, I was looking for ① and ② in the svg as well. Anyway, I think we can simplify this so it's easier to understand.

image

}
```bash
npm install @uipath/ui-widgets-validation-station @uipath/uipath-typescript @uipath/coded-action-app react@^19.2.0 react-dom@^19.2.0
npm install --save-dev @uipath/du-validation-station-wc@1.0.0-rc.6

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why is this needed to be installed? Isn't a dependency of @uipath/ui-widgets-validation-station and it's installed automatically?

return <ValidationStation sdk={sdk} data={task.data} />;
}
```bash
npm install @uipath/ui-widgets-validation-station @uipath/uipath-typescript @uipath/coded-action-app react@^19.2.0 react-dom@^19.2.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

whould be nice to know here which deps are mandatory and which are optional. My understanding is that @uipath/coded-action-app is optional, if you simply want a self hosted app.

6. **Save-as-draft needs a flag.** Set `options={{ emitDtoStateChanges: true }}` on `CompactFieldsForm` or the save-as-draft flow (and `onSaveAsDraft`) never fires.
| Component | What it is | Edits | Saves | Extra props worth knowing |
| ---------------------- | ------------------------------------------ | ----------------- | ------- | -------------------------------------------------------------------------- |
| `DocumentViewer` ⚠️ | The page and text viewer, with highlights | — | — | `onTokensSelect`, `onCurrentPageChange`, `goToPage` |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why the warning here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feel like the main readme file is wahy to verbose and complex. I like the subpages that are focused on one thing (data sources, events, upgrading, hosting, etc). I think the main readme should be pretty slim and extract from there a few other subpages: quick start guide, props -- I/O, the 2 paths (CVD & ProcessedDocument), troubleshooting.

`@uipath/uipath-typescript` `>= 1.5.1` is required. `@uipath/coded-action-app` is only for a Coded Action App. The package is written in TypeScript, and every type it uses is exported from its root.

`theme` defaults to `"light"` and `language` defaults to `ValidationStationLanguage.English`, so the minimal mount just needs `sdk` and `data`.
## Host the web component

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

there's a dedicated subpage for this, why having this section here as well?

@sergiubologa

Copy link
Copy Markdown
Member

Review from the point of view of a coding agent that has to build a Coded Action App from these docs. I checked the claims against develop, the published packages on npm (widget 1.2.0 / 1.3.0-rc.1, du-validation-station-wc@1.0.0-rc.6, du-document-viewer-wc@1.0.0-beta.1, coded-action-app@1.0.0) and the action-app-with-document-validation sample. The quick-start API calls are right: getTask, completeTask, showMessage, MessageSeverity, task.folderId, task.isReadOnly. The gaps below are what's missing.

Things that break the build

  1. npm install resolves to the wrong version. latest on npm is 1.2.0, which has no processedDocument and no useProcessedDocumentArtifacts. Everything documented needs 1.3.0-rc.1 (beta). Pin it in the install line, and state the widget version the docs cover in the README. Today only the subpages say "Applies to…", and they name the web component version, not the widget's.
  2. Sizing. ValidationStation fills its parent and takes no style or className, so an auto-height parent collapses the viewer to zero height. The sample's App.css explains this; the docs never do. Add one line plus a CSS snippet to the quick start, and a troubleshooting row.
  3. The IXP quick start doesn't match the API. completeTask(result?.processedDocument) takes one argument; the real call is codedActionApp.completeTask(actionTaken, data). It also doesn't say where processedDocument comes from: the action-schema input name and type, and whether the completion data is the bare document or keyed by an output name. Verify it against a real action, or mark it as unverified.
  4. No action-schema.json. The DU quick start relies on an input of the dedicated ContentValidationData field type. An agent writing the schema by hand will write object. Add the ~10-line schema, and the IXP equivalent.
  5. IValidationStationOptions isn't listed anywhere. It's the main customization surface. Add a one-line-per-option table: hideSubmitButton, hideDiscardButton, hideReportAsExceptionButton, hideDocumentTypeField, hideFields, hideBusinessRules, fieldsSectionPosition, fieldFilterOptions, enableUserPreferences, userPreferencesKeySuffix, defaultFieldsAreaPercentage, defaultFieldsAreaWidth, emitDtoStateChanges, documentViewerOptions, emptyTaxonomyMessage, intendedUse. At minimum, point to node_modules/@uipath/du-validation-station-wc/types.d.ts.

Token cost and how agents get to the docs

  • Table padding is ~15 KB (~4k tokens). Prettier pads tables to column width. Without the padding, the README goes from 19.8 to 15.5 KB (-22%) and events-and-commands.md from 21.7 to 13.4 KB (-38%), with identical rendering. Exclude these docs from Prettier's table alignment, or write unaligned tables.
  • The subpages don't ship in the npm package. With files: ["dist"], only the README lands in node_modules. Every other page needs a fetch from develop, which may not match the installed version. Adding docs/ and UPGRADING.md to files lets an agent grep the docs locally, versioned with the code. For agents, this is probably the most valuable change.
  • Staging needs a script from another repo. stage-du-wc.mjs lives in uipath-typescript. Inline a minimal version (copy the folder, assert main.js exists), or ship it as a package bin.
  • The README has 11 absolute github.com/.../blob/develop/... links of ~90 chars each. That's acceptable because of the docs site, but it's another reason to keep the README slim.

The DocumentViewer subcomponent and its deprecation

We agreed not to deprecate it: the standalone viewer stays the generic component, and VS (and later CS) keep a viewer subcomponent that links through instanceId. I checked whether the standalone viewer could cover that case. It can't. @uipath/du-document-viewer-wc@1.0.0-beta.1 has no instance-id input at all. It holds no data and has no store, and the host wires it by hand through highlightReference / passiveReferences / referenceSelect. Linking would need a store bridge, not a missing prop.

The deprecation is also not only in these docs. It's in:

  • du-validation-station-wc types.d.ts: @deprecated Use <ui-du-document-viewer-wc-element>…
  • the du-document-viewer-wc README: "It supersedes the deprecated <ui-du-document-viewer-standalone-wc-element>…"
  • src/subcomponents/DocumentViewer.tsx: a JSDoc @deprecated, so editors strike it through
  • packages/document-viewer/README.md L98: "keep the Validation Station's own (deprecated) DocumentViewer"

To match the decision: drop the ⚠️ and the warning box here, describe DocumentViewer as "the viewer that links to the other panels via instanceId; for a viewer on its own use @uipath/ui-widgets-document-viewer", and remove the @deprecated tag in DocumentViewer.tsx and the wording in the document-viewer README. The two WC-level notes need a change in the WC repo, or the next WC release will bring the deprecation back in the types. CS has no subcomponents or instanceId on develop yet, so nothing to change there for now.

Smaller issues

  • save appears twice in the "All props" table. Merge it into one row covering validate: true | false.
  • "The sample maps Action Center's theme onto both" doesn't show how. Three lines would: Theme.AutoTheme needs resolving, and the rest map 1:1 onto DuTheme.
  • The standalone-app path never shows how to complete a DU validation task. The only example is task.complete({ action: "Completed", type: "DocumentValidation" }) in events-and-commands.md, with no explanation.
  • Deploying (uip codedapp pack / publish --type Action / deploy) is only in the sample README. Add a one-line pointer.
  • Subcomponents rule 4 mixes two separate failures: "only the form gets sdk + data" (duplicate saves) and "without emitDtoStateChanges, drafts never fire". Split them.
  • Install (follow-up to my inline comments): @uipath/du-validation-station-wc is a regular dependency pinned to 1.0.0-rc.6. A separate install isn't just redundant. If the versions differ, npm nests the widget's copy while stage-du-wc copies the top-level one, so the version that runs doesn't match the types. The required peers are @uipath/uipath-typescript ^1.5.1 and react/react-dom ^19.2.0; @uipath/coded-action-app is only for Action Center apps.
  • Hosting (follow-up to my inline comment): keep about 5 lines in the README (script hooks, configure + .catch, gitignore). Without them the widget stays on its loading state, so they belong in the quick start. Move the rest to hosting.md.

This branch has not been deployed

No deployments
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.

2 participants