Skip to content

Fix authenticated paper imports, source exports, and startup loading - #3

Closed
QinXi-ai wants to merge 3 commits into
mainfrom
codex/fastwrite-minimum-usability
Closed

QinXi-ai wants to merge 3 commits into
mainfrom
codex/fastwrite-minimum-usability

Conversation

@QinXi-ai

@QinXi-ai QinXi-ai commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Imported papers could be inaccessible to their creator, signed-in source exports returned 401, and the landing page waited for a 4.4 MB editor bundle before rendering. This PR repairs those basic writing paths and keeps the application working under /write/.

Changes

  • Register private project ownership atomically for directory and GitHub imports; bind upload sessions to their creator and make repeated/concurrent completion return the same project. Legacy ownerless sessions cannot be claimed by another user.
  • Use authenticated requests and session refresh for source downloads, binary assets, image previews and provenance exports. Expose source export in the workspace toolbar and flush pending edits before downloading.
  • Keep Monaco, PDF and LaTeX dependencies out of the landing/project-list startup graph; add a build guard, an immediate HTML loading state and retry recovery. Serve precompressed assets with encoding negotiation and appropriate caching, and prevent the service worker from returning HTML for failed scripts or caching authenticated API requests.
  • Preserve base-path navigation and requests, increase the source editor font slightly and reduce the default AI panel height.
  • Isolate non-AI browser acceptance: disable automatic completion/collaboration, block unexpected completion requests and assert that no live model completion was requested. This prevents typing fixtures from launching the user's installed Codex harness.

Validation

  • Local Bun 1.4.3: workspace typecheck and production Web build with FASTWRITE_BASE_PATH=/write/ passed.
  • 36 focused regression tests passed with 183 assertions, plus the CSP image-preview regression. Existing application API regressions also passed; one Windows Git-history case needed a 20-second timeout on retry.
  • Playwright with Microsoft Edge passed eight real flows on an authenticated local server under /write/: register, multi-file import/compile, image preview, immediate export of the latest edit, refresh/PDF download, cross-account access denial, compile-error recovery, and export/reimport/compile. No page exceptions or API errors were recorded.
  • Edge startup checks confirmed no Monaco/PDF/LaTeX requests on the landing page or project list, and successful recovery after blocked entry/lazy bundles. Local timing is not a production latency claim.
  • Repeated all eight browser flows with automatic completion disabled and a server provider that rejects live model operations: all passed, with zero completion requests and zero server model calls.

Review boundaries

  • This is a PR-only delivery; no deployment, release tag, production data migration or automatic claim of historical ownerless projects is included.
  • The full repository suite is not claimed green: an existing Web control guard fails on raw controls in unchanged SourceControlView and ResearchDialog. The existing external FastCAS SDK dependency also requires a sibling checkout with its dist built.
  • Real conference templates, Chinese XeLaTeX, large papers/images, simultaneous collaboration and live model responses were not revalidated in this change.

Implementation and reproducible local acceptance details: docs/USABILITY_REPAIR.md and docs/STARTUP_VALIDATION.md.

Current GitHub CI

The PR CI run failed during dependency installation with ENOENT: failed to link package: @fastrd/fastcas@../FastCAS/sdk/typescript. The workflow checks out only FastWrite, while the existing dependency points at a sibling FastCAS SDK. CI did not reach typecheck, tests, build or E2E. The local validation above used a separately checked-out and built SDK; this PR does not change that dependency or workflow setup.

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