Skip to content

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Oct 31, 2025

Implement Minimal End-to-End Flow with Public Anon Key Access

This PR implements a minimal end-to-end flow execution from UI button click through Edge Function to real-time status updates. It validates the entire integration stack using only public anonymous key access without requiring authentication.

Key changes:

  • Set up Supabase with pgflow schema and connection pooling
  • Created a simple test flow with a single step that returns "Hello, World!"
  • Implemented Edge Function worker to process the flow
  • Added anon role permissions to allow public access to pgflow functions and tables
  • Configured real-time updates for runs and step states
  • Created a minimal UI with a button to start the flow and display status/output
  • Vendored pgflow packages correctly for Edge Functions
  • Added proper import maps for Deno

The implementation follows a "thinnest possible slice" philosophy, focusing on proving the integration works without authentication. The UI is intentionally minimal but functional, showing real-time status updates and the final output when the flow completes.

@changeset-bot
Copy link

changeset-bot bot commented Oct 31, 2025

⚠️ No Changeset found

Latest commit: 509ed2a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor Author

jumski commented Oct 31, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge:queue - adds this PR to the back of the merge queue
  • hotfix:queue - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nx-cloud
Copy link

nx-cloud bot commented Oct 31, 2025

View your CI Pipeline Execution ↗ for commit 509ed2a

Command Status Duration Result
nx test:types:health dsl ✅ Succeeded 15s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-11 14:54:53 UTC


// Hardcoded local Supabase defaults (Phase 1 - production config in Phase 6)
const SUPABASE_URL = 'http://127.0.0.1:54321';
const SUPABASE_ANON_KEY = 'sb_publishable_ACJWlzQHlZjBrEguHvfOxg_3BJgxAaH';
Copy link
Contributor

Choose a reason for hiding this comment

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

The hardcoded Supabase anon key will need to be replaced with the actual key from your local Supabase instance. To get the correct key, run npx -y supabase@latest status in your terminal and copy the value from the output. This key is environment-specific and the current placeholder won't work with your local setup.

Suggested change
const SUPABASE_ANON_KEY = 'sb_publishable_ACJWlzQHlZjBrEguHvfOxg_3BJgxAaH';
const SUPABASE_ANON_KEY = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY ||
(() => { throw new Error('Missing NEXT_PUBLIC_SUPABASE_ANON_KEY. Run `npx -y supabase@latest status` to get your key.') })();

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@jumski jumski force-pushed the feat-demo-1-vertical-slice branch from bb8e938 to 50f3776 Compare October 31, 2025 15:06
@jumski jumski force-pushed the feat-demo-0-foundation branch from b940998 to 5270efa Compare November 2, 2025 21:29
@jumski jumski force-pushed the feat-demo-1-vertical-slice branch from 50f3776 to 8c41919 Compare November 2, 2025 21:29
@jumski jumski force-pushed the feat-demo-0-foundation branch from 5270efa to 3cdc7cd Compare November 4, 2025 08:16
@jumski jumski force-pushed the feat-demo-1-vertical-slice branch from 8c41919 to 70c51db Compare November 4, 2025 08:16
@jumski jumski force-pushed the feat-demo-1-vertical-slice branch from 70c51db to eaef789 Compare November 4, 2025 11:33
@jumski jumski force-pushed the feat-demo-0-foundation branch from 3cdc7cd to 5a609dd Compare November 4, 2025 11:33
@jumski jumski force-pushed the feat-demo-1-vertical-slice branch from eaef789 to 0fafb70 Compare November 6, 2025 08:36
@jumski jumski force-pushed the feat-demo-0-foundation branch from 5a609dd to 03c77b7 Compare November 6, 2025 08:36
@jumski jumski force-pushed the feat-demo-1-vertical-slice branch from 0fafb70 to 02f3198 Compare November 9, 2025 15:16
@jumski jumski force-pushed the feat-demo-0-foundation branch from 03c77b7 to 1fe1573 Compare November 9, 2025 15:16
…th pgflow integration

- Clarify goal to implement a minimal end-to-end flow without authentication
- Fix Supabase init command to use npx for latest CLI version
- Add schemas to supabase config for pgflow
- Include detailed steps for copying core migrations and creating anon permissions
- Update vendoring script paths and add Nx target for dependency syncing
- Include instructions for building dependencies, creating test flow, and setting up worker
- Add steps for testing locally with supabase start and serving functions
- Revise UI setup to use Svelte 5 syntax and demonstrate flow start and status updates
- Enhance troubleshooting section with relevant checks for vendoring, edge functions, auth,
and real-time
- Overall, improve clarity for public, unauthenticated demo setup and ensure all steps are
aligned for end-to-end testing
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 11, 2025

Merge activity

  • Nov 11, 8:50 PM UTC: jumski added this pull request to the Graphite merge queue.
  • Nov 11, 8:53 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #289.
  • Nov 11, 8:54 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #289.
  • Nov 11, 9:05 PM UTC: jumski added this pull request to the Graphite merge queue.
  • Nov 11, 9:05 PM UTC: CI is running for this pull request on a draft pull request (#362) due to your merge queue CI optimization settings.
  • Nov 11, 9:07 PM UTC: Merged by the Graphite merge queue via draft PR: #362.

graphite-app bot pushed a commit that referenced this pull request Nov 11, 2025
# Implement Minimal End-to-End Flow with Public Anon Key Access

This PR implements a minimal end-to-end flow execution from UI button click through Edge Function to real-time status updates. It validates the entire integration stack using only public anonymous key access without requiring authentication.

Key changes:

- Set up Supabase with pgflow schema and connection pooling
- Created a simple test flow with a single step that returns "Hello, World!"
- Implemented Edge Function worker to process the flow
- Added anon role permissions to allow public access to pgflow functions and tables
- Configured real-time updates for runs and step states
- Created a minimal UI with a button to start the flow and display status/output
- Vendored pgflow packages correctly for Edge Functions
- Added proper import maps for Deno

The implementation follows a "thinnest possible slice" philosophy, focusing on proving the integration works without authentication. The UI is intentionally minimal but functional, showing real-time status updates and the final output when the flow completes.
@graphite-app graphite-app bot closed this Nov 11, 2025
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