diff --git a/apps/dev/app.json b/apps/dev/app.json deleted file mode 100644 index 269fb0745..000000000 --- a/apps/dev/app.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "icon": "🛠️", - "label": "Dev Tools" -} diff --git a/apps/dev/background.html b/apps/dev/background.html deleted file mode 100644 index a206b9cc4..000000000 --- a/apps/dev/background.html +++ /dev/null @@ -1,48 +0,0 @@ -// Dev App Background Service -// Scratch playground for testing submenu features - -AppServices.register('dev', { - initialize() { - // Test submenu with various item types - AppServices.submenus.set('dev', [ - { - id: 'workspace', - label: 'Workspace', - icon: '🏠', - href: '/app/dev' - }, - { - id: 'notifications', - label: 'Test Notifications', - icon: '🔔', - href: '/app/dev#notifications', - badge: 3 - }, - { - id: 'websocket', - label: 'WebSocket Events', - icon: '📡', - href: '/app/dev#websocket' - }, - { - id: 'facet-test', - label: 'With Facet', - icon: '🎯', - href: '/app/dev#facet', - facet: 'work' - } - ]); - - // Demo: Update badge dynamically every 5 seconds - let badgeCount = 3; - setInterval(() => { - badgeCount = (badgeCount % 10) + 1; - AppServices.submenus.upsert('dev', { - id: 'notifications', - badge: badgeCount - }); - }, 5000); - - console.log('[Dev] Background service initialized with test submenu'); - } -}); diff --git a/apps/dev/events.py b/apps/dev/events.py deleted file mode 100644 index b8d5554d0..000000000 --- a/apps/dev/events.py +++ /dev/null @@ -1,24 +0,0 @@ -# SPDX-License-Identifier: AGPL-3.0-only -# Copyright (c) 2026 sol pbc - -"""Dev app event handlers - debug logging for all Callosum events. - -This module demonstrates server-side event handling for apps. -Enable verbose logging to see events in the Convey log. -""" - -import logging - -from apps.events import EventContext, on_event - -logger = logging.getLogger(__name__) - - -@on_event("*", "*") -def log_all_events(ctx: EventContext) -> None: - """Log all Callosum events for debugging. - - This handler matches all events via wildcards and logs them at DEBUG level. - Useful for understanding event flow during development. - """ - logger.debug(f"[dev] Event: {ctx.tract}/{ctx.event} - keys: {list(ctx.msg.keys())}") diff --git a/apps/dev/maint/000_example.py b/apps/dev/maint/000_example.py deleted file mode 100644 index 79f3390bd..000000000 --- a/apps/dev/maint/000_example.py +++ /dev/null @@ -1,36 +0,0 @@ -# SPDX-License-Identifier: AGPL-3.0-only -# Copyright (c) 2026 sol pbc - -"""Example maintenance task demonstrating the maint interface. - -This no-op task shows the recommended patterns for maintenance scripts: -- Proper docstring (first line used as description in `sol maint --list`) -- Using setup_cli for consistent argument parsing and logging -- Progress output to stdout (captured in state file) -- Clean exit with appropriate exit code -""" - -import argparse -import logging - -from think.utils import setup_cli - -logger = logging.getLogger(__name__) - - -def main(): - parser = argparse.ArgumentParser(description=__doc__.split("\n")[0]) - setup_cli(parser) - - logger.info("Example maintenance task starting") - print("This is an example maintenance task.") - print("Real tasks would process journal data here.") - print("Use numeric prefixes (000_, 001_) to control execution order.") - logger.info("Example maintenance task complete") - - # Exit code 0 = success, non-zero = failure - # No explicit sys.exit(0) needed - implicit on clean return - - -if __name__ == "__main__": - main() diff --git a/apps/dev/workspace.html b/apps/dev/workspace.html deleted file mode 100644 index 1d86c5fbf..000000000 --- a/apps/dev/workspace.html +++ /dev/null @@ -1,673 +0,0 @@ - - -
-

🛠️ Dev Tools

- - -
-

Quick Tests

-

Click buttons to trigger different notification types

-
- - - - - - - -
-
- - -
-

Custom Notification

-

Build your own notification with custom parameters

-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
- -
-
- - -
-

Notification Management

-

Test dismissing and managing notifications

-
- - - - -
-
-
- - -
-

Stress Test

-

Generate multiple notifications to test stacking and performance

-
- - - -
-
- - -
-

Console Log

-

Notification IDs and events

-
-
- - -
-

Callosum Event Viewer

-

Raw callosum event stream with pause/resume

-
-
-
EVENTS
-
- - -
-
-
-
-
-
- - diff --git a/docs/APPS.md b/docs/APPS.md index c10204954..9e0049046 100644 --- a/docs/APPS.md +++ b/docs/APPS.md @@ -105,7 +105,7 @@ The workspace template is included inside the app container (`app.html`). **Reference implementations:** - Minimal: `apps/home/workspace.html` (simple content) -- Styled: `apps/dev/workspace.html` (custom CSS, forms, interactive JS) +- Styled: `apps/support/workspace.html` (custom CSS, forms, interactive JS) - Data-driven: `apps/todos/workspace.html` (facet sections, dynamic rendering) --- @@ -230,8 +230,6 @@ Submenus appear as hover pop-outs on menu bar icons. Items support `id`, `label` **Reference implementations:** - `apps/todos/background.html` - App icon badge with API fetch -- `apps/dev/background.html` - Submenu quick-links with dynamic badges - **Implementation source:** `convey/static/app.js` - AppServices framework, `convey/static/websocket.js` - WebSocket API --- @@ -478,7 +476,7 @@ Define one-time maintenance scripts that run automatically on Convey startup. **CLI:** `sol maint` (run pending), `sol maint --list` (show status), `sol maint --force` (re-run all) **Reference implementations:** -- Example task: `apps/dev/maint/000_example.py` - recommended patterns +- Example task: `apps/entities/maint/001_migrate_to_journal_entities.py` - real migration task demonstrating maint patterns - Discovery logic: `convey/maint.py` - `discover_tasks()`, `run_task()` --- @@ -530,7 +528,7 @@ Define server-side handlers that react to Callosum events. Handlers run in Conve **Reference implementations:** - Framework: `apps/events.py` - `EventContext` dataclass, decorator, discovery -- Example: `apps/dev/events.py` - Debug handler showing usage pattern +- Example: `apps/entities/events.py` - Entity activity tracking via event handlers --- @@ -726,7 +724,7 @@ Use these in your app-specific styles to respond to facet theme. **Best practice:** Scope styles with unique class prefix to avoid conflicts. -**Example:** `apps/dev/workspace.html` shows scoped `.dev-*` classes for all custom styles in its `