Skip to content

Rewrite root README as a maintainer-grade repository and runtime architecture guide - #1

Merged
Mhmod-Hsn merged 2 commits into
mainfrom
copilot/update-readme-architecture-guide
Oct 12, 2026
Merged

Mhmod-Hsn merged 2 commits into
mainfrom
copilot/update-readme-architecture-guide

Conversation

Copilot AI commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

The root README.md is expanded from a brief workspace overview into a comprehensive contributor/maintainer guide aligned with the current codebase and public API. It now documents repository architecture and consumer-facing runtime behavior in depth, with emphasis on cancellation semantics and throwIfCancelled().

  • Repository and workspace architecture

    • Added a clear top-level architecture map covering apps/website, packages/react-submit-flow, .github/workflows, and root config files.
    • Documented stack and build model (pnpm workspace, Vite + TypeScript library build, Next.js+MDX docs site, CI/deploy workflows).
  • Runtime flow and core controller behavior

    • Added end-to-end runtime flow from React event → useSubmitFlow → FlowController → confirm/cancel/run/result/feedback.
    • Documented FlowStatus values and normal transitions.
    • Added a focused explanation of packages/react-submit-flow/src/core/controller.ts as the orchestration core.
  • Action model, typing, and execution results

    • Documented action configuration shape, typed input/output inference, and discriminated RunResult variants.
    • Clarified action responsibilities vs consuming-app responsibilities.
  • Cancellation and confirmation semantics

    • Added explicit guidance on cooperative cancellation, including the distinction between AbortSignal and throwIfCancelled().
    • Documented dynamic confirmations, retained confirmations, and closeOnConfirm precedence/behavior.
  • Provider, UI primitives, headless/adapters, and accessibility

    • Added sections for SubmitFlowProvider queue/toast behavior and native dialog behavior.
    • Covered form/control primitives (SubmitFlowForm, SubmitFlowRoot, SubmitButton, ActionButton, CancelButton, BackButton, SubmitFeedback).
    • Added headless usage and adapter integration notes, standalone useSubmitFeedback, and accessibility behaviors.
    • Consolidated styling/themes, public entry points, build process, docs site structure, integrations, and project strengths/considerations.
idle -> confirming -> pending -> success | error
idle -> pending -> cancelling -> cancelled
confirming -> cancelled (declined or dismissed)
run: async (input, context) => {
  const draft = await saveDraft(input, { signal: context.signal })
  context.throwIfCancelled()
  return publishDraft(draft.id, { signal: context.signal })
}

Co-authored-by: Mhmod-Hsn <36679595+Mhmod-Hsn@users.noreply.github.com>
Copilot AI changed the title [WIP] Update root README.md with architecture guide Rewrite root README as a maintainer-grade repository and runtime architecture guide Oct 12, 2026
Copilot AI requested a review from Mhmod-Hsn October 12, 2026 10:08
@Mhmod-Hsn
Mhmod-Hsn marked this pull request as ready for review October 12, 2026 10:53
@Mhmod-Hsn
Mhmod-Hsn merged commit 8e1ebef into main Oct 12, 2026
1 check passed
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