Skip to content

[codex] simplify Forge-only code paths#23

Draft
MrCoder wants to merge 1 commit intomainfrom
refactor/simplify-codebase
Draft

[codex] simplify Forge-only code paths#23
MrCoder wants to merge 1 commit intomainfrom
refactor/simplify-codebase

Conversation

@MrCoder
Copy link
Copy Markdown
Contributor

@MrCoder MrCoder commented May 3, 2026

Summary

Safe simplification refactor for the Forge-only codebase.

This removes obsolete Connect-specific branches and collapses small local patterns that were adding code without changing behavior. The source diff is intentionally line-reducing: 15 source files changed with 51 insertions and 356 deletions before adding the report.

What Changed

  • Removed the obsolete /attachment Pages Function and its route allowlist entry.
  • Removed window.AP/postMessage close fallback from AI Aide and now uses Forge bridge view.submit().
  • Replaced xdm_e client-domain extraction with Forge context siteUrl / extension.location.
  • Collapsed edit-mode detection to the Forge-only path.
  • Removed the Connect iframe/provider fallback from DocumentList.
  • Simplified content-provider wiring and feature-evaluation return recording.
  • Removed stale Connect comments, unused getToken(), and obsolete Connect-era tests/setup.
  • Added docs/safe-simplification-refactor-2026-05-03.md with rationale, exact changes, verification, and independent revert guidance.

Why

Production is Forge-only, with Connect retained only for manifest migration compatibility and install/uninstall lifecycle handling. Keeping Connect branches in frontend/runtime code makes the codebase harder to read and creates dead paths that cannot work in Forge.

Validation

  • pnpm vitest --run src/model/ContentProvider/CompositeContentProvider.spec.ts src/model/ContentProvider/ContentPropertyStorageProvider.spec.ts src/utils/ContextParameters/ContextParameters.spec.ts src/utils/isEmbedMode.spec.ts tests/unit/connect-window-ap.spec.ts
  • volta run --node 22.12.0 --pnpm 10.33.2 pnpm build:lite

Note: vue-tsc --noEmit is blocked by the existing vue-tsc@1.8.27 / TypeScript compatibility error before project source checking.

@MrCoder MrCoder temporarily deployed to staging-lite May 3, 2026 08:32 — with GitHub Actions Inactive
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