Skip to content

chore: remove legacy compatibility and upgrade paths before release - #1541

Merged
bobbyquantum merged 3 commits into
mainfrom
bobbyquantum/legacy-compat-cleanup
Sep 29, 2026
Merged

bobbyquantum merged 3 commits into
mainfrom
bobbyquantum/legacy-compat-cleanup

Conversation

@bobbyquantum

@bobbyquantum bobbyquantum commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Nothing has been released yet, so this removes code that only existed to carry data or callers forward from earlier builds.

Removed

Frontend local data

  • DocumentStorageMigrationService and its app initializer (copied bare-named IndexedDB prose/worldbuilding databases into profile-prefixed ones).
  • One-time import of elements from localStorage (inkweld-local-elements) into Yjs.
  • The fixed 'cover' media-key fallbacks in the cover component, edit dialog, export, import and the EPUB/HTML/PDF generators, plus the LocalStorageService project-cover convenience methods. Covers are now only addressed by their cover-<ms> media id. ProjectService.getProjectCover no longer caches when it has no id.
  • The pre-tabs openedDocuments list save/restore fallback.
  • The 'Local Mode' → 'Browser' display-name alias and the unprefixed auth_token cleanup.
  • The cloud-sync manifest's single profile field. profiles is now the only list, and a manifest without one is rejected.

Archives

  • ARCHIVE_VERSION is reset to 1 and the archive migration registry (archive-migrations.ts, MIN_SUPPORTED_VERSION) is removed. Import accepts only the current version. The v1 format now includes time systems and per-element schema copies. When the format next changes, add an upgrade step to the import.

Dead code and shims

  • createExtendedSchema alias, the side-nav projects input, HomeComponent.filteredProjects, the timeline trackHeight/axisY test aliases, the hidden timeline-event-start/end inputs, and unused .image-grid styles.
  • Backend: the Node /providers endpoint, computeStreaks and ProjectService.findTombstones.

Backend access

  • The owner-only checkAccessLegacy path for a Durable Object with no D1 binding is gone. Without env.DB, WebSocket auth is refused with 4403 and the DO HTTP API returns 503.

Kept on purpose

  • MigrationService (moving Browser projects to a server) and ProjectRenameMigrationService (project rename). Both are live features; only their misleading "legacy" comments changed.
  • Durable Object storage tolerance for number[] rows and the trailing-slash diagnostics. The preview deployment's DO data predates the Uint8Array format and is being kept.
  • SESSION_SECRET is the primary secret and DATABASE_KEY its override. The comments calling one "legacy" were wrong.
  • The single-colon media: scheme is the current prose-image form, not a legacy one.

Comments that described live behaviour as "legacy" were reworded, and AGENTS.md and the archive docs were updated.

Testing

  • Frontend: npm test, 391 files and 9,344 tests pass. Coverage thresholds are met.
  • E2E (local): the media-tab, import/export, tab-restore and media-storage specs pass.
  • Backend: bun test, 1,787 pass.

Nothing has shipped yet, so drop the code that only existed to carry data
or callers forward from earlier builds:

- Frontend: the startup IndexedDB document/worldbuilding storage
  migration, the localStorage elements import, the fixed 'cover' media
  key fallbacks, the pre-tabs opened-documents restore, the 'Local Mode'
  display-name alias, the cloud manifest's single 'profile' field, the
  unprefixed auth_token cleanup, and dead aliases/shims (createExtendedSchema,
  side-nav projects input, filteredProjects, timeline test aliases,
  hidden timeline combined inputs, unused image-grid styles).
- Archives: reset ARCHIVE_VERSION to 1 with an empty migration registry;
  the v1 format now includes time systems and per-element schema copies.
- Backend: drop the owner-only access path for Durable Objects without a
  D1 binding (fail closed instead), the node /providers endpoint and the
  deprecated computeStreaks/findTombstones helpers.
- Reword comments that called live behaviour 'legacy'.
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: bobbyquantum/inkweld/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 2b442ab1-3f29-49c2-a667-75535fd1fdb6


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

Comment @coderabbitai help to get the list of available commands.

@bobbyquantum
bobbyquantum deployed to sonarcloud-analysis September 28, 2026 23:48 — with GitHub Actions Active
- E2E: seed covers under cover-<ms> ids and expect archive version 1.
- Drop the empty archive migration registry; import accepts only the
  current ARCHIVE_VERSION until a format change needs an upgrade step.
- Move the DO HTTP access check into authorizeHttpAccess to keep the
  handler's complexity down, with tests for the no-D1, forbidden and
  read-only-write responses.
- Cover the id-keyed cover cache, the export's cover download and the
  import's cover upload.
- Leave the OpenRouter modality comment as it was.
@bobbyquantum
bobbyquantum deployed to sonarcloud-analysis September 29, 2026 18:14 — with GitHub Actions Active
…ompat-cleanup

# Conflicts:
#	backend/src/durable-objects/yjs-project.do.ts
#	frontend/src/app/services/local/document-storage-migration.service.ts
#	frontend/src/app/services/local/local-storage.service.ts
#	frontend/src/app/services/publish/epub-generator.service.ts
#	frontend/src/app/services/publish/html-generator.service.ts
#	frontend/src/app/services/publish/pdf-generator.service.ts
@bobbyquantum
bobbyquantum deployed to sonarcloud-analysis September 29, 2026 23:00 — with GitHub Actions Active
@sonarqubecloud

Copy link
Copy Markdown

@bobbyquantum
bobbyquantum merged commit 8abe31e into main Sep 29, 2026
33 checks passed
@bobbyquantum
bobbyquantum deleted the bobbyquantum/legacy-compat-cleanup branch September 29, 2026 23:07

This branch was successfully deployed

1 active deployment
sonarcloud-analysis — 899689d4 Deployed Sep 29, 2026 by bobbyquantum via SonarCloud Code Analysis #5279
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