Skip to content

Add test app and fix Node.js compatibility#11

Merged
ctrlaltdylan merged 11 commits intomainfrom
spa-frame-with-test-app
Feb 7, 2026
Merged

Add test app and fix Node.js compatibility#11
ctrlaltdylan merged 11 commits intomainfrom
spa-frame-with-test-app

Conversation

@ctrlaltdylan
Copy link
Owner

Summary

  • Add CLAUDE.md with project documentation and quick start guide
  • Add test-app/ - minimal Vite app demonstrating App Bridge features (Modal, Toast, Session Token)
  • Fix Node.js version compatibility by downgrading vite and using esbuild instead of tsdown
  • Fix modal store to handle showing modals without prior registration
  • Fix app-bridge script path in server

Test App Features

The test app demonstrates the full testing flow:

  • Loading mock App Bridge in iframe environment
  • Session token authentication via shopify.idToken()
  • Modal display via shopify.modal.show()
  • Toast notifications via shopify.toast.show()

How to Test

# Terminal 1: Start test app
cd test-app && npm install && npm run dev

# Terminal 2: Start mock bridge
npm run build && node dist/cli/index.js http://localhost:3000

# Open http://localhost:3080 in browser

Based On

This branch is based on spa-frame (PR #8) and includes all its changes plus the test app integration.

🤖 Generated with Claude Code

Kashuab and others added 11 commits November 8, 2025 14:16
- Add CLAUDE.md with project documentation and quick start guide
- Add test-app/ - minimal Vite app to test App Bridge features (Modal, Toast, Session Token)
- Fix Node.js version compatibility by downgrading vite and using esbuild
- Fix modal store to handle showing modals without prior registration
- Fix app-bridge script path in server (index.iife.js -> index.js)

The test app demonstrates:
- Loading mock App Bridge in iframe environment
- Session token authentication via idToken()
- Modal display via shopify.modal.show()
- Toast notifications via shopify.toast.show()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Ignore test screenshots and other png artifacts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update app-bridge modal feature to extract and sync HTML body content
- Update test-app to use proper Shopify App Bridge ui-modal pattern
- Modal now correctly displays title, body content, and action buttons

The test app demonstrates the correct pattern:
- Define <ui-modal id="my-modal"> with content and <ui-title-bar>
- Call shopify.modal.show('my-modal') to display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create .github/workflows/publish.yml triggered on release
- Builds all packages (root, admin-frame, app-bridge)
- Publishes to NPM with public access for scoped package
- Add publishConfig to package.json

Requires NPM_TOKEN secret to be configured in repository settings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ctrlaltdylan ctrlaltdylan merged commit c5c8393 into main Feb 7, 2026
1 check passed
@ctrlaltdylan ctrlaltdylan deleted the spa-frame-with-test-app branch February 7, 2026 14:58
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

Comments