Skip to content

feat: W-21111977 consume error-page template from @salesforce/webapp-experimental/proxy#22

Merged
ankitsinghkuntal09 merged 2 commits intomainfrom
feature/W-21111977-move-error-page-to-proxy
Feb 11, 2026
Merged

feat: W-21111977 consume error-page template from @salesforce/webapp-experimental/proxy#22
ankitsinghkuntal09 merged 2 commits intomainfrom
feature/W-21111977-move-error-page-to-proxy

Conversation

@ankitsinghkuntal09
Copy link
Copy Markdown
Collaborator

@ankitsinghkuntal09 ankitsinghkuntal09 commented Feb 9, 2026

Summary

Update plugin-webapp to import the error page HTML template from the @salesforce/webapp-experimental proxy package (v1.23.0) instead of bundling it locally.

Work Item: @W-21111977@

Migration changes:

  • ErrorPageRenderer now uses getErrorPageTemplate() from @salesforce/webapp-experimental/proxy (clean direct import)
  • Removed local error-page.html template (now lives in webapps package)
  • Removed scripts/copy-templates.cjs (no longer needed)
  • Removed postbuild script from package.json
  • Bumped @salesforce/webapp-experimental dependency to ^1.23.0

Bug fixes included:

  • DevServerManager: emit DevServerError directly instead of wrapping in SfError, so the proxy can display the "Dev Server Error" page when dev server crashes
  • ProxyServer: add socket error handler to prevent ECONNRESET from crashing the proxy when dev server dies mid-connection
  • ProxyServer: remove label/version from fallback manifest (fields no longer in WebAppManifest type)

Dependencies

Test plan

  • Verify yarn install resolves @salesforce/webapp-experimental@^1.23.0 successfully
  • Verify TypeScript compilation passes (npx tsc -p .)
  • Verify "No Dev Server Detected" error page renders correctly via sf webapp dev --url http://localhost:9999
  • Verify the full two-column template (from webapps package) is served, not the fallback
  • Verify normal webapp development flow still works end-to-end

@W-21111977@

@ankitsinghkuntal09 ankitsinghkuntal09 force-pushed the feature/W-21111977-move-error-page-to-proxy branch from d64b795 to eac771f Compare February 9, 2026 13:49
@ankitsinghkuntal09
Copy link
Copy Markdown
Collaborator Author

Note on CI: This PR will have a TypeScript compilation failure until the companion webapps PR is merged and published:

Merge order:

  1. Merge webapps PR #86 → publish new version of @salesforce/webapp-experimental (with getErrorPageTemplate export)
  2. Update the @salesforce/webapp-experimental dependency version in this PR's package.json to the newly published version
  3. Merge this PR

The dependency version is currently left at ^0.2.0 (unchanged from main) to avoid install failures. It needs to be bumped to the version that includes the getErrorPageTemplate export from @salesforce/webapp-experimental/proxy.

@ankitsinghkuntal09 ankitsinghkuntal09 force-pushed the feature/W-21111977-move-error-page-to-proxy branch 3 times, most recently from 95b76f7 to 36a7724 Compare February 9, 2026 14:36
…l/proxy @W-21111977@

Update plugin-webapp to import the error page HTML template from the
@salesforce/webapp-experimental proxy package instead of bundling it locally.

Migration changes:
- ErrorPageRenderer now uses getErrorPageTemplate() from @salesforce/webapp-experimental/proxy
- Removed local error-page.html template (now lives in webapps package)
- Removed scripts/copy-templates.cjs (no longer needed)
- Removed postbuild script from package.json
- Bumped @salesforce/webapp-experimental dependency to ^1.17.0

Bug fixes included:
- DevServerManager: emit DevServerError directly instead of wrapping in SfError,
  so the proxy can display the "Dev Server Error" page when dev server crashes
- ProxyServer: add socket error handler to prevent ECONNRESET from crashing the
  proxy when dev server dies mid-connection

Depends on: salesforce-experience-platform-emu/webapps PR for @W-21111977@

Co-authored-by: Cursor <cursoragent@cursor.com>
@ankitsinghkuntal09 ankitsinghkuntal09 force-pushed the feature/W-21111977-move-error-page-to-proxy branch from 36a7724 to 8220f06 Compare February 9, 2026 16:00
@ankitsinghkuntal09 ankitsinghkuntal09 changed the title feat: consume error-page template from @salesforce/webapp-experimental/proxy @W-21111977@ feat: W-21111977 consume error-page template from @salesforce/webapp-experimental/proxy Feb 9, 2026
@ankitsinghkuntal09 ankitsinghkuntal09 changed the title feat: W-21111977 consume error-page template from @salesforce/webapp-experimental/proxy feat: W-21111977 consume error-page template from @salesforce/webapp-experimental/proxy Feb 11, 2026
@ankitsinghkuntal09 ankitsinghkuntal09 force-pushed the feature/W-21111977-move-error-page-to-proxy branch from a715164 to f543853 Compare February 11, 2026 07:30
…experimental/proxy

Update plugin-webapp to import the error page HTML template from the
@salesforce/webapp-experimental proxy package (v1.23.0) instead of
bundling it locally.

Migration changes:
- ErrorPageRenderer now uses getErrorPageTemplate() from
  @salesforce/webapp-experimental/proxy (direct import, no workarounds)
- Removed local error-page.html template (now lives in webapps package)
- Removed scripts/copy-templates.cjs (no longer needed)
- Removed postbuild script from package.json
- Bumped @salesforce/webapp-experimental dependency to ^1.23.0

Bug fixes included:
- DevServerManager: emit DevServerError directly instead of wrapping
  in SfError, so the proxy can display the "Dev Server Error" page
  when dev server crashes
- ProxyServer: add socket error handler to prevent ECONNRESET from
  crashing the proxy when dev server dies mid-connection
- ProxyServer: remove label/version from fallback manifest (not in type)

Depends on: salesforce-experience-platform-emu/webapps#86 (merged)

Co-authored-by: Cursor <cursoragent@cursor.com>
@ankitsinghkuntal09 ankitsinghkuntal09 force-pushed the feature/W-21111977-move-error-page-to-proxy branch from f543853 to 27ab785 Compare February 11, 2026 07:39
Copy link
Copy Markdown
Collaborator

@deepu-mungamuri94 deepu-mungamuri94 left a comment

Choose a reason for hiding this comment

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

LGTM

@ankitsinghkuntal09 ankitsinghkuntal09 merged commit 82a0eff into main Feb 11, 2026
15 checks passed
@ankitsinghkuntal09 ankitsinghkuntal09 deleted the feature/W-21111977-move-error-page-to-proxy branch February 11, 2026 08:07
deepu-mungamuri94 pushed a commit that referenced this pull request Feb 13, 2026
…experimental/proxy (#22)

* feat: consume error-page template from @salesforce/webapp-experimental/proxy @W-21111977@

Update plugin-webapp to import the error page HTML template from the
@salesforce/webapp-experimental proxy package instead of bundling it locally.

Migration changes:
- ErrorPageRenderer now uses getErrorPageTemplate() from @salesforce/webapp-experimental/proxy
- Removed local error-page.html template (now lives in webapps package)
- Removed scripts/copy-templates.cjs (no longer needed)
- Removed postbuild script from package.json
- Bumped @salesforce/webapp-experimental dependency to ^1.17.0

Bug fixes included:
- DevServerManager: emit DevServerError directly instead of wrapping in SfError,
  so the proxy can display the "Dev Server Error" page when dev server crashes
- ProxyServer: add socket error handler to prevent ECONNRESET from crashing the
  proxy when dev server dies mid-connection

Depends on: salesforce-experience-platform-emu/webapps PR for @W-21111977@

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: W-21111977 consume error-page template from @salesforce/webapp-experimental/proxy

Update plugin-webapp to import the error page HTML template from the
@salesforce/webapp-experimental proxy package (v1.23.0) instead of
bundling it locally.

Migration changes:
- ErrorPageRenderer now uses getErrorPageTemplate() from
  @salesforce/webapp-experimental/proxy (direct import, no workarounds)
- Removed local error-page.html template (now lives in webapps package)
- Removed scripts/copy-templates.cjs (no longer needed)
- Removed postbuild script from package.json
- Bumped @salesforce/webapp-experimental dependency to ^1.23.0

Bug fixes included:
- DevServerManager: emit DevServerError directly instead of wrapping
  in SfError, so the proxy can display the "Dev Server Error" page
  when dev server crashes
- ProxyServer: add socket error handler to prevent ECONNRESET from
  crashing the proxy when dev server dies mid-connection
- ProxyServer: remove label/version from fallback manifest (not in type)

Depends on: salesforce-experience-platform-emu/webapps#86 (merged)

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Ankit Singh <singhankit@singhank-ltmg4lv.internal.salesforce.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
deepu-mungamuri94 added a commit that referenced this pull request Feb 13, 2026
…x type

- Run yarn install to resolve 1.23.0+ (was 0.2.0 from stale lock)
- ProxyServer: use minimal fallback { name, outputDir } per PR #22
- Tests: remove label/version from manifest fixtures
- ManifestWatcher tests: fix assertions for simplified type

Co-authored-by: Cursor <cursoragent@cursor.com>
deepu-mungamuri94 added a commit that referenced this pull request Feb 18, 2026
…tive (#23)

* feat: add Vite proxy detection and TTY-aware messaging

- Detect Vite WebApp proxy via health check, skip standalone proxy when active
- Use getErrorPageTemplate from @salesforce/webapp-experimental/proxy
- TTY-aware stop message (Ctrl+C in terminal vs VS Code command palette)
- Add info.ready-for-development-vite for Vite proxy case
- Simplify ready-for-development to show only URL to open
- Resolve PR review comments on messaging

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: remove label/version to match @salesforce/webapp-experimental 1.x type

- Run yarn install to resolve 1.23.0+ (was 0.2.0 from stale lock)
- ProxyServer: use minimal fallback { name, outputDir } per PR #22
- Tests: remove label/version from manifest fixtures
- ManifestWatcher tests: fix assertions for simplified type

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: group ready-for-development messages, simplify Vite message format

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: update server-running message - remove bold, add quotes

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
deepu-mungamuri94 added a commit that referenced this pull request Feb 20, 2026
…93297@ (#18)

* refactor(dev): improve webapp discovery and console output @W-21193297@

- Add SFDX project detection for webapp discovery
- Simplify webapplications folder detection logic
- Condense warning messages, remove verbose JSON examples
- Add help tip for configuration options

* feat: W-21111977 consume error-page template from @salesforce/webapp-experimental/proxy (#22)

* feat: consume error-page template from @salesforce/webapp-experimental/proxy @W-21111977@

Update plugin-webapp to import the error page HTML template from the
@salesforce/webapp-experimental proxy package instead of bundling it locally.

Migration changes:
- ErrorPageRenderer now uses getErrorPageTemplate() from @salesforce/webapp-experimental/proxy
- Removed local error-page.html template (now lives in webapps package)
- Removed scripts/copy-templates.cjs (no longer needed)
- Removed postbuild script from package.json
- Bumped @salesforce/webapp-experimental dependency to ^1.17.0

Bug fixes included:
- DevServerManager: emit DevServerError directly instead of wrapping in SfError,
  so the proxy can display the "Dev Server Error" page when dev server crashes
- ProxyServer: add socket error handler to prevent ECONNRESET from crashing the
  proxy when dev server dies mid-connection

Depends on: salesforce-experience-platform-emu/webapps PR for @W-21111977@

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: W-21111977 consume error-page template from @salesforce/webapp-experimental/proxy

Update plugin-webapp to import the error page HTML template from the
@salesforce/webapp-experimental proxy package (v1.23.0) instead of
bundling it locally.

Migration changes:
- ErrorPageRenderer now uses getErrorPageTemplate() from
  @salesforce/webapp-experimental/proxy (direct import, no workarounds)
- Removed local error-page.html template (now lives in webapps package)
- Removed scripts/copy-templates.cjs (no longer needed)
- Removed postbuild script from package.json
- Bumped @salesforce/webapp-experimental dependency to ^1.23.0

Bug fixes included:
- DevServerManager: emit DevServerError directly instead of wrapping
  in SfError, so the proxy can display the "Dev Server Error" page
  when dev server crashes
- ProxyServer: add socket error handler to prevent ECONNRESET from
  crashing the proxy when dev server dies mid-connection
- ProxyServer: remove label/version from fallback manifest (not in type)

Depends on: salesforce-experience-platform-emu/webapps#86 (merged)

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Ankit Singh <singhankit@singhank-ltmg4lv.internal.salesforce.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: address PR feedback and merge conflicts

- messages: specify 'proxy server' in Ctrl+C stop message
- ProxyServer: add label and version to fallback WebAppManifest
- ErrorPageRenderer: use local template (getErrorPageTemplate not in package)
- tests: add label and version to WebAppManifest fixtures

Co-authored-by: Cursor <cursoragent@cursor.com>

* revert: drop merge-fix changes, keep only PR feedback

Keep only the messages change: 'Press Ctrl+C to stop the proxy server'.
Revert ErrorPageRenderer, ProxyServer, and test changes - will address separately.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: address PR review comments

- no-manifest: log applied defaults (dev command, proxy port) at info level
- ready-for-development: show only URL to open in browser (proxy URL)
- flags.url: add dev server URL precedence to help text

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore: remove unused error-page-template.ts

Co-authored-by: Cursor <cursoragent@cursor.com>

* @W-21111861@ feat: Skip standalone proxy when Vite WebApp proxy is active (#23)

* feat: add Vite proxy detection and TTY-aware messaging

- Detect Vite WebApp proxy via health check, skip standalone proxy when active
- Use getErrorPageTemplate from @salesforce/webapp-experimental/proxy
- TTY-aware stop message (Ctrl+C in terminal vs VS Code command palette)
- Add info.ready-for-development-vite for Vite proxy case
- Simplify ready-for-development to show only URL to open
- Resolve PR review comments on messaging

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: remove label/version to match @salesforce/webapp-experimental 1.x type

- Run yarn install to resolve 1.23.0+ (was 0.2.0 from stale lock)
- ProxyServer: use minimal fallback { name, outputDir } per PR #22
- Tests: remove label/version from manifest fixtures
- ManifestWatcher tests: fix assertions for simplified type

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: group ready-for-development messages, simplify Vite message format

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: update server-running message - remove bold, add quotes

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>

* Address review comments: URL mismatch tests, multi-meta warning, 60s timeout

- Add comprehensive tests for devServerUrl vs actualDevServerUrl mismatch
  combinations (explicit URL match/mismatch, manifest, skipDevServer cases)
- Warn when multiple .webapplication-meta.xml files found in directory;
  use first match for backward compatibility
- Increase dev server startup timeout from 30 to 60 seconds to align with
  VS Code extension and support slower dev server startups

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor: discover webapps from all package directories via SfProject

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update SF_WEBAPP_DEV_GUIDE.md

Co-authored-by: Brian Buchanan <5377888+bpbuch@users.noreply.github.com>

* Update SF_WEBAPP_DEV_GUIDE.md

Co-authored-by: Brian Buchanan <5377888+bpbuch@users.noreply.github.com>

* Update SF_WEBAPP_DEV_GUIDE.md

Co-authored-by: Brian Buchanan <5377888+bpbuch@users.noreply.github.com>

* SF_WEBAPP_DEV_GUIDE: document only dev.command and dev.url for dev command

- Remove name, label from --name option (matches folder name)
- Simplify picker format, remove label references
- Remove Full Configuration example (name, label, version, outputDir)
- Add Dev + Routing example with only dev and routing
- Update troubleshooting: --name matches folder name only

Co-authored-by: Cursor <cursoragent@cursor.com>

* Revert README to main branch

Co-authored-by: Cursor <cursoragent@cursor.com>

* Align README with main branch (plugin-app-dev template)

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Ankit Singh <singhankit@salesforce.com>
Co-authored-by: Ankit Singh <singhankit@singhank-ltmg4lv.internal.salesforce.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Brian Buchanan <5377888+bpbuch@users.noreply.github.com>
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