forked from runtimed/anode
-
Notifications
You must be signed in to change notification settings - Fork 0
print livestore sync url #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* feat: enable runtime agent to load .env files automatically Add --env-file=.env flag to tsx dev command so the runtime agent properly loads environment variables from packages/pyodide-runtime-agent/.env This allows users to configure LIVESTORE_SYNC_URL, AUTH_TOKEN, and OPENAI_API_KEY without manually setting environment variables. * feat: make prototype deployment ready - Configure docworker with LiveStore makeDurableObject pattern - Add prototype environment with proper durable objects configuration - Use AUTH_TOKEN environment variable for secure authentication - Update wrangler.toml with production-ready Cloudflare Worker setup - Successfully deploy to https://anode-docworker-prototype.rgbkrk.workers.dev - Clean up deployment documentation in favor of organic configuration - Remove root .env and .env.example (unused by any package) - Add .env.example to packages/docworker/ for consistency - Package-specific .env files are automatically created by pnpm install - Setup script already handles per-package environment configuration correctly - Prototype environment is for testing collaboration and demos - Distinguish from production deployment - Clarify that prototype uses Cloudflare secrets, not .env files
) * docs: clean up .env references to reflect per-package setup - Remove outdated root .env.example references from AGENTS.md - Update ai-features.md to use packages/pyodide-runtime-agent/.env - Note that OPENAI_API_KEY from environment is automatically used - Update ai-context-demo.md setup instructions - All docs now reflect current auto-setup via pnpm install * drop env example from wrangler, it uses the toml file
* Fix Cloudflare Worker authentication and deployment - Fix web client to use VITE_AUTH_TOKEN from environment instead of hardcoded token - Add prototype environment name override in wrangler.toml - Remove debugging payload validation code - Successfully deploy and test full end-to-end prototype: * Web client ↔ Cloudflare Worker sync working * Python execution via Pyodide runtime agent working * Real-time collaborative editing working * Event-sourced architecture with LiveStore working - Add Caddyfile.example with generic IP (192.168.1.100) - Add Caddyfile to .gitignore * Remove reference to deleted setup script from package.json
* Add Google OAuth authentication with local dev fallback - Add Google OAuth integration with google-auth-library - Create AuthGuard component for protecting routes - Add GoogleSignIn component with Google branding - Add UserProfile component with sign-out functionality - Update docworker to validate Google ID tokens server-side - Maintain fallback auth token for seamless local development - Add comprehensive documentation and demo guide - Update environment setup script for OAuth configuration Key features: - Zero-config local development (no OAuth setup needed) - Secure Google OAuth for production deployments - Mobile-ready authentication for worldwide access - Server-side token validation in Cloudflare Worker - Automatic token refresh every 50 minutes - Mixed-mode support (can run both auth types) Local dev: Works immediately with simple token Production: Secure Google OAuth with ID token validation * Migrate to Google Identity Services (GIS) from deprecated gapi.auth2 - Replace deprecated gapi.auth2 with modern Google Identity Services - Remove heavy google-auth-library and worker-auth-providers dependencies - Use Google's /tokeninfo endpoint for lightweight token validation - Remove nodejs_compat flag - now uses native Web APIs only - Update GoogleSignIn component to use official Google sign-in button - Simplify authentication flow with callback-based approach - Reduce bundle size and improve performance Key improvements: - Modern Google OAuth implementation (no deprecation warnings) - Lighter weight (no Node.js compatibility layer needed) - Native Cloudflare Worker support - Official Google UI components - Better security with server-side token validation Fixes: 'idpiframe_initialization_failed' error from deprecated API * Move FPS meter to bottom-right to avoid overlapping user profile - Change position from top-right to bottom-right - Use fixed positioning instead of absolute - Prevents overlap with user authentication dropdown - Maintains visibility for performance monitoring * Add hybrid authentication for users and runtime agents - Support both Google OAuth (users) and service tokens (runtime agents) - Use kernel: true flag to identify runtime agents in syncPayload - Runtime agents continue using AUTH_TOKEN for service authentication - Users get secure Google OAuth with ID token validation - Maintains zero-friction local development workflow - Enables secure production deployment with proper authentication for both user browsers and automated runtime services This completes the authentication system - users get modern OAuth while runtime agents use appropriate service token authentication. * Set up clean Cloudflare Pages deployment with proper wrangler.toml - Add wrangler.toml for Pages deployment configuration - Use production environment instead of prototype for Pages compatibility - Deploy to anode.pages.dev with consistent configuration - Add wrangler as dev dependency in web-client package - Configure environment variables in wrangler.toml instead of dashboard - Set up proper pages_build_output_dir for clean deployments - Include Google Client ID in configuration for OAuth functionality Deployment ready: - Main URL: https://anode.pages.dev (when deployed from main branch) - Current: https://04d28b01.anode.pages.dev - Backend: https://anode-docworker-prototype.rgbkrk.workers.dev Next: Add deployment URLs to Google OAuth origins for mobile access * remove now outdated docs, revisit later
* Fix Cloudflare deployment configuration - Make prototype environment the default in docworker wrangler.toml - Move development environment config to [env.development] section - Fixes deployment error where CI expected anode-docworker-prototype but default config used fake database ID - Deployment now uses real database ID: 5339094f-f406-4236-97c3-ada460373f18 * Use development environment for local wrangler dev - Update docworker dev script to use --env development - Ensures local development uses fake database ID instead of production database - Maintains separation between local dev and deployed environments
- Set docworker .env AUTH_TOKEN to match web client's insecure-token-change-me - Restructure wrangler.toml: development as default, production as named env - Add AUTH_TOKEN to wrangler.toml vars for consistency - Fix package.json dev script to not specify --env development - Update deploy script to target --env production explicitly
Changing readme just to kick off a build
Mostly again to trigger the cloudflare deploy
* Add Worker Static Assets support to docworker Minimal change to enable serving both API and web client from single Worker: ✅ Changes: - Add [assets] config to docworker wrangler.toml - Route /api/* requests to LiveStore worker - Route everything else to static assets (React app) - Configure SPA routing with not_found_handling - Build web client as part of docworker build process - Set environment-specific VITE_LIVESTORE_SYNC_URL ✅ Benefits: - Single deployment target (eliminates Pages complexity) - No CORS issues (same origin) - Simplified CI/CD pipeline - Preserves existing monorepo structure - No TypeScript configuration changes ✅ Status: - All type checks pass ✓ - All lints pass ✓ - Build works ✓ - Zero regressions from working main branch * no vite auth token for prod
* Remove AUTH_TOKEN from wrangler.toml vars - Development uses .env file for AUTH_TOKEN - Production uses wrangler secret for AUTH_TOKEN - Fixes warning about vars not inherited by environments * Add docworker .env file to setup script - Setup script now creates packages/docworker/.env with AUTH_TOKEN - Updated README to document all .env files created - Clarifies local dev vs production authentication approach * Remove docworker .env - Workers don't use .env files Cloudflare Workers get environment variables from: - wrangler.toml [vars] for non-sensitive values - wrangler secrets for sensitive values like AUTH_TOKEN - .env files only affect the wrangler CLI, not the Worker runtime
* Split deployment: Pages for web client, Workers for sync backend - Remove static assets from worker configuration - Create Pages configuration for web client - Deploy worker to handle sync backend only - Deploy web client to Pages with proper WebSocket URLs - Fixes WebSocket connection issues in Cloudflare Workers runtime * Add deployment documentation for Pages/Workers architecture * Update naming scheme: anode for Pages, anode-docworker for Workers - Rename worker to anode-docworker for clarity - Create new Pages project named anode for the web client - Update all URLs and documentation to reflect new naming - Deploy web client to https://anode.pages.dev - Deploy sync backend to https://anode-docworker.rgbkrk.workers.dev * Fix CORS issues and correct worker URL - Add comprehensive CORS headers to worker for WebSocket connections - Handle preflight OPTIONS requests properly - Rebuild web client with correct worker URL (remove 'prototype') - Allow all headers and methods for cross-origin requests * Force fresh build with correct worker URL - Make small UI changes to force cache busting - Clean rebuild with correct environment variables - Deploy fresh assets with proper LiveStore sync URL * Fix authentication and Pages deployment configuration - Add Google Client ID to worker production environment - Remove incorrect Pages wrangler.toml (use CLI-based deployment) - Update deployment documentation for proper Pages/Workers setup - Rebuild web client with correct worker URL (remove 'prototype') - Authentication should now work with Google OAuth tokens * Add proper environment configuration for web client builds - Create .env.production with correct production URLs - Create .env.development for local development - Add build:prod and build:dev scripts - Update deployment documentation for environment-specific builds * Fix Pages configuration: restore proper wrangler.toml - Pages DOES use wrangler.toml (I was wrong to delete it) - Add proper pages_build_output_dir configuration - Set environment variables in wrangler.toml [vars] section - Add preview environment configuration - Update deployment documentation to reflect correct Pages setup - Keep .env files for local development convenience * Document CI/deployment status and issues in HANDOFF.md - Add CI configuration problems and solutions - Document current deployment architecture - Note authentication fixes and environment setup - Suggest CI environment configuration approach - Keep local development setup intact
- Add startup validation that fails worker launch if DEPLOYMENT_ENV=production and GOOGLE_CLIENT_ID is missing - Add /health endpoint showing deployment info, version, and config status - Add /debug/auth endpoint for testing authentication tokens - Add version injection script that embeds Git commit info at build time - Improve error messages for authentication failures with specific error codes - Fix immutable headers error for WebSocket upgrade responses - Worker validates production config and provides useful debugging tools - Properly type request body as { authToken?: string }
* Add top-level deployment commands - Add deploy:production scripts to both web-client and docworker packages - Add top-level deploy:production command that deploys both services concurrently - Add individual deploy:docworker and deploy:web convenience commands - Use concurrently for parallel deployment with colored output - Avoid pnpm's built-in deploy command by using deploy:production naming * Update deployment documentation - Add quick start section with single-command deployment - Update deployment guide with new pnpm scripts - Add deployment section to README - Improve GitHub Actions examples - Clarify both parallel and sequential deployment options
) - Enhanced auth token management with proactive expiration checking - Added token change listeners for reactive updates - Implemented periodic auth validation (every 30 seconds) - Added visibility change detection for tab focus auth checks - Improved AuthGuard with auth error handling and reload options - Added session storage check for auth validation on page load - Cleaned up expired tokens automatically from cookies and memory - Fixed LiveStore state desync issues after auth failures Resolves authentication sync loop and 'Invalid parent event number' errors when Google OAuth tokens expire during collaborative editing sessions.
- Add docworker .dev.vars creation for consistent AUTH_TOKEN across packages - Remove web-client .env creation to avoid conflicts with .env.development/.env.production - Skip all development file creation when DEPLOYMENT_ENV=production/preview - Add .dev.vars patterns to .gitignore for security - Update validation and messaging to reflect new file management approach This ensures: - Consistent auth tokens across all packages for local development - No environment file conflicts in web-client (uses .env.development properly) - Production deployments won't accidentally create insecure development files - Wrangler dev automatically loads AUTH_TOKEN from .dev.vars
* feat: comprehensive mobile UI improvements - Make NotebookViewer fully responsive with full-width on mobile - Improve Cell component with larger touch targets and mobile-optimized layout - Create chat-like AiCell interface with floating action button on mobile - Add mobile-responsive navigation with better space utilization - Include proper viewport meta tags and mobile-specific CSS - Ensure all controls are touch-friendly with 44px+ minimum touch targets - Add safe area support for devices with notches - Improve text input experience with proper font sizes to prevent zoom Mobile-specific features: - Full-width cells with proper padding on mobile - Always-visible controls on mobile (no hover-only states) - Chat-style AI input with floating send button - Better responsive typography and spacing - Touch-optimized button sizes and interactions * feat: streamline header to clean two-bar layout - Remove redundant third title bar (was showing Anode name unnecessarily) - Combine into clean two-bar structure: • Top bar: Logo + New Notebook button • Notebook bar: Title + Runtime status + Context filter - Remove 'Anode' text, logo is sufficient branding - Show New Notebook button on mobile (was hidden) - Remove keyboard shortcuts on mobile (not applicable for touch) - Keep shortcuts visible on desktop only - Better space utilization and cleaner visual hierarchy * feat: remove final redundant 'Anode Collaborative Notebooks' title - Eliminate the last redundant title from Root component - Clean header now shows only UserProfile on right - Logo in NotebookViewer provides sufficient branding - Maximizes content space, especially valuable on mobile * feat: consolidate to clean two-bar header layout - Move UserProfile into top navigation bar with logo and New Notebook - Remove redundant header bar from Root component - Final clean layout: [logo] [+ New Notebook] [UserProfile] | [title] [runtime] [Context] - Maximizes vertical space for content, especially valuable on mobile - Clean visual hierarchy with only two functional header bars * feat: make logo clickable for new notebook creation - Remove separate 'New Notebook' button text - Logo now serves dual purpose: branding + new notebook action - Cleaner, more minimal interface with hover effect - Tooltip indicates functionality: 'Create New Notebook' - Saves valuable header space, especially on mobile * feat: show 'Anonymous' user in local dev mode - Display 'Anonymous' with gray avatar in unauthenticated state - Shows 'Local Development' as subtitle on desktop - Maintains consistent header layout whether authenticated or not - Better UX for local development and anonymous usage - Uses 'A' initial in gray circle avatar for anonymous users * feat: restore explicit '+ Notebook' button alongside logo - Add back clear call-to-action button for better discoverability - Logo remains as branding, button handles the action - Concise '+ Notebook' text saves space vs '+ New Notebook' - Best of both worlds: clean branding + clear functionality - Better UX for new users who need explicit guidance * feat: make top navigation bar more compact - Reduce vertical padding from py-2/py-3 to py-1/py-2 - Reduce UserProfile padding from p-2 to p-1 - Creates more vertical space for notebook content - Maintains visual balance while being less 'thick' - Better mobile experience with more content area * feat: improve play button placement - ribbon on mobile, gutter on desktop - Move play button to leftmost position in control ribbon on mobile - Keep gutter play button on desktop (flows well with code) - Apply same pattern to both code and AI cells for consistency - Remove floating AI button that covered content - Better touch targets on mobile, preserve desktop UX - Primary action gets prime real estate in mobile ribbon * feat: optimize mobile control ribbon layout Mobile ribbon now prioritizes essential actions: [▶ Play] [🔀 Cell Type] ← → [+ Add] [👁 Show/Hide] Changes: - Move cell type dropdown to second position (after play) - Add flex-1 spacer to push actions to edges - Hide movement buttons (up/down) on mobile - not essential for touch - Keep delete button on desktop only - Maintain all controls on desktop with separator - Better space utilization and cleaner mobile interface * feat: apply optimized mobile control ribbon to SqlCell - Same mobile ribbon layout: [▶ Play] [🔀 Cell Type] ← → [+ Add] [👁 Show/Hide] - Hide movement buttons (up/down/delete) on mobile - Keep full desktop controls with separator - Consistent mobile experience across Code, AI, and SQL cells - DRY note: These components definitely need refactoring later * fix: remove duplicate cell type dropdowns from mobile ribbon - Remove redundant cell type dropdown from mobile control ribbon - Keep original header cell type dropdown (already works well) - Clean mobile ribbon now: [▶ Play] ← → [+ Add] [👁 Show/Hide] - Eliminates duplicate/confusing UI elements * feat: add responsive image sizing and click-to-zoom functionality - Constrain all images to notebook width with max-width: 100% - Add support for PNG/JPEG images with base64 data - Implement click-to-zoom modal for all images - Add mobile-specific height constraints (300px max on mobile) - Include hover zoom icon indicator - Add overflow constraints to all output areas - Responsive SVG sizing with proper constraints - Smooth zoom modal with backdrop blur and close button - Better mobile experience with contained content * fix: clean up AI cell mobile interface - Remove 'Tap ⚡ to send' text from mobile chat input - Make model selection dropdown visible and clickable on mobile - Cleaner mobile AI interface focused on the essentials - Model selection now works consistently across desktop and mobile * fix: make mobile AI model status clickable while keeping header badge on desktop - Keep header model badge for desktop (hidden sm:block) - Make bottom status bar model text clickable on mobile - Add hover state for better mobile UX (color transition) - Maintains clean mobile chat interface with functional model switching - Best of both worlds: status bar info + clickable functionality * feat: modernize to Tailwind v4 standards - Add @tailwindcss/vite plugin to vite.config.ts - Remove postcss.config.js (no longer needed with Vite plugin) - Remove tailwind.config.js (v4 uses CSS-first configuration) - Use v4 automatic content detection instead of content array - Should fix responsive utility issues by using proper v4 setup * feat: add debug toggle button in top navigation - Add debug bug button next to user profile (on the left) - Only shows in development mode (import.meta.env.DEV) - Uses Bug/BugOff icons from Lucide - Faded when off (opacity-30), darker when on (opacity-100) - Toggles FPS meter visibility - Clean integration in top nav bar
* feat: implement pointer-based responsive design - Add CSS media queries to detect touch vs mouse input devices - Touch devices get mobile layout regardless of screen size - Mouse devices get desktop layout with hover behaviors - Fix textarea font size jumping on desktop window resize - Apply pointer detection to Cell, AiCell, and SqlCell components - Maintain mobile-first responsive behavior with smart input detection * fix: eliminate mobile horizontal overflow in notebook container - Fix parent container padding causing mobile cells to extend beyond viewport - Change notebook container from 'p-3 sm:p-4' to 'px-0 py-3 sm:p-4' - Allows cells with negative margins to properly extend to screen edges - Remove unnecessary manual Tailwind responsive utilities - Clean solution: one line change fixes the core issue
- Add autoCapitalize='off', autoCorrect='off', autoComplete='off', spellCheck={false} to Code and SQL cell textareas - Prevents mobile Safari/browsers from capitalizing keywords like 'import' → 'Import' - Maintains normal text behavior for AI cells since they use natural language - Improves mobile coding experience without affecting desktop usage
…untimed#79) - Move LiveStoreProvider inside AuthGuard component - Prevents race condition where LiveStore connects before auth is validated - Fixes 'backend head > local head' error during boot - Auth token is now obtained after authentication state is confirmed - Resolves issue where client connects to existing backend data without proper auth context
* ensure that the prod env is setup before running deploy * include configuration of public vite vars in git
* document more for models to read * update AGENTS.md * more updates to AGENTS.md * more updates * declare deployment for agents * update agents, toss handoff * update ROADMAP
* Reshape README to focus on agentic notebook vision and user benefits * Rewrite README to tell a better story
- Add jsr:@runt/schema dependency to web-client, pyodide-runtime-agent, and root packages - Update all imports from '../../../shared/schema.js' to '@runt/schema' - Create packages/web-client/schema.ts as re-export for devtools plugin - Update vite.config.ts to use local schema re-export - Remove shared/schema.ts directory completely - Update documentation references in AGENTS.md, CONTRIBUTING.md, docs/, test/README.md - All 107 tests pass, builds successful The JSR package provides the same schema interface with zero-build-step imports and full TypeScript type inference across all packages.
* Simplify repository structure to single application - Remove pyodide-runtime-agent (moved to runt repo) - Move web-client to repository root - Move docworker to src/sync/sync.ts - Single package.json and .env configuration - Simplified development and build processes - All tests passing (36/36) * Update documentation for simplified repository structure - Updated README.md, DEPLOYMENT.md, CONTRIBUTING.md, AGENTS.md - Removed references to old packages/ structure - Updated development and deployment instructions - Clarified that Python runtime is now handled by @runt packages - All documentation now reflects single-application structure * Clean up docs/ directory - remove runtime-related documentation - Removed runtime-focused docs (moved to @runt repo): - runtime-agent-architecture.md - pyodide_cache.md - display-system.md - display-examples.md - ai-features.md - IMPLEMENTATION_SUMMARY.md - proposals/kernel-management.md - proposals/completion-system.md - proposals/mcp-integration.md - proposals/ai-tool-calling.md - Updated remaining docs for UI-focused architecture: - docs/README.md - reflects simplified structure - docs/TESTING.md - focuses on UI/sync testing (36 tests passing) - Kept UI/collaboration-focused docs: - ui-design.md, ui-enhancements-demo.md - ai-context-visibility.md (UI feature) - proposals/ai-context-controls.md (implemented) - proposals/updateable-outputs.md (UI concern) Documentation now focuses on notebook interface and real-time collaboration. Python execution and AI features documented in @runt repository. * Final cleanup of package references in remaining docs - Updated test/README.md for simplified structure and UI focus - Fixed DEPLOYMENT.md build command references - Updated examples/ai-context-demo.md to point to @runt packages - All documentation now reflects single-application structure - Repository is fully cleaned of old monorepo references * Add .env.example and update setup instructions - Created .env.example with required VITE_ environment variables - Updated README.md setup instructions to use .env.example - Updated CONTRIBUTING.md to reference .env.example - Provides clear template for users to copy to .env - Build warnings about missing VITE_LIVESTORE_SYNC_URL resolved * Fix wrangler port and add runtime script - Added [dev] port = 8787 to wrangler.toml for consistent local development - Added dev:runtime script using @runt JSR package: deno run --allow-all --env-file=.env "jsr:@runt/[email protected]" - Updated .env.example with NOTEBOOK_ID and runtime configuration - Updated README.md and AGENTS.md to mention available runtime script - Now users can run: NOTEBOOK_ID=notebook-id pnpm dev:runtime * remove HANDOFF * Simplify GitHub Actions CI for single-application structure - Combined all jobs into single CI job for efficiency - Removed monorepo complexity (separate build/test jobs) - Added sync worker validation with pnpm build:sync - Simplified to run: type-check, build, validate worker, test - Much faster and cleaner for single-application structure * Add simplified deployment workflow and update docs - Created .github/workflows/deploy.yml for automated Cloudflare deployment - Single job that tests, builds, and deploys both web client and worker - Uses environment protection and manual trigger option - Updated DEPLOYMENT.md with correct workflow example - Removed outdated sequential deployment patterns - Much cleaner for single-application structure
- Fixed 'pnpm deploy' command that was using workspace-specific functionality - Added separate deploy:worker and deploy:web commands for clarity - Updated deploy command to run both web and worker deployment - Updated GitHub Actions workflow to use correct deployment commands - Updated DEPLOYMENT.md documentation with working commands - Now 'pnpm deploy' properly deploys both services
…to runtimes (runtimed#88) * Update runtime command to use deno run and change terminology from kernels to runtimes - Replace pnpm dev:runtime with deno run command for @runt/pyodide-runtime-agent - Update UI text from 'Kernel Status' to 'Runtime Status' - Change variable names from kernelCommand to runtimeCommand - Update help text to use 'runtime' terminology instead of 'kernel' - Runtime agent command now uses direct JSR package execution * Update variable names from kernel to runtime terminology - activeKernel → activeRuntime - hasActiveKernel → hasActiveRuntime - kernelHealth → runtimeHealth - kernelStatus → runtimeStatus - getKernelHealth → getRuntimeHealth - showKernelHelper → showRuntimeHelper - copyKernelCommand → copyRuntimeCommand - kernelCommand → runtimeCommand Schema-dependent names (tables.kernelSessions, KernelSessionData, kernelType) remain unchanged until schema package is updated. * Add TODO comments for remaining schema terminology updates Marks the remaining schema-dependent terminology that needs updating: - kernelSessions → runtimeSessions - KernelSessionData → RuntimeSessionData - kernelType → runtimeType All user-facing terminology and local variables now use 'runtime' consistently.
* Concatenate consecutive stdout/stderr outputs into single ANSI text areas - Add groupConsecutiveStreamOutputs utility function that merges consecutive stream outputs of the same type (stdout/stderr) - Update Cell.tsx and AiCell.tsx to use the grouping function before rendering outputs - Add comprehensive tests with 9 test cases covering various edge cases - Preserves metadata and position from the first output in each group - Maintains separation between stdout and stderr outputs - Handles mixed output types correctly * Fix TypeScript errors in output grouping tests - Add required metadata field (set to null) for all OutputData test objects - All tests now pass with correct type definitions - Maintains test functionality while satisfying strict type requirements * update zed tasks for repo commands * update command displayed * more for the gitignore
* feat: add dynamic runtime command configuration - Add VITE_RUNTIME_COMMAND environment variable for customizable runtime commands - Extract runtime command generation into reusable utility functions - Update UI to show unified NOTEBOOK_ID=${id} prefix instead of --notebook= format - Remove hardcoded version numbers from default runtime command - Add comprehensive tests for runtime command generation logic - Update documentation and environment configuration This allows developers to customize their runtime commands for different environments (dev vs prod) while maintaining a consistent interface in the notebook UI. * update AGENTS.md I'm not sure how the model will respond to a Hitchhiker's Guide to the Galaxy reference in the middle of it, but might as well add it in for fun. * update agents.md some more
- Remove duplicate CodeMirrorEditor pattern - Use fixed overlay instead of Radix Dialog portal - Maintain separate editor instances without DOM movement - Add proper escape key and backdrop click handling - Simplify component architecture while preserving functionality
…runtimed#356) * Remove console logs from ExecutableCell component * Fix React Hook dependency warning in executeCell useCallback * Refactor ExecutableCell: move getCellStyling outside component and remove unnecessary cell type checks - Move getCellStyling function outside component as shared config - Remove redundant cell type checks since ExecutableCell only handles executable cells - Simplify conditional logic for play buttons, toolbars, and output sections - All 100 tests passing, lint clean * Enable groupConsecutiveStreams for all executable cell types - Remove AI cell exception for groupConsecutiveStreams setting - All executable cells (code, sql, ai) now group consecutive stream outputs - Protocol can produce deltas in all cell types, grouping improves readability - Maintains chat-bubble mobile style for AI cells - All 100 tests passing * Remove mobileStyle parameter from useCellOutputs for consistency - Remove mobileStyle option ('default' vs 'chat-bubble') from useCellOutputs hook - All cell types now use consistent output styling - Eliminates mobile-specific chat bubble styling for AI cells - Simplifies hook interface and reduces complexity - All 100 tests passing * Consolidate executeCell and executeAiPrompt into single execution function - Remove duplicate executeAiPrompt function - was functionally identical to executeCell - Both functions performed same operations: clear outputs, generate queue ID, emit executionRequested - Only difference was error message strings (trivial edge case) - Runtime system determines execution behavior from cell.cellType, not the calling function - Simplifies component logic and reduces code duplication - All execution paths now use single executeCell function * Pass executeCell directly to onExecute instead of wrapping in arrow functions - Remove unnecessary arrow function wrappers around executeCell calls - Pass executeCell directly to useCellKeyboardNavigation and PlayButton components - Cleaner, more direct function references - Eliminates redundant callback layer * Unify cell type selectors and status messages for consistency - Remove duplicate AiCellTypeSelector - CellTypeSelector handles all cell types - Unify status messages: 'Executing' instead of 'Generating AI response' - Simplify tooltip text: 'Hide/Show results' instead of 'response' vs 'results' - Remove unnecessary AI-specific terminology that doesn't add value - Single component handles all cell type selection with proper styling
…imed#359) * Fix query reference stability and consolidate duplicate queries - Add stable queries for lastUsedAiModel$ and lastUsedAiProvider$ using .first({ fallback: () => null }) to prevent reference instability - Remove [0] || null pattern that was creating new references on every render - Remove duplicate cellsWithIndices$ query since it exists in @runt/schema - Update DebugPanel to use queries.cellQuery from @runt/schema instead of local - Clean up query consolidation between local and @runt/schema imports This improves code maintainability and moves toward resolving cascading re-render issues by ensuring stable query references. * Remove duplicate and unused queries, consolidate with @runt/schema - Remove duplicate queries that exist in @runt/schema: - cellIDs$, notebookMetadata$, runtimeSessions$ - outputDeltasQuery, getFinalContent - Delete entire cellOrdering.ts file (all queries were unused) - Delete outputDeltas.ts file (queries exist in @runt/schema) - Update DebugPanel and RichOutput to use queries from @runt/schema - Keep only lastUsedAiModel$ and lastUsedAiProvider$ in local queries as they provide reference stability fixes This significantly simplifies the codebase and eliminates query duplication between local and @runt/schema, making it much easier to reason about. * include commentary on where the queries are at
Create a new D1 table called settings with a generic key/value columns. The key has a unique constraint (primary key) so there can only be one setting row with that particular name. Use that to store the OIDC pem when using local development.
* refactor: move focused cell logic to LiveStore signal - Replace React useState with LiveStore signal for focused cell state - Maintains local-only, user-specific focus without LiveStore persistence - Improves performance with fine-grained reactivity - Add comprehensive tests for signal behavior - All existing functionality preserved, 106/106 tests pass * perf: optimize focus rendering by moving signal subscription to Cell level - Remove focusedCellId prop drilling from NotebookViewer -> CellList -> Cell - Each Cell component now subscribes directly to focusedCellSignal$ - Only cells that gain/lose focus re-render instead of all cells - Significantly reduces unnecessary re-renders on focus changes * refactor: replace hasEverFocusedRef with hasManuallyFocused signal - Remove React ref and replace with LiveStore signal for consistency - Remove unused useCellFocus hook that was replaced by signal-based focus - Cleaner separation between auto-focus and manual focus tracking - All focus state now managed through LiveStore reactivity system * refactor: move focus signals to module level for idiomatic LiveStore pattern - Replace React.useMemo signal creation with module-level signals - Follows LiveStore docs pattern more closely - Cleaner callback dependencies (no signal refs needed) - Global focus state makes sense for notebook app architecture
…ng (runtimed#364) * perf: optimize cell focus rendering by eliminating signal prop drilling - Move focus signals to dedicated signals/focus.ts module - Replace signal prop drilling with direct signal imports in CellList - Pass computed isFocused boolean to Cell components instead of signal - Eliminates unnecessary re-renders of all cells when focus changes - Only CellList and focus-changing cells re-render on focus transitions - All 106 tests continue to pass * delete unused signal
* take out cell movement * cleanup
…ted signals (runtimed#366) * refactor: convert contextSelectionMode to signal and organize AI-related signals - Create dedicated signals/ai-context.ts for AI-related UI signals - Move contextSelectionMode$ from focus.ts to ai-context.ts for better organization - Add lastUsedAiModel$ and lastUsedAiProvider$ signals to ai-context.ts - Replace React state with contextSelectionMode$ signal throughout component tree - Eliminate contextSelectionMode prop drilling across 6+ components - Fix broken import @/queries -> signals/ai-context.js - All 106 tests continue to pass * trim down further * remove unused
…ntimed#367) - Remove itemHeight, overscan, and threshold props from CellListProps interface - Clean up related comments about virtualization being ignored - These props were never actually used and were just dead weight in the interface - All 106 tests continue to pass
* feat: implement editor registry to eliminate focus navigation prop drilling - Create useEditorRegistry hook for centralized editor management - Add ref support to CodeMirrorEditor and Editor components with focus/cursor positioning - Replace prop-drilled focus navigation handlers with direct registry calls * Delete unused NotebookContext.tsx File is no longer needed after removing context in favor of prop drilling.
…on (runtimed#370) * refactor: eliminate onDeleteCell prop drilling with cell-level deletion - Implement cell-level delete handlers in ExecutableCell and MarkdownCell - Add differentiated deletion logic: keyboard (backspace) vs click triggers - Remove onDeleteCell from all component interfaces and prop chains - Remove centralized deleteCell function from NotebookViewer - Keyboard deletion focuses previous/next cell appropriately - Click deletion clears focus entirely - All 106 tests continue to pass * fix: remove duplicate imports and unused editor registry reference - Remove duplicate focus signal imports in ExecutableCell - Remove unused useEditorRegistry import and focusCell destructuring in NotebookViewer - All diagnostics now clean * refactor: extract shared useDeleteCell hook to eliminate code duplication - Create useDeleteCell hook with shared deletion logic - Remove 82 lines of duplicate code between ExecutableCell and MarkdownCell - Centralize focus management and delete logic in one place - Maintain same functionality with better maintainability
…timed#371) * refactor: eliminate onAddCell prop drilling with useAddCell hook - Create useAddCell hook handling cell creation with fractional indices - Use schema's createCellBetween for expert fractional index management - Remove onAddCell from all component interfaces (CellList, Cell, CellBetweener, etc) - Simplify interfaces: CellList down to 1 prop, Cell down to 2 props - Maintain AI model defaults, focus management, and all existing functionality - Remove unused addCell callback and imports from NotebookViewer - All 106 tests continue to pass * fix: resolve LiveStore signal lifecycle errors - Pass contextSelectionMode as prop instead of individual signal subscriptions - Prevents 'destroyed ref' errors when components unmount during cell creation - Cell component queries contextSelectionMode$ once and passes down to children - Eliminates multiple signal subscriptions that caused lifecycle conflicts
…Registry presentUsers (runtimed#372) - Fixed presentUsers array being recreated on every render in useUserRegistry - Reduced keystroke re-renders from 25+ components to just focused cell - Massive performance improvement for typing in cells - Root cause: presentUsers array reference instability causing NotebookViewer cascade
…med#373) - Add React.memo to Cell and CellBetweener components - Prevents unnecessary re-renders when parent CellList updates - Before: ALL cells + betweeners re-render on focus change - After: Only 2 cells re-render (those actually changing focus) - Significant performance improvement for cell navigation
The global types in cloudflare are different than the ones in node. This includes things like Request, Response, and more The old code is broken because it imports types for the browser, node, and cloudflare, creating a kind of merged environment. This is broken in ways that are both obvious and subtle. The short-term fix is to be extremely specific about cloudflare types. No more using the global Request object. Instead, everything needs to go through the backend/types file, where both the types and the global variables are defined and used. Since this fixes the remaining linter errors for test files, this change also enforces the test files pass typescript on the CI
* Don't inject the loading overlay on livestore dev tools * keep iframe server alive when vite does the (r) restart
* Add basic styles to iframe * Remove unneeded approval * wip: iframe generated from new vite config, run iframe with pm2 rather than vite plugin * remove unused outputs.css * wip: react in iframe * Add test command for iframe container * wip: render json in iframe * wip: group iframe outputs into single output * wip: move outputs from hook to component * Remove unused `enableTerminalOutput` arg/prop * Handle terminal output in outside of richoutput only * wip: move worker to dir * fix dev:runt command with removing package.json * wip: render list of outputs as json in iframe, fix tsconfig loading @/schema * border in iframe with tailwind * multiple outputs in iframe except for json * Remove unused ansi output duplicate * Remove `groupConsecutiveStreams` and straggler `mobileStyle` * Move more out of useCellOutputs * Add dataframe vars to iframe styles * Remove `enableErrorOutput` prop * Make html output use `dangerouslySetInnerHTML` because we're always in an iframe atm * Fix grouping outputs * Render directly vs. use iframe, mostly same components * Get tailwind styles from ansi output into iframe * remove outer styles from iframe * Add iframe build and test scripts * use localstorage for iframe toggle * Fix worker.ts type errors * fix paths * remove readme * fix paths * update preview user content wrangler url * Fix scripts not running * remove unneeded import * Remove ternary * Use `modern-normalize` to get some of what preflight used to do * Fix accidentally removing tailwind utils * Remove background color * Add fix for margin collapse * Let multimedia display render markdown * Add buffer to prevent scrollbars * shorter timeouts * Fix flashing output while rending cells during execution * co-locate iframe comms and make it type safe * Post-merge fixes * Only render code outputs in an iframe * put back outputs-container * Tweak normalize import * Add todos * Don't render json separately * Don't render json in iframe since we might already be in one * Make svg output a normal output * Initial move shared outputs to a directory * Combine `IframeOutput` into `MaybeCellOutputs` * wip * Refactor AI output handling by moving logic from `RichOutputContentWithAi` to `RichOutputContent` * Process deltas outside of the iframe * Move SingleOutput to shared * Move AI outputs to shared * Fix scrolling in iframe output Somehow this also causes recalculation and/or allows calculation to be more accurate * Add readme * Remove index.html light bundle for now * Remove react stuff from iframe wrangler worker * Remove staging from iframe deploy targets * restore tsconfig file * Add comment * Fix readme * Undo json output change * Remove debugging content * Throw if svg or HTML not in iframe * Undo change * Remove comment * Remove cell output caching * undo change * rename dev command * Remove redundant code `hasOutputs` in Markdown cell * Add vdom react portal notes to readme * Remove todos * Add comment * Remove iframe server plugin and update readme * remove worker dev script because it doesn't work * Forgot to merge * Fix type errors * Update wrangler.toml with preview env var
…opes (runtimed#381) * Implement POST /api/api-keys/ to create an API key with the proper scopes * Add resources to the local api keys
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
flex justify-center
so images are left justified (toss theflex justify-center
so images are left justified runtimed/anode#22)@runt
runtimes via deno and change terminology from kernel to runtimes (Rely on@runt
runtimes via deno and change terminology from kernel to runtimes runtimed/anode#88)pre
(run database migrations aspre
runtimed/anode#362)