Skip to content

feat(esign): create folders and jump along the path in the drive browser - #216

Merged
lorenzocorallo merged 2 commits into
mainfrom
feat/esign-drive-folders
Dec 5, 2026
Merged

lorenzocorallo merged 2 commits into
mainfrom
feat/esign-drive-folders

Conversation

@lorenzocorallo

Copy link
Copy Markdown
Member

What

New request › save row › folder browser (src/features/esign/drive-browser.tsx, also used by the document picker):

  • New folder (folder mode only): a FolderPlus button in the browser's bar, and in an empty folder's message, opens a name field at the top of the list. Enter creates (plain Enter never reaches the composer; ⌘/Ctrl+Enter still sends), Escape or ✕ closes. Checked on Enter, then again on blur once it failed, never while typing: empty, " * : < > ? / \ |, a trailing dot, OneDrive's reserved names, over 250 characters, and a name already in the folder whatever its case (folder-name.ts, unit-tested). The backend's own refusal (e.g. a name taken by a non-PDF file the browser doesn't list) shows at the field word for word. On success the browser opens the new folder and puts the focus on "Save here"; a live region says "Folder … created.".
  • Breadcrumb from the drive's root, from the listing's new ancestors: each folder above the open one is a button; nothing above the root. The root is the drive's name, or a house when the drive picker already names it; deeper than three levels, the folders between the root and the open one are in a "…" menu, so the open folder keeps its room in the narrow column. Up one folder stays.
  • States: skeleton rows on a drive's first listing; while another folder loads the list dims (aria-busy) and the spinner shows; a folder that won't list shows its error with "Try again" (Up and the breadcrumb still work), and "Save here" is disabled meanwhile.
  • Server function createEsignDriveFolder (esignRequestsManageMiddleware, POST) → esign.drive.createFolder; listed in tests/server-security.test.mjs with its consumer, and MCP operation esign.drives.createFolder. It doesn't router.invalidate: no loader reads drive contents, and the composer's loader syncs the profile, like the PDF import.
  • Docs: docs/design.md (New request), docs/esign/contracts.md, docs/esign/TRACKER.md.

Verified in agent mode against the backend branch (mock drive): invalid and duplicate names, creating nested folders, the "…" menu, jumping back along the breadcrumb.

Merge order

  1. feat(esign): create drive folders and list a folder's ancestors backend#196 first. Its release publishes esign.drive.createFolder and ancestors.
  2. Then bump @polinetwork/backend here to that release (pnpm add @polinetwork/backend@^<version>, 13.2.0 if nothing else is released first; main is on 11.1.0 and the dashboard typechecks against 13.1.0 + this change) and merge.

Until the bump, CI's typecheck fails on the missing procedure and field. pnpm check, typecheck, test and build pass locally against a package built from the backend branch.

@coderabbitai

coderabbitai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 27 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bff78f7e-943e-4ae7-9097-55bd62b73e6d
Commits

Reviewing files that changed from the base of the PR and between d3198b3 and 78a1adf.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 10

  • docs/design.md
  • docs/esign/TRACKER.md
  • docs/esign/contracts.md
  • package.json
  • src/features/esign/drive-browser.tsx
  • src/features/esign/folder-name.ts
  • src/features/esign/requests.functions.ts
  • src/mcp/operations/esign.ts
  • tests/esign-folder-name.test.mjs
  • tests/server-security.test.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Choosing where to save the signed PDF (New request's save row) now offers
"New folder" in the browser's bar: a name field at the top of the list,
checked on Enter against OneDrive's rules (empty, " * : < > ? / \ |, a
trailing dot, reserved names) and the names already in the folder, whatever
their case. The backend creates it (esign.drive.createFolder, through the
new createEsignDriveFolder server function and MCP operation
esign.drives.createFolder) and the browser opens it with the focus on
"Save here"; the backend's refusal (a name taken by a file the browser
doesn't list) shows at the field.

The bar's path is now a breadcrumb from the drive's root, built from the
listing's new `ancestors`: every folder above opens with a click, nothing
above the root exists, and deep paths keep the root and the open folder
with the ones between in a "…" menu. The first listing shows skeleton rows,
a folder being opened dims the list, and a folder that won't list shows its
error with "Try again".

Needs the @polinetwork/backend release with esign.drive.createFolder and
listing ancestors (PoliNetworkOrg/backend feat/esign-drive-folders): until
then typecheck fails on the missing procedure and field.
@lorenzocorallo
lorenzocorallo force-pushed the feat/esign-drive-folders branch from 06b354f to 78a1adf Compare December 5, 2026 19:45
@lorenzocorallo
lorenzocorallo merged commit 02dd9c3 into main Dec 5, 2026
@lorenzocorallo
lorenzocorallo deleted the feat/esign-drive-folders branch December 5, 2026 19:45
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.

1 participant