Introduce tanstack router - #45
Conversation
|
Claude finished @mickmister's task —— View job PR Review: Introduce Tanstack RouterReview Progress:
🔍 Review SummaryThis PR introduces TanStack Router as a replacement for the existing React Router implementation. The changes are well-structured but contain several issues that need attention. 📋 Code Quality & Best Practices✅ Strengths:
🐛 Potential Bugs & Issues🚨 Critical Issues:
🚀 Performance Considerations✅ Good:
🔒 Security Concerns✅ No critical security issues found
🧪 Test Coverage
📦 Dependencies✅ Clean dependency management:
🔧 Recommendations
📊 Overall AssessmentThis is a solid foundation for migrating to TanStack Router, but requires fixes before merging:
The architectural approach is sound and aligns well with the existing module system. |
Deploying jamtools-docs-new with
|
| Latest commit: |
228c0c3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e98c8ff4.jamtools-docs-new.pages.dev |
| Branch Preview URL: | https://tanstack-router.jamtools-docs-new.pages.dev |
|
Claude finished @mickmister's task —— View job Reviewing TanStack Router Migration Review Progress:
🔍 Review SummaryThis PR introduces TanStack Router as a replacement for the existing React Router implementation. The changes are well-structured but contain several critical issues that need immediate attention. 📋 Code Quality & Best Practices✅ Strengths:
🐛 Potential Bugs & Issues🚨 Critical Issues:
🚀 Performance Considerations✅ Good:
🔒 Security Concerns✅ No critical security issues found
🧪 Test Coverage
📦 Dependencies✅ Clean dependency management:
🔧 Recommendations
📊 Overall AssessmentThis is a solid foundation for migrating to TanStack Router, but requires fixes before merging:
The architectural approach is sound and aligns well with the existing module system. |
|
Claude finished @mickmister's task —— View job Reviewing TanStack Router Migration Review Progress:
🔍 Review SummaryThis PR introduces TanStack Router as a replacement for the existing React Router implementation. The migration is architecturally sound but contains several critical issues that need immediate attention before merging. 📋 Code Quality & Best Practices✅ Strengths:
🐛 Potential Bugs & Issues🚨 Critical Bug:
🚀 Performance Considerations✅ Good Practices:
🔒 Security Concerns✅ Security Assessment:
🧪 Test Coverage
📦 Dependencies✅ Clean Dependency Management:
🔧 Specific RecommendationsHigh Priority:
Medium Priority:
Suggested Implementation:// Fix type safety in frontend_routes.tsx
const allModuleRoutes = useMemo(() => {
const routes: AllRoutesFlat = [];
for (const mod of mods) {
if (mod.routes && mod.routes.length > 0) {
routes.push(...(mod.routes as AllRoutesFlat));
}
}
return routes;
}, [mods]);
const router = useMemo(() => createAppRouter(allModuleRoutes), [allModuleRoutes]);📊 Overall AssessmentArchitecture: ✅ Solid Implementation:
Readiness: 🚨 Not Ready for Merge |
|
Docs need to be updated before this is merged |
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>
…tures to use new moduleAPI
…s dep instead of dev dep
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>
8a240c5 to
5e6e1db
Compare
No description provided.