feat: scitex-ui/app integration — all workspace apps consume shared packages#117
Open
ywatanabe1989 wants to merge 29 commits intodevelopfrom
Open
feat: scitex-ui/app integration — all workspace apps consume shared packages#117ywatanabe1989 wants to merge 29 commits intodevelopfrom
ywatanabe1989 wants to merge 29 commits intodevelopfrom
Conversation
Phase 0 - Infrastructure: - Add scitex-ui Vite resolve alias (auto-discovered from pip) - Add @scitex/ui npm dependency (file link) - Add scitex-ui to Vite server.fs.allow Phase 1 - Manifest v2 with privileges: - Bump all 9 manifests to schema v2.0.0 - Add privileges array to each app (type, scope, reason) - Add privileges field to ModuleConfig dataclass - Support both schema v1.0.0 and v2.0.0 in registry Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace inline confirm-modal implementation with re-export stub that delegates to scitex-ui's canonical implementation. Existing @/components/confirm-modal imports continue working. window.scitexConfirm global preserved for non-module scripts. This proves the component migration pattern for Phase 3. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace inline data-table index with re-export stub delegating to scitex-ui's canonical implementation. All existing imports via @/components/data-table continue working unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Core resizer classes (HorizontalResizer, VerticalResizer, BaseResizer) now re-exported from scitex-ui. Auto-init and workspace-specific logic (htmx:afterSettle, panel collapse) remains in scitex-cloud. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Manifest: bump to schema v2.0.0, include privileges field - React scaffold: add scitex-ui Vite alias discovery - React scaffold: add @scitex/ui npm dependency - Vite config: add server.fs.allow for scitex-ui New apps now consume scitex-ui components out of the box. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Manifest: add standalone, standalone_command, standalone_port fields - Manifest: frontend_type now reflects actual choice (html/react) - Generate pyproject.toml with scitex_modules entry point - Apps can now work both standalone and as scitex-cloud extensions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace duplicated path resolution logic with scitex_app.paths: - read_manifest → resolve_manifest - resolve_dev_project_dir → resolve_user_project_dir - _find_partial → find_partial_template - validate_dev_repo → validate_project_structure + parse_dev_module_name DRY: removes ~40 lines of duplicated code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Documents component migration flow, manifest schema v2, builtin apps, and future AI chat extraction plan. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the inline context-zoom implementation with a re-export stub from scitex-ui. All consumers keep their existing import paths. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add scitex-ui, scitex-app, scitex-plt, scitex-audio, scitex-dev volume mounts to docker_dev compose (django, celery_worker, celery_beat) - Set SCITEX_UI_STATIC env var for reliable Vite alias resolution - Move scitex-app editable install outside sentinel guard - Re-export bootstrapContextZoom from scitex-ui Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Simplifies context-zoom-init.ts by delegating standard zone registration to scitex-ui's bootstrapContextZoom (MutationObserver + indicator badge). Custom Monaco and PDF zones still registered directly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…mory-per-child) Workers auto-restart after 100 tasks or when exceeding 500MB memory. Prevents memory leaks from accumulating over time. Configured in both docker-compose command args and Django settings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove mail_admins handler from django, django.request, and django.security loggers. Errors still logged to file but no longer flood admin inbox with EXTERNAL IP error emails. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tex-ui data-h-resizer
Port 18 HTML templates from the legacy WorkspacePanelResizer system
(data-panel-resizer, data-target, data-direction) to the unified scitex-ui
resizer system (data-h-resizer, data-left, data-right, data-most-left/right).
Templates migrated:
- Shell partials: workspace_{ai,worktree,viewer,apps}_pane, global_ai_panel
- Workspace shell: shell.html (2 resizers)
- App-level: console (2), scholar_base, clew, tools (3), figrecipe
- Public: tools (3), run-stats (2)
- Docs: ts-resizer, ts-util-keyboard (text references)
Also updated:
- keyboard-shortcuts.ts: query [data-h-resizer] instead of [data-panel-resizer]
- resizer.css: added .h-resizer--shell for absolute-positioned shell resizers
- Comment references in writer-app-init.ts, panel-toggle.ts, UIManager.ts
Legacy _workspace-panel-resizer/ code still exists but finds 0 elements.
Will be removed in follow-up cleanup commit.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All templates now use the unified scitex-ui resizer system (data-h-resizer).
The legacy WorkspacePanelResizer code is no longer needed.
Removed:
- static/shared/ts/components/_workspace-panel-resizer/ (5 files, 906 lines)
- static/shared/ts/components/workspace-panel-resizer.ts (barrel re-export)
- Vite entry point 'shared/workspace-panel-resizer'
- {% vite_script %} tags loading legacy module
Updated comment references in:
- zen-mode.ts, global-ai-chat.ts, vis-panel-toggle.ts, UIComponents.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Mark panel-resizer.css as legacy with clear notes on what's still used - Remove workspace-panel-resizer.test.ts (tests deleted source code) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Context zoom now targets content areas only: - AI panel: zoom applies to .scitex-ai-body (not whole sidebar) - Module pane: zoom applies to .pane-content (not whole pane) - Title bars/headers stay at normal size during zoom E2E test fixes: - Update module URLs from legacy /writer/ to canonical /apps/writer/ - Add legacy redirect assertions (301 tests) - Fix static file test to not follow redirects Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The vis module was renamed to figrecipe. Update test to use /apps/figrecipe/ instead of /apps/vis/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…egate to figrecipe._django Phase 4+5 of figrecipe clean docking: - Delete old VisEditor TS code (_vis/, _vis-editor/, .legacy/) — 178 files - Delete old CSS (vis/, editor-inline) — 35 files - Delete duplicated Python views/api handlers (figrecipe._django has these) - Delete duplicated services (plot_renderer, gallery, figz, pltz, stats) - Delete old tests for deleted code - Delete old templates (gallery.html, vis_partial.html, includes/) - Simplify editor.html to React-only mount point - Update URLs to delegate directly to figrecipe._django.views - Fix Vite React plugin preamble error (exclude scitex-ui TSX from Fast Refresh) - Add esbuild jsx:automatic for excluded files - Update fetch override to use /apps/figrecipe/ paths - Rename FigrecipeMountPoint.tsx → .ts (no JSX used) figrecipe_app is now a ~25 file thin stub: apps.py, skill.py, manifest.json, models/, migrations/, urls/ (2 files + __init__), views/__init__.py, templates/editor.html, static/ts/_figrecipe-bridge/ (4 files) All 19 E2E tests pass. React editor renders in workspace. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The figrecipe React editor CSS was only imported in main.tsx (standalone mode). When mounted via the bridge in scitex-cloud, the CSS was missing. Import all figrecipe editor stylesheets in the bridge init entry point. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The figrecipe._django API handlers need a working_dir parameter to resolve recipe files. Add thin wrapper that injects the current user's project path before delegating to figrecipe._django.views.api_dispatch. This is the ONE thin wrapper scitex-cloud needs — translating "current user's project" to a filesystem path for figrecipe. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…yling The plot type selector buttons had light backgrounds because scitex-ui's selector-nav.css wasn't loaded in embedded mode. Import the bundled app.css from scitex-ui which includes all app-level component styles. Shell CSS is NOT imported — scitex-cloud templates already handle that. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The import was using an absolute filesystem path that didn't resolve. Changed to alias-based path: "scitex-ui/css/app.css" which properly resolves through vite.config.ts alias mapping. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…edirects The /apps/figrecipe-react/ path was a legacy standalone React SPA mount. All figrecipe traffic now goes through /apps/figrecipe/ which properly delegates to figrecipe._django with project context injection. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The React plugin preamble workaround was removed — scitex-ui files are now excluded from the React plugin, and FigrecipeMountPoint uses .ts extension with React.createElement instead of JSX. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The template was sending a URL-style path (/user/project) but the figrecipe API expects a filesystem path. Removing it lets the server-side _inject_project_context() provide the correct path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The React editor uses file-based storage via figrecipe._django, not Django ORM models. Alpha stage — no data to preserve. Dropped: JournalPreset, ScientificFigure, FigurePanel, Annotation, FigureVersion, FigureExport, PltzBundle, FigzBundle, FigzPanel, UserStylePreset. Migration 0006 handles table deletion. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
No Celery tasks exist in figrecipe_app (services were moved to figrecipe pip package). The dedicated log handler and logger are also no longer needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Describes how scitex-cloud discovers, validates, and mounts apps generically without importing app-specific code. Covers ModuleConfig, URL mounting, context injection, manifest schema, and validation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner
Author
|
Quality triage note (mamba-quality-checker-mba): DIRTY (merge conflicts) + 2 failing CI checks, last update 2026-03-21 (~3 weeks stale). Rebase against current main is required before this can be evaluated. If the work has been absorbed into smaller PRs, please close with |
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
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.
Summary
scitex-ui(frontend components) andscitex-app(backend SDK)scitex_app.paths) with 28 testsdev_app_loaderrefactored to usescitex_app.pathsTest plan
npm run buildpasses (verified after each component migration)pytest tests/test__paths.py— 28 tests passing@/components/imports continue working via re-export stubs🤖 Generated with Claude Code