Skip to content

feat(tasks): action-center sample app#502

Open
amrit-agarwal-1 wants to merge 6 commits into
mainfrom
feat/samples-action-center-app
Open

feat(tasks): action-center sample app#502
amrit-agarwal-1 wants to merge 6 commits into
mainfrom
feat/samples-action-center-app

Conversation

@amrit-agarwal-1

@amrit-agarwal-1 amrit-agarwal-1 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Action Center Sample App

A React + Vite sample web app demonstrating the UiPath TypeScript SDK's Tasks (Action Center) APIs end to end.
Built as a UiPath Coded App, styled with Apollo Wind, and consuming the published
@uipath/uipath-typescript@^1.4.1.

What it demonstrates

  • My Tasks / Manage Tasks — task listing with OAuth auth, folder/status/priority filters, assignee filter, and
    pagination (tasks.getAll)
  • Task detail — side-sheet view of a single task with status/priority/SLA badges (tasks.getById)
  • Lifecycle actions — assign, reassign, unassign, and complete via task-attached methods (single and bulk)
  • Group assignment — assign/reassign to directory groups via taskAssignmentCriteria
  • Create task — create external tasks (tasks.create)
  • Document Validation — renders the validation-station widget for DocumentValidation tasks

Link: https://procodeapps.alpha.uipath.host/action-center-app

@amrit-agarwal-1 amrit-agarwal-1 requested a review from a team June 10, 2026 11:58
Comment thread samples/process-app-v1/vite.config.ts
Comment thread samples/action-center-app/src/components/TaskDetail.tsx Outdated
@claude

claude Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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

@amrit-agarwal-1 amrit-agarwal-1 force-pushed the feat/samples-action-center-app branch 3 times, most recently from f13be8c to 16c9805 Compare June 16, 2026 07:56
Comment thread samples/action-center-app/src/components/TaskList.tsx Outdated
Comment thread samples/action-center-app/src/components/TaskList.tsx Outdated
@claude

claude Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Two new issues posted this run:

  1. Duplicated extractServerMessage (TaskList.tsx line 1122) — identical function already defined in TaskDetail.tsx line 285. Should live in taskUtils.ts.

  2. Duplicated group-check helper plus as-unknown-as cast (TaskList.tsx line 1113) — same logic appears in both files under different names (assignedToGroup vs assignedToGroupKey); both use the prohibited as unknown as cast. Consolidate in taskUtils.ts and add assignedToUserKey to TaskGetResponse in the SDK to eliminate the cast.

Existing open threads (not re-posted): duplicate base in process-app-v1/vite.config.ts and slaBadge triple-call in TaskDetail.tsx.

amrit-agarwal-1 and others added 6 commits June 17, 2026 17:58
…wind)

Replace hand-rolled Tailwind primitives with @uipath/apollo-wind components
across App, TaskList, and TaskDetail. No more custom Modal/Button/Select/
Tabs/Badge — everything renders through UiPath's design system.

Build setup
- Upgrade Tailwind v3 → v4 (drop tailwind.config.js; apollo-wind ships its
  own @tailwindcss/postcss preset)
- postcss.config.js reuses @uipath/apollo-wind/postcss
- src/index.css → single @import '@uipath/apollo-wind/styles.css' (apollo's
  tokens already include light + dark variants)

Components
- Dialog, Card, Input, Label, Select, Tabs, Table, Badge, Alert, Spinner,
  Sonner, EmptyState from @uipath/apollo-wind
- Remove src/components/Modal.tsx (replaced by Dialog)
- Badge variants (success/info/warning/error) replace TONE classnames
- next-themes provider + Sun/Moon ThemeToggle (apollo-wind has no provider)

UX
- ListChecks / ShieldCheck / Plus / RefreshCw / Inbox / User / Users icons
- Tab count badges on the active tab
- Animated refresh spinner during refetch
- Skeleton table while loading (industry-standard data-grid pattern)
- Folder filter is a proper filter chip: leading Folder icon, clear (X)
  button, Escape to clear, no number-input spinners (folder IDs are
  identifiers, not quantities)
- Fix stale data on tab switch (clear tasks on dep change in useTasks)
- uipath.json.example: baseUrl https://api.uipath.com
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Folder + Assignee filters in toolbar (header chip removed)
- Folder picker via /odata/Folders raw fetch (new useFolders hook)
- Create Task: folder dropdown instead of numeric ID
- My Tasks: row click → Complete dialog + info icon → detail sheet
- Manage Tasks: multi-select + bulk Assign / Reassign / Unassign,
  gated by selection state + completion
- Assignee filter derived from loaded tasks (no folder needed)
- 'Group' label for tasks assigned to a directory group
- TaskDetail Sheet mirrors Action Center's Task Summary
- Surface server messages on Create/Complete/Assign/Unassign errors;
  bulk batch errors use compact 'first + N more' format
- Various UI polish (info icon placement, fixed-width pickers,
  truncation, header column dividers)
…ntValidation tasks

Selecting a Document Validation task now opens the
@uipath/ui-widgets-validation-station widget instead of the generic complete
dialog; all other task types are unchanged.

- DocumentValidationDialog hosts the widget, loads the full payload via
  getById({ taskType: DocumentValidation }), and Save/Submit through the
  widget's validated-save path (Submit completes the task).
- useTask gains an optional taskType param (backward compatible).
- TaskList branches the My-Tasks row click on type; TaskDetail offers a
  "Validate document" action for DV tasks.
- vite.config copies the widget's du-assets into the build; package.json adds
  the widget + du-validation-station-wc deps; scope adds OR.Buckets.

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

- Dedup shared task helpers (assignedToGroup, extractServerMessage) into taskUtils
- Detect group assignment via taskAssignmentCriteria (no cast); drop file:../.. for ^1.4.1
- Compute slaBadge once in TaskDetail; remove duplicate vite base key in process-app-v1
- Realign root oxlint lockfile to 1.43.0 to fix lint failures

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@amrit-agarwal-1 amrit-agarwal-1 force-pushed the feat/samples-action-center-app branch from 16c9805 to fcb33f5 Compare June 18, 2026 06:23
@sonarqubecloud

Copy link
Copy Markdown

@claude

claude Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

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

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.

can we split it into smaller component files like other samples - maybe individual files for FolderPicker, AssigneeFilter, BulkActions, CompleteDialog, etc

src/
main.tsx App.tsx index.css
taskUtils.ts — badges, filter builder, complete-options builder, formatting
hooks/useAuth.tsx — OAuth/PKCE via the SDK (Coded Apps template)

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.

isnt the file src/context/AuthContext.tsx?

<AlertDescription>{error}</AlertDescription>
</Alert>
)}
<Button onClick={login} className="w-full">

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.

instead of inline - we can extract it into a separate component

"preview": "vite preview"
},
"dependencies": {
"@uipath/apollo-core": "^5.10.0",

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.

where is this used?

"version": "1.0.0",
"description": "Minimal React + TypeScript Coded App demonstrating the UiPath TypeScript SDK Tasks (Action Center) service — list, assign, reassign, unassign, complete, and create tasks.",
"type": "module",
"scripts": {

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.

can we add lint script like other sample apps?

const result = await svc.getAll({
pageSize,
jumpToPage: page,
// Raw server name — `createdTime` (SDK alias) would 400.

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.

but we are fixing this and the PR is already up. Would be fixed in 1.5.1

*/
export function buildTaskFilter(filters: TaskFilters): string | undefined {
const clauses: string[] = []
if (filters.status && filters.status !== 'all') clauses.push(`Status eq '${filters.status}'`)

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.

Suggested change
if (filters.status && filters.status !== 'all') clauses.push(`Status eq '${filters.status}'`)
if (filters.status && filters.status !== 'all') clauses.push(`status eq '${filters.status}'`)

@@ -0,0 +1,8 @@
{
"clientId": "<your-oauth-external-app-client-id>",
"scope": "OR.Tasks OR.Folders OR.Buckets",

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.

Suggested change
"scope": "OR.Tasks OR.Folders OR.Buckets",
"scope": "OR.Tasks OR.Folders.Read OR.Buckets",

for keeping consistent with README

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