Skip to content

feat: cut examples over to API version 2026-06-07 (facts-only progress)#3

Merged
specialistvlad merged 2 commits into
mainfrom
feature/api-version-2026-06-07
Jun 10, 2026
Merged

feat: cut examples over to API version 2026-06-07 (facts-only progress)#3
specialistvlad merged 2 commits into
mainfrom
feature/api-version-2026-06-07

Conversation

@specialistvlad

Copy link
Copy Markdown
Member

Cuts the demo over to the latest API version (2026-06-07), where GET /documents/{id}/processing/latest reports progress as facts — progress_details[] + pages_done/pages_total/total_known/stage — and drops the legacy processing_progress/page_count.

  • All pins bumped to 2026-06-07 (CLI config, README badge, notebook, TypeScript example).
  • CLI status renders Stage + Pages: done/total (with + (total not final) when total_known=false — counts, never a fabricated percentage); upload completion reads pages_total.
  • Notebook poll cell and TS poll loop show stage: done/total[+].
  • READMEs document the polling shape and the 2026-03-06 pin as the legacy escape hatch.
  • /parse reads untouched — its page_count/total_pages are response-batch metadata on all versions.

Server-side counterpart: LexSelect/lexselect#1010 (gates the legacy field by version on list/get, pins the real webhook payloads, updates the published OpenAPI contract).

A fresh clone's poll loop now works against the default API version — previously the examples taught the deprecated shape and would hit dead field reads without the pin.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 10, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the demo CLI and language examples to use LexSelect API version 2026-06-07, aligning polling/status handling with the new “facts-only” processing progress fields (stage, pages_done, pages_total, total_known, progress_details) and removing reliance on legacy progress fields.

Changes:

  • Bumped pinned API version to 2026-06-07 across README, CLI config, TypeScript example, and Python notebook.
  • Updated polling/status output to display stage and pages_done/pages_total (with + when total_known=false) instead of a computed percentage.
  • Updated CLI upload completion messaging to use pages_total rather than legacy page_count.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Documents the new processing status shape and polling guidance for 2026-06-07 (and legacy pin escape hatch).
examples/typescript/upload-and-poll.ts Pins the new API version and updates polling output + completion pages field.
examples/python/sync-polling.ipynb Pins the new API version and updates polling cell to use facts-only progress fields.
cli/README.md Documents facts-only processing status fields and CLI rendering behavior.
cli/config/config.go Updates the CLI default API version to 2026-06-07.
cli/cmd/upload.go Switches upload completion output from page_count to pages_total.
cli/cmd/status.go Replaces legacy progress fields with stage and rendered pages_done/pages_total[+] output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/typescript/upload-and-poll.ts Outdated
Per PR review: the bracketed progress was appended on every poll, growing
the line indefinitely. The status is now rewritten in place with \r (with
trailing spaces to clear longer previous renders), including the
waiting-for-first-status state.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@specialistvlad specialistvlad merged commit d56a526 into main Jun 10, 2026
3 checks passed
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