Commit Graph

801 Commits

Author SHA1 Message Date
Justin Xu 3ab84c4ba4 Merge pull request #370 from run-llama/changeset-release/main
ci: version packages
@llamaindex/ui@4.7.0 @llamaindex/workflow-debugger@0.2.42
2026-08-19 13:10:59 -04:00
github-actions[bot] da5d161bad ci: version packages 2026-08-19 16:55:26 +00:00
Justin Xu 1c284c23c5 Ignore the project-local pnpm store. (#371)
Cursor/sandbox installs can materialize .pnpm-store in the repo; keep it out of git like platform does.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 09:54:07 -07:00
Yong 5ab8324157 Merge pull request #372 from run-llama/justin/fix-extract-table-pagination-index
Fix extract table citation paths on paginated pages
2026-08-18 18:57:40 -07:00
Justin Xu 03c1fea0d0 Add changeset for extract table pagination citation fix.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 20:57:47 -04:00
Justin Xu 16605d9263 Preserve original row indexes when paginating extract tables.
Paginated table and list rows used the page-local map index for citation paths, so hover and click on later pages looked up the first page of field_metadata.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 20:49:41 -04:00
Yong 46239b1047 Merge pull request #369 from run-llama/claude/pdfjs-worker-csp-security-u36p4q
fix(ui): load pdf.js worker from app origin instead of unpkg
2026-07-29 10:11:28 -07:00
Claude b14558988e fix(ui): give each PDF source its own <Document> instance
My previous commit guessed at this race and fixed the wrong window; CI
came back with the same six errors. Reproduced it locally instead: the
trigger is `--coverage`, whose v8 instrumentation slows execution enough
to widen the window. `pnpm vitest run --coverage --project storybook
stories/file-preview/pdf-preview.stories.tsx`, with the stories pointed
at the local fixture so documents actually load, reproduces all six.

Instrumenting react-pdf showed the real sequence, all of it inside the
`Upload And Preview` story, which swaps the url mid-play:

  loadDocument RUN x2   <- document B starts while A is in flight
  destroy EXECUTED      <- A torn down
  PageMount x6          <- all with a null messageHandler

react-pdf's loader schedules `loadingTask.destroy()` on cleanup but never
cancels that task's pending RESOLVE dispatch, so a superseded document
still lands in context and is then destroyed. Any <Page> mounting against
it throws. No gating on our own state can prevent that — the stale pdf
arrives from inside react-pdf after we have already moved on.

Keying <Document> by url gives each source a fresh instance, so the
stale resolve dispatches into an unmounted reducer and is a no-op.
Verified against the reproduction: 216 page mounts, all with a live
transport, zero errors (was 152 live / 6 dead).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJXCdQUoysxwoDBaDoDp2b
2026-07-28 18:08:42 +00:00
Claude c7ffb82463 fix(ui): don't render PDF pages after their document is torn down
Self-hosting the worker made pdf.js use a real Worker in CI where the
unpkg script had been falling back to the in-process fake worker, which
turned a latent race into six unhandled errors on every run:

  TypeError: Cannot read properties of null (reading 'sendWithPromise')
    at WorkerTransport.getPage

On a `url` change the effect cleanup cleared `file`, so react-pdf
destroyed the document's worker transport — but `numPages` was left set,
and it alone gated the page list. Any <Page> mounting in that commit
called getPage() on the dead transport. The virtualized list mounts and
unmounts pages continuously, so the window was easy to hit once page
loads became genuinely async; `UploadAndPreview` swaps the url mid-story
and hit it six times under CI's timing.

Clear `numPages` alongside `file`, and include `file` in the render
guard so pages can never outlive their document.

The regression test mocks react-pdf with the same contract the real
library has — a Page mounting without a Document file throws — so the
invariant is pinned deterministically rather than depending on pdf.js
timing. It fails without this fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJXCdQUoysxwoDBaDoDp2b
2026-07-28 17:40:44 +00:00
Claude bf0935e2f4 fix(ui): load pdf.js worker from app origin instead of unpkg
The PDF viewer set `pdfjs.GlobalWorkerOptions.workerSrc` to a script on
unpkg.com, and pointed `cMapUrl`/`wasmUrl` at the same CDN. The worker
executes with the host page's privileges, so a hijacked or compromised
CDN response had full access to the application origin — on every page
that previews a document. It also forced consuming apps to allow
https://unpkg.com in their CSP `script-src` and `worker-src`.

Resolve the worker from the `pdfjs-dist` package installed alongside the
library so bundlers emit it as a same-origin asset, and add
`configurePdfjs()` for apps that need to point at self-hosted copies
explicitly. `pdfjs-dist` is pinned to the exact build react-pdf uses,
since pdf.js rejects a worker whose version differs from the API's; a
test guards that pin against drift.

`cMapUrl`/`wasmUrl` are no longer set by default — they are directories
bundlers cannot resolve automatically, so they become opt-in via
`configurePdfjs()`. Documented in the package README.

The es2017 tsup target lowered `import.meta` to `{}`, which would have
silently reduced the worker to pdf.js's main-thread fallback, so
`import-meta` is now preserved for the ESM output.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJXCdQUoysxwoDBaDoDp2b
2026-07-28 17:09:14 +00:00
Yong b19975ebb4 Merge pull request #368 from run-llama/changeset-release/main
ci: version packages
@llamaindex/ui@4.6.0 @llamaindex/workflow-debugger@0.2.41
2026-07-13 14:29:54 -07:00
github-actions[bot] e9d7176a4f ci: version packages 2026-07-13 21:23:59 +00:00
Yong 5a63a2493e Merge pull request #367 from run-llama/feat/dark-mode-llama-ui
Feat/dark mode
2026-07-13 14:22:50 -07:00
Yong 32650a457f cleanup on dropzone border 2026-07-13 14:13:41 -07:00
Yong 6f361527b1 add dark mode + redo storybook examples 2026-07-13 14:03:40 -07:00
Yong 628336be96 Merge pull request #366 from run-llama/changeset-release/main
ci: version packages
@llamaindex/ui@4.5.1 @llamaindex/workflow-debugger@0.2.40
2026-06-04 17:16:36 -07:00
github-actions[bot] 384f21f641 ci: version packages 2026-06-05 00:16:15 +00:00
Yong 891cc33dd8 Merge pull request #364 from run-llama/pdf-preview-render-li-7679
Improve pdf preview performance
2026-06-04 17:15:06 -07:00
Yong 48128b309e Merge pull request #365 from run-llama/chore/fix-code-quality-364
chore: fix Code Quality for #364
2026-06-04 17:09:59 -07:00
yongpark 644afa3c9c chore: auto-fix Code Quality issues 2026-06-05 00:04:03 +00:00
Yong d1b91db93c add changeset 2026-06-04 16:56:20 -07:00
Yong 13d0ef33af increase performance for pdf preview 2026-06-04 16:54:56 -07:00
github-actions[bot] 98e7721604 ci: version packages (#362) @llamaindex/ui@4.5.0 @llamaindex/workflow-debugger@0.2.39 2026-04-21 19:25:24 -04:00
Adrian Lyjak 6a4e22613d feat(ui): resume subscribeToEvents from last-seen sequence (#359) 2026-04-21 18:23:09 -04:00
Yong aafd9226a0 Merge pull request #361 from run-llama/changeset-release/main
ci: version packages
@llamaindex/ui@4.4.0 @llamaindex/workflow-debugger@0.2.38
2026-04-21 14:06:18 -07:00
github-actions[bot] dc022fd654 ci: version packages 2026-04-21 21:01:01 +00:00
Yong 1ff38997c6 Merge pull request #360 from run-llama/add-controllable-scale-doc-preview
Add controllable scale doc preview
2026-04-21 13:59:52 -07:00
Yong 1b66fcf93b add changeset 2026-04-21 13:42:56 -07:00
Yong c49dc5243a add controllable scale for doc previews 2026-04-21 13:41:25 -07:00
Yong f1276cc8a5 Merge pull request #355 from run-llama/changeset-release/main
ci: version packages
@llamaindex/ui@4.3.0 @llamaindex/workflow-debugger@0.2.37 @llamaindex/workflows-client@1.8.5
2026-04-16 15:27:30 -07:00
github-actions[bot] df31bb688b ci: version packages 2026-04-16 22:20:02 +00:00
Yong 838e1d7cf5 Merge pull request #357 from run-llama/add-docx-pptx-html-support-doc-preview
Add docx pptx html support doc preview
2026-04-16 15:18:52 -07:00
Yong a7f850573f Merge pull request #358 from run-llama/chore/fix-code-quality-357
chore: fix Code Quality for #357
2026-04-16 15:09:34 -07:00
yongpark 02b430d9fc chore: auto-fix Code Quality issues 2026-04-16 22:04:58 +00:00
Yong f485dcaeb8 changeset 2026-04-16 15:03:32 -07:00
Yong 2f598e1af1 adding support ofr html, docx, pptx for file preview 2026-04-16 14:59:55 -07:00
Terry Zhao 1804e3dbe4 Merge pull request #121 from run-llama/cursor/LI-3766-fix-boolean-field-editing-in-nested-structures-f69e
Fix boolean field editing in nested structures
2026-04-06 14:58:00 -07:00
Terry Zhao 190273bb75 Merge pull request #337 from run-llama/update-workflows-sdk
chore: update workflows SDK
2026-04-06 14:56:42 -07:00
Terry Zhao e033b4368d Merge pull request #352 from run-llama/changeset-release/main
ci: version packages
@llamaindex/ui@4.2.0 @llamaindex/workflow-debugger@0.2.36
2026-04-06 14:56:17 -07:00
llama-org-ci-bot[bot] 9df4b5c6b9 chore: update workflows SDK to v0.3.2 2026-04-02 18:09:36 +00:00
github-actions[bot] ef785ad4b6 ci: version packages 2026-03-26 00:18:12 +00:00
Terry Zhao 96006feb0d Merge pull request #353 from run-llama/fix/upgrade-react-resizable-panels-v4
fix(ui): upgrade react-resizable-panels v3→v4, encapsulate dependency types
2026-03-25 17:17:00 -07:00
Terry Zhao c8437e39b6 fix(ui): address review comments on resizable panels upgrade
- Fix P1: Separator aria-orientation is perpendicular to group orientation
  in v4 (horizontal group → vertical separator). Flip CSS selectors from
  aria-[orientation=vertical] to aria-[orientation=horizontal] for the
  vertical-group case.

- Fix P1: Implement autoSaveId via useDefaultLayout hook. v4 removed
  autoSaveId as a Group prop; it now requires useDefaultLayout({ id,
  storage }) which returns defaultLayout + onLayoutChanged. Added a
  separate component to handle the hook call.

- Fix P2: Add missing props (disabled) to ResizablePanelGroupProps and
  ResizablePanelProps that were previously available via passthrough.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:09:11 -07:00
Terry Zhao ba95cde0d6 Merge pull request #354 from run-llama/chore/fix-code-quality-353
chore: fix Code Quality for #353
2026-03-25 16:55:08 -07:00
zhaotai 1a1ee10b73 chore: auto-fix Code Quality issues 2026-03-25 23:54:53 +00:00
Terry Zhao 09b3daee48 fix(ui): upgrade react-resizable-panels v3→v4, encapsulate dependency types
Upgrade react-resizable-panels from ^3.0.3 to ^4.1.0 (resolves to 4.7.6)
to fix a known race condition in useGroupRef/usePanelRef hooks that caused
intermittent "No group found for id" errors during SSR hydration with
React 19's useId().

Define owned prop types for ResizablePanelGroup, ResizablePanel, and
ResizableHandle instead of re-exporting the dependency's types. This
ensures future dependency upgrades don't leak breaking changes to
consumers.

Key changes:
- Own prop types for all three components (no dependency type leakage)
- Accept both `direction` and `orientation` on ResizablePanelGroup
- Adapt v4 onResize callback (PanelSize → number) for backwards compat
- Update CSS selectors: data-[panel-group-direction] → aria-[orientation]
- Update story file to use orientation prop
- Bump version to 4.2.0 (non-breaking for consumers)

Ref: https://github.com/bvaughn/react-resizable-panels/issues/204

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 16:54:01 -07:00
Terry Zhao 9e3cf443b0 Merge pull request #350 from run-llama/cursor/shadcn-buttongroup-component-17fd
feat: add ButtonGroup component with shadcn export
2026-03-17 15:58:01 -07:00
Cursor Agent b1f48a1331 chore: add changeset for ButtonGroup feature (minor bump)
Reverts manual version bump in favor of changeset workflow.

Co-authored-by: Terry Zhao <zhaotai5541@gmail.com>
2026-03-17 02:43:27 +00:00
Cursor Agent 7ec15c62a8 chore: bump version to 4.2.0 for ButtonGroup feature
Co-authored-by: Terry Zhao <zhaotai5541@gmail.com>
2026-03-17 02:40:14 +00:00
Terry Zhao 92869bc73c Merge pull request #351 from run-llama/chore/fix-code-quality-350
chore: fix Code Quality for #350
2026-03-16 19:38:17 -07:00