Skip to content

Weekly dev branch - #74

Open
mickmister wants to merge 130 commits into
mainfrom
vk/d1e2-springboard-week
Open

Weekly dev branch#74
mickmister wants to merge 130 commits into
mainfrom
vk/d1e2-springboard-week

Conversation

@mickmister

Copy link
Copy Markdown
Member

No description provided.

mickmister and others added 30 commits August 27, 2025 08:21
Added git initialization and initial commit commands.
…mations

Phase 1: Core Refactor
- Create namespace classes: ServerAPI, SharedAPI, UserAgentAPI, ClientAPI, UIAPI
- Add namespaced methods: moduleAPI.server.*, moduleAPI.shared.*, moduleAPI.userAgent.*, moduleAPI.client.*, moduleAPI.ui.*
- Migrate all modules to use new createSharedStates/createServerStates APIs
- Maintain backward compatibility with deprecated methods
- Add comprehensive JSDoc documentation

Phase 2: Build System
- Update esbuild plugin to detect new namespaced API patterns
- Implement springboard.runOn() platform-specific transformation
- Add compile-time code stripping for non-matching platforms
- Create comprehensive test suite with 7 passing tests
- Verify transformations work for browser/node/server builds

All tests passing. Type checks passing (11/11 packages).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add providers array to Module type (keeping legacy Provider for compatibility)
- Implement moduleAPI.ui.registerReactProvider() to add providers to array
- Update engine to stack both legacy Provider and new providers array
- Add comprehensive JSDoc with examples
- Add test coverage for multiple provider registration

All tests passing (2/2). Type checks passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Mark Phase 1 (Core Refactor) as complete
- Mark Phase 2 (Build System) as complete
- Add progress summary showing 2/10 phases complete
- Document deferred items (object freezing, shared test suite)
- Note bonus implementation of registerReactProvider

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add rank parameter to registerReactProvider (number or 'top'/'bottom')
- Rank 100 ('top'): Outermost providers (error boundaries, global state)
- Rank 0 (default): Normal providers (most use cases)
- Rank -100 ('bottom'): Innermost providers (theme, i18n)
- Update Module type to store ProviderWithRank array
- Sort all providers by rank before stacking in engine
- Update tests to verify rank ordering
- Add comprehensive documentation and examples

Within same rank, providers stack in registration order (stable sort).
Legacy Provider property treated as rank 0 for backward compatibility.

All tests passing (2/2). Type checks passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Created ModuleAPIInternal class containing internal methods
- Moved createAction, setRpcMode, onDestroy, destroy to _internal
- Moved deps, moduleId, fullPrefix properties to _internal
- Removed deprecated methods from public API surface
- Updated Mantine module to use registerReactProvider API

Breaking changes:
- moduleAPI.createAction() removed (use _internal.createAction)
- moduleAPI.setRpcMode() removed (use _internal.setRpcMode)
- moduleAPI.createActions() removed
- moduleAPI.createServerAction() removed
- moduleAPI.createServerActions() removed
- moduleAPI.deps removed (use _internal.deps)
- moduleAPI.moduleId removed (use _internal.moduleId)
- moduleAPI.fullPrefix removed (use _internal.fullPrefix)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Expose public singular methods for creating individual states:
- moduleAPI.server.createServerState(name, initialValue)
- moduleAPI.shared.createSharedState(name, initialValue)
- moduleAPI.userAgent.createUserAgentState(name, initialValue)

Previously these were private helper methods. Now they're public
to support creating single states without using the plural batch
creation methods.

Added comprehensive documentation with usage examples for each.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove underscore prefix from internal namespace for cleaner API.
TypeScript convention doesn't use underscore prefixes for public
properties that are discouraged but not truly private.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fix type safety regression introduced during internal refactoring.

Changes:
- Import AllModules type from module registry
- Change generic constraint from `extends string` to `extends keyof AllModules`
- Add explicit return type `AllModules[ModuleId]`
- Remove `as any` cast (no longer needed with proper types)

This restores:
- Module ID autocomplete (only valid registered module IDs)
- Return type inference (proper module types)
- Compile-time validation for module access

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Analyzes svelte-mcp architecture patterns for creating a similar MCP server
for springboard. Documents key patterns including:
- Tool orchestration (list-sections → get-documentation → autofixer)
- Use cases as keywords for smart doc selection
- Iterative validation with AST visitors
- Context-efficient workflow design

Proposes springboard-mcp design with validator patterns for:
- State mutation detection
- Missing cleanup handlers
- Route conflicts
- Module interface merging

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Redesign springboard-ai as a CLI tool instead of MCP server for:
- Simpler integration (any AI agent can run shell commands)
- No protocol overhead (direct stdin/stdout)
- Easier testing (run commands manually)
- Portability (works with any AI tool)

CLI commands:
- sb-ai list-sections: Discover docs with use_cases
- sb-ai get-docs: Fetch documentation
- sb-ai validate: Validate module code (issues/suggestions)
- sb-ai scaffold: Generate module templates
- sb-ai context: Output full agent context prompt
- sb-ai types: Output TypeScript definitions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Integrate with existing `sb` CLI rather than separate tool:
- sb docs list - List docs with use_cases
- sb docs get - Fetch documentation
- sb docs validate - Validate module code
- sb docs scaffold - Generate templates
- sb docs context - Agent context prompt
- sb docs types - TypeScript definitions

Implementation extends /packages/springboard/cli/ instead of new package.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Creates new `sb docs` subcommand with placeholder implementations for:
- sb docs list: List documentation sections with use_cases
- sb docs get: Fetch specific documentation
- sb docs validate: Validate module code
- sb docs scaffold: Generate module templates (module/feature/utility)
- sb docs context: Output agent context prompt
- sb docs types: Output TypeScript definitions

All commands return TODO messages and will be implemented in follow-up
commits.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changes:
1. Make `sb docs` (without subcommand) show help output
2. Add CLAUDE.md creation in create-springboard-app with:
   - Instructions to run `npx sb docs --help` before coding
   - Key commands and workflow for Claude Code agents
   - Emphasis on using docs tools to ensure correct code

3. Add AGENTS.md creation in create-springboard-app with:
   - Similar instructions for other AI coding assistants
   - Clear workflow recommendations
   - Guidance to lean on `sb docs` commands

Both files are created automatically when running create-springboard-app,
ensuring AI agents have immediate context about available documentation
tools.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changes based on analysis of svelte-mcp's approach:

1. Add helpful text to `sb docs --help`:
   - Guides AI agents to run `sb docs context` first
   - Explains that context includes full docs list
   - Shows recommended workflow: context → validate → get

2. Update CLAUDE.md and AGENTS.md:
   - Emphasize `sb docs context` as the single starting point
   - Explain that context includes everything (framework info + docs list)
   - Clarify that `list` is redundant if you've run `context`
   - Simplify workflow to match svelte-mcp pattern

Following svelte-mcp's pattern where the prompt pre-loads all available
docs and explicitly tells agents "you do not need to call list-sections
again."

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Creates bundled examples system similar to svelte-mcp's approach:

1. Add `sb docs examples` commands:
   - `sb docs examples list` - List all available examples
   - `sb docs examples show <name>` - Display full code for an example

2. Create three example modules:
   - basic-feature-module: Shared state + actions + routes
   - persistent-state-module: Database-backed state
   - user-agent-state-module: localStorage-backed UI state

3. Examples are stored as .txt files and bundled in npm package
   - Copied to dist/examples/ during build
   - Read at runtime via fs.readFileSync
   - Categorized by type (state, actions, routing, patterns)
   - Tagged for discoverability

4. Add comparison document (.planning/sb-docs-vs-svelte-mcp.md):
   - Documents what svelte-mcp has vs what we have
   - Key differences: MCP vs CLI, playground-link vs examples
   - Missing features: live docs fetching, use_cases metadata
   - Architecture decisions needed

This follows svelte-mcp's pattern of providing concrete examples,
though via bundled files instead of playground links (no playground
equivalent for Springboard yet).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Created comprehensive questionnaire based on deep research of:
- Springboard core APIs (ModuleAPI, StatesAPI, Actions, Routing, etc.)
- Real-world usage in songdrive (19+ modules, patterns, anti-patterns)

Questionnaire covers 25 questions across:
- General architecture (doc source, format, use_cases metadata)
- Command-specific decisions for each sb docs command
- Validation patterns to detect (from songdrive analysis)
- Implementation priority and MVP scope
- Integration with CLAUDE.md/AGENTS.md

Key decisions needed:
- Documentation source: Bundle vs Runtime vs Hosted
- Use cases generation: Claude Batch vs Manual vs Skip
- Validation scope: Which patterns to detect
- Scaffold: Keep vs Remove vs Replace with examples
- MVP: Which commands are minimum viable

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add full implementation of sb docs CLI commands for AI agent support:

- sb docs list: Lists 13 documentation sections with use_cases keywords
- sb docs get <section>: Fetches specific documentation content
- sb docs context: Outputs comprehensive context prompt for AI agents
- sb docs types: Shows TypeScript type definitions
- sb docs validate: Placeholder for future AST-based validation
- sb docs scaffold: Redirects to examples system

Create LLM-optimized documentation covering:
- Module API, state management, actions, routing
- Module types and communication patterns
- Core dependencies and lifecycle
- Platform support and server modules
- Common patterns and anti-patterns

Add build scripts to copy docs to dist during npm build.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
These commands don't match svelte-mcp patterns:
- validate: svelte-mcp has real AST validation, ours was just a placeholder
- scaffold: svelte-mcp doesn't have scaffolding, uses playground-link instead

Remaining commands match svelte-mcp interface:
- list: matches list-sections tool
- get: matches get-documentation tool
- context: matches svelte-task prompt
- types: Springboard-specific addition
- examples: replaces playground-link for offline use

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Port the useModule pattern from SongDrive to Springboard core.
This hook provides type-safe module access from React components:

  const audioPlayer = useModule('AudioPlayer');
  const currentFile = audioPlayer.currentlyPlayingFile.useState();

Use this instead of moduleAPI.getModule() when in React components.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update the generated agent instruction files to reflect the removal of
sb docs validate. Replace with examples commands in the workflow.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Vibe Kanban added 18 commits June 12, 2026 14:42
# Conflicts:
#	packages/jamtools/core/src/modules/macro_module/macro_handlers/inputs/macro_input_test_helpers.tsx
#	packages/jamtools/core/src/modules/macro_module/macro_handlers/inputs/musical_keyboard_input_macro_handler.spec.tsx
#	packages/springboard/package.json
#	packages/springboard/src/core/engine/engine.tsx
#	packages/springboard/src/core/engine/module_api.spec.ts
#	packages/springboard/vite-plugin/src/templates/web-entry.template.ts
#	pnpm-lock.yaml
# Conflicts:
#	CLAUDE.md
#	packages/springboard/package.json
#	packages/springboard/src/core/engine/engine.tsx
#	packages/springboard/src/core/engine/module_api.spec.ts
#	packages/springboard/src/core/engine/module_api.ts
#	packages/springboard/src/core/engine/register.ts
#	packages/springboard/src/core/types/module_types.ts
#	packages/springboard/src/platforms/browser/entrypoints/offline_entrypoint.ts
#	packages/springboard/src/platforms/browser/entrypoints/online_entrypoint.ts
#	packages/springboard/src/platforms/react-native/entrypoints/rn_app_springboard_entrypoint.ts
#	packages/springboard/src/platforms/react-native/services/kv/kv_rn_and_webview.spec.tsx
#	packages/springboard/vite-plugin/src/index.ts
#	pnpm-lock.yaml
# Conflicts:
#	.github/workflows/ci.yml
#	packages/springboard/src/server/hono_app.ts
# Conflicts:
#	packages/springboard/src/core/services/states/shared_state_service.ts
#	packages/springboard/src/core/types/module_types.ts
#	packages/springboard/src/platforms/browser/services/browser_json_rpc.ts
#	packages/springboard/src/platforms/node/services/node_json_rpc.ts
…ringboard-week

# Conflicts:
#	packages/springboard/cli/src/cli.ts
#	scripts/run-all-folders.sh
…-springboard-week

# Conflicts:
#	packages/springboard/create-springboard-app/src/cli.ts
…ringboard-week

# Conflicts:
#	packages/springboard/src/platforms/browser/entrypoints/react_entrypoint.tsx
#	packages/springboard/src/server/hono_app.spec.ts
#	packages/springboard/src/server/hono_app.ts
#	packages/springboard/vite-plugin/src/index.ts
@claude

claude Bot commented Aug 24, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 24, 2026

Copy link
Copy Markdown

Deploying jamtools-docs-new with  Cloudflare Pages  Cloudflare Pages

Latest commit: 96976f4
Status: ✅  Deploy successful!
Preview URL: https://cc4b95e5.jamtools-docs-new.pages.dev
Branch Preview URL: https://vk-d1e2-springboard-week.jamtools-docs-new.pages.dev

View logs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a37fbdfb2e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -16,9 +18,11 @@ const DATA_HOST = import.meta.env.VITE_DATA_HOST || `${httpProtocol}://${locatio
const rpc = new BrowserJsonRpcClientAndServer(`${WS_HOST}/ws`);
const remoteKvStore = new HttpKvStoreClient(DATA_HOST);
const userAgentKvStore = new BrowserKVStoreService(localStorage);
const sessionKvStore = new BrowserSessionKVStoreService(sessionStorage);
const applicationDescriptor = getApplicationDescriptorFromExports(applicationEntrypointModule, '__USER_ENTRY__');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve side-effect-only application entrypoints

When an application entrypoint only calls springboard.registerModule and exports no descriptor—as apps/vite-test/src/tic_tac_toe.tsx still does—this unconditional lookup throws before startAndRenderBrowserApp runs. That renderer deliberately accepts an omitted descriptor so it can initialize captured registrations, but the generated web entry now prevents that compatibility path, breaking browser development and builds for existing applications; only resolve a descriptor when the expected export is present.

Useful? React with 👍 / 👎.

Comment on lines +205 to +206
traverse(ast, {
VariableDeclaration(path) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Strip server actions outside variable declarations

When createServerAction or createServerActions is used in a return value, object property, assignment, or class field rather than as the direct initializer of a local variable, this visitor never examines the call. The browser transform consequently emits the complete callback—including any server credentials or sensitive logic—even though ServerAPI promises that implementations are stripped from client builds; the sanitizer needs to traverse server-action call expressions regardless of their parent node.

Useful? React with 👍 / 👎.

Comment on lines +177 to +179
if (methodName === 'createServerState' || methodName === 'createServerStates' || methodName === 'createServerAction' || methodName === 'createServerActions') {
return true;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restrict server stripping to the ModuleAPI server namespace

In browser builds, any application-local object exposing a method named createServerState, createServerStates, createServerAction, or createServerActions is treated as Springboard's server API because this branch returns before inspecting the callee object. For example, const action = anotherLibrary.createServerAction(...) has its callback emptied, and similarly named state declarations are deleted, silently changing unrelated application behavior; verify that the call is through the moduleAPI.server namespace before transforming it.

Useful? React with 👍 / 👎.

restartTries: 0,
}
);
// concurrently(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep sb start launching the production server

When users run the documented sb start command, the handler now prints “Starting production server...” and immediately exits successfully because the entire concurrently invocation is commented out. No HTTP or Node process is started, so deployments or scripts relying on this CLI command fail without reporting an error; retain an actual server launch or remove the advertised command and return a failure.

Useful? React with 👍 / 👎.

};

springboard.registerModule('ItemsModule', {}, async (moduleAPI) => {
const shared = await moduleAPI.statesAPI.createSharedState<ItemsState>('items', {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update sb docs context to the namespaced ModuleAPI

Running the newly added sb docs context command tells agents to call moduleAPI.statesAPI.createSharedState, but this same change removes statesAPI and exposes state creation through namespaces such as moduleAPI.shared and moduleAPI.userAgent. The primary onboarding sample therefore produces code that cannot type-check, and the bundled examples and types output repeat the obsolete surface; generate the context from the current API names.

Useful? React with 👍 / 👎.

console.log(`🏗️ Creating React Native Springboard project using caz...`);

// Use caz with the React Native Springboard template
execSync(`npx caz @springboardjs/template-react-native ${projectName}`, {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Pass scaffold names without invoking a shell

When sb scaffold mobile receives a project name containing shell metacharacters, the CLI argument is interpolated directly into an execSync command, so a value such as app; <command> executes arbitrary commands with the caller's privileges. This is especially unsafe when project names come from automation; invoke npx with an argument array via execFileSync/spawnSync and validate that the name is a safe child path.

Useful? React with 👍 / 👎.

Comment on lines +178 to +180
if (webViewRef.current) {
webViewRef.current.goBack();
return true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Let Android Back exit when the WebView has no history

On Android, once the WebView ref exists this handler always returns true, even on the initial page where goBack() cannot navigate. The system Back action is therefore consumed and users cannot leave the app through Back; use the already tracked canGoBack navigation state and return false when no WebView history is available.

Useful? React with 👍 / 👎.

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