feat(plugins): move the file explorer/viewer and the context editor into live plugins #35
Closed
gabrielvidal
wants to merge 0 commits from
files-plugins into main
pull from: files-plugins
merge into: gabrielvidal:main
gabrielvidal:main
gabrielvidal:fresh-context-plugin
gabrielvidal:remove-hooks-page
gabrielvidal:palette-plugins
gabrielvidal:linear-projects
gabrielvidal:agent-messaging
gabrielvidal:model-router
gabrielvidal:conv-card-layout
gabrielvidal:ask-more-options
gabrielvidal:agent-limits
gabrielvidal:generic-ui-strings
gabrielvidal:android-push-bridge
gabrielvidal:auto-translate
gabrielvidal:filter-chips
gabrielvidal:plugin-catalog
gabrielvidal:file-viewers
gabrielvidal:plugins-page-rework
gabrielvidal:hub-mcp-plugin
gabrielvidal:translation-plugin
gabrielvidal:scheduled-doors
gabrielvidal:cron-jobs-plugin
gabrielvidal:context-skills-plugin
gabrielvidal:worker-names
gabrielvidal:details-panel-perf
gabrielvidal:services-plugin-only
gabrielvidal:fix-test-env-leaks
gabrielvidal:bg-shells-plugin
gabrielvidal:feat-commits-plugins
gabrielvidal:fix-branch-line-tag-rows
gabrielvidal:retire-dead-leftovers
gabrielvidal:runner-into-harness-pi
gabrielvidal:retire-tool-proxy
gabrielvidal:new-project-policy-plugin-only
gabrielvidal:guest-jobs-sonnet
gabrielvidal:push-buttons-everywhere
gabrielvidal:mail-send-plugin
gabrielvidal:ui-polish-batch
gabrielvidal:command-palette-plugin
gabrielvidal:keyboard-shortcuts-plugin
gabrielvidal:prompt-shortcuts-plugin
gabrielvidal:matomo-site-grants
gabrielvidal:lab-chrome-plugin
gabrielvidal:performance-plugin
gabrielvidal:whats-new-plugin
gabrielvidal:skills-agents-plugin
gabrielvidal:goals-plugin-only
gabrielvidal:storage-server-side
gabrielvidal:plugin-scheduled-conversations
gabrielvidal:plugin-fences
gabrielvidal:handoff-plugin
gabrielvidal:plugin-commands
gabrielvidal:plugin-speed
gabrielvidal:cleanup-provider-harness
gabrielvidal:plugin-conversation-labels
gabrielvidal:plugin-plan-usage
gabrielvidal:fix-worker-harness-sync
gabrielvidal:plugin-gcloud-reauth
gabrielvidal:feat/plugin-cards-in-thread
gabrielvidal:feat/plugin-proxy-wake
gabrielvidal:unify-subagents-children
gabrielvidal:wave3d-frontend-typed-plugins
gabrielvidal:wave3c-sidecar-strict-plugins
gabrielvidal:wave3a-catalog-accounts-profiles
gabrielvidal:wave3b-pricing-usage-cutover
gabrielvidal:wave1a-typed-plugins
gabrielvidal:wave1b-sidecar-runtime
gabrielvidal:fix-ios-overlay-scroll
gabrielvidal:batch2-work-resources-core
gabrielvidal:batch2-apikeys
gabrielvidal:plugin-blue-green-deploy
gabrielvidal:plugin-ship
gabrielvidal:plugin-project-env
gabrielvidal:plugin-memories
gabrielvidal:plugin-activity
gabrielvidal:plugin-templates
gabrielvidal:plugin-desk-phone
gabrielvidal:batch1-platform
gabrielvidal:plugins-list-view
gabrielvidal:dash-plugins
gabrielvidal:pets-plugin
gabrielvidal:ha-push-channel
gabrielvidal:mail-agents
gabrielvidal:graph-fix
gabrielvidal:graph-plugin
gabrielvidal:services-plugin
gabrielvidal:left-to-do-plugin
gabrielvidal:plugins-gallery
gabrielvidal:home-conv-menu
gabrielvidal:meta-business
gabrielvidal:agy-rdrand
gabrielvidal:bg-lag
gabrielvidal:conv-load-perf
gabrielvidal:askform-instant
gabrielvidal:fix/drawer-menu-done-chip
gabrielvidal:pi-midrun-compaction
gabrielvidal:interrupt-menu-btn
gabrielvidal:authz
gabrielvidal:inkling
gabrielvidal:repo-plugins
gabrielvidal:work-sync
gabrielvidal:leftovers
gabrielvidal:fix/agy-guest-guard
gabrielvidal:feat/model-presets
gabrielvidal:scroll-back
gabrielvidal:feedback-bell
gabrielvidal:feat/movies-tool
gabrielvidal:feat/running-thread-padding
gabrielvidal:feat/drawer-filter-button-card-chat
gabrielvidal:burn-rate
gabrielvidal:guest-install
gabrielvidal:guest-usage
gabrielvidal:guest-palette
gabrielvidal:guest-form-links
gabrielvidal:form-open-buttons
gabrielvidal:clarifier-lean
gabrielvidal:auto-archive
gabrielvidal:guests-profile
gabrielvidal:conv-motion
gabrielvidal:share-target
gabrielvidal:terminal-sync
gabrielvidal:work-context-past
gabrielvidal:work-context-brief
gabrielvidal:enroll-codes
gabrielvidal:open-image-file
gabrielvidal:worker-uploads
gabrielvidal:conv-drawer-search
gabrielvidal:stack-motion-v3
gabrielvidal:notif-stack-fixes
gabrielvidal:home-motion
gabrielvidal:i18n-fr
gabrielvidal:local-electricity-cost
gabrielvidal:cache-pill-thread
gabrielvidal:cache-scenarios
gabrielvidal:fresh-start
gabrielvidal:msg-select
gabrielvidal:shortcuts-setup
gabrielvidal:ui-0-40-3
gabrielvidal:outbox-landing
gabrielvidal:resume-scope
gabrielvidal:conv-filter-range
gabrielvidal:fix-subagent-form-session
gabrielvidal:ask-form-integration
gabrielvidal:form-visual-options
gabrielvidal:watcher-perf
gabrielvidal:last-msg-summary
gabrielvidal:secret-fields
gabrielvidal:commit-review
gabrielvidal:summary-mode-fixes
gabrielvidal:service-tag-parser
gabrielvidal:clarifier
gabrielvidal:fetch-diet-2
gabrielvidal:fetch-diet
gabrielvidal:conv-look
gabrielvidal:pwa-links
gabrielvidal:tool-widgets
gabrielvidal:worker-autoupdate
gabrielvidal:usage-rings
gabrielvidal:opencode-harness
gabrielvidal:notif-diet
gabrielvidal:conv-resources
gabrielvidal:scheduled-tasks
gabrielvidal:profiles
gabrielvidal:notify-exact-cost
gabrielvidal:usage-measuring
gabrielvidal:guest-projects
gabrielvidal:usage-calibration
gabrielvidal:account-switch
gabrielvidal:multiuser-improve
gabrielvidal:form-groups
gabrielvidal:multiuser
gabrielvidal:motion-reel
gabrielvidal:dashboards-fixes
gabrielvidal:split-big-files
gabrielvidal:held-regex
gabrielvidal:subagent-interrupts
gabrielvidal:form-html
gabrielvidal:tokunia-video
gabrielvidal:settings-uniform
gabrielvidal:worker-ask-fix
gabrielvidal:worker-generic-mac
gabrielvidal:runner-shortcuts
gabrielvidal:notify-unify
gabrielvidal:perf-list-cache
gabrielvidal:mac-worker
gabrielvidal:model-switch
gabrielvidal:pipeline-paths
gabrielvidal:multi-account
gabrielvidal:feature-flags
gabrielvidal:qwen38-support
gabrielvidal:url-prompt
gabrielvidal:running-pages
gabrielvidal:homelab-tag
gabrielvidal:root-project
gabrielvidal:or-models
gabrielvidal:deploying-loader
gabrielvidal:worktree-diff
gabrielvidal:conv-tags
gabrielvidal:tags-page
gabrielvidal:agents-page
gabrielvidal:icon-picker-shortcuts
gabrielvidal:conv-cta
gabrielvidal:stamp-refine
gabrielvidal:post-task-cache
gabrielvidal:post-tidy-completed
gabrielvidal:form-badge
gabrielvidal:hooks-delay-seconds
gabrielvidal:cost-dashboard
gabrielvidal:plan-forms
gabrielvidal:form-mobile
gabrielvidal:guidelines-dag
gabrielvidal:skills-view
gabrielvidal:navbar-hold
gabrielvidal:spawnbox-status
gabrielvidal:hold-editable-expand
gabrielvidal:drawer-transparent
gabrielvidal:hold-fix
gabrielvidal:hold-editable
gabrielvidal:charroll-bump
No Reviewers
Labels
No items
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
gabrielvidal (Gabriel Vidal)
Clear assignees
No Assignees
gabrielvidal
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gabrielvidal/ai-agent#35
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Moves the file explorer/viewer (
/file/*, the Project page's Files card, what a message's file chip opens) and the owner's context tree + editor (/_/*, the Files drawer's tree) out of the core into two live plugins,file-explorerandcontext-editor(plugins PR: gabrielvidal/ai-agent-plugins#23). Pair 1 of the migration Gabriel approved (formmigrate-files-context-dashboard-to-plugins_imhucu); the data moves behind scoped hub bridges, the old addresses redirect, and the core keeps no fallback UI.Key changes
backend/plugins/hubfiles.py:hostfiles.read(hub/host-file,host-files,host-files/recent, newhost-files/roots) answering as the caller;context.read(context/bundle,context/file) andcontext.write(PUT context/file, handler-only) owner-only. Newhostfiles.roots()./api/bundle,GET|PUT /api/file,/api/host-file,/api/host-files,/api/host-files/recent(+ schemas, orval models, authz entries, golden matrix)./api/host-file/rawstays (joinsMEDIA_PREFIXESfor frames).PluginSandboxFrame/PluginCustomPage):aiAgentPlugin.setRoute(r, {replace})+onRoute(cb)— a page that routes itself keeps its frame across address changes;download(url, name);back(fallback); plugin pages pad above the phone's floating composer (--spawn-drawer-h).HostFilePage,Editor,ProjectFiles,FileTree,FileRows,hostFiles.ts,tree.tsdeleted; file chips, the skill card's SKILL.md link and the dashboard rows go throughusePluginOpener("host-file" | "context-file");LegacyFileRedirectfor/file/*and/_/*(none active: a note naming the plugin + link to the catalogue); Files drawer/landing = shortcuts only; Project page passes{slug, isRoot, isWorker, keyFiles}toproject.detail.mock/filesPlugins.ts(both plugins' pages, slot, actions over the mock tree and context files;?mockFiles=0).test_hostfiles.pyroute section rewritten over HTTP through the bridge;test_files_plugin_bridge.py;opener.test.ts(legacy targets);routeBridge.test.ts(cleanRoute).CLAUDE.md(file chips + explorer section, new context editor section, perf/security notes),docs/plugins.md("Files as plugins", capability rows), mock README.Key decisions
~/homelab/~/worktreesfor guests,.env, keys,node_modules, a symlink out of the root, a symlink to a secret inside it, lab runtime state). Two tightenings:hostfiles.readis operator-approved (a guest-installed plugin can't hold it; guests reach it through the owner's managed plugin), and a paired machine's proxy token is refused on all three bridges — the tool-proxy door treats an owner's worker as the owner, which would have let e.g. a devbox read~/homelab; the retired routes never answered a machine (golden matrix:w.read/w.run✗). A guest's run token reads as the guest, like thecliscope could on/api/host-file.setRoute/onRouteinstead of reloads: registeringonRouteis the opt-in; without it a subpath/query change still rebuilds the frame (Services etc. unchanged). Needed so the editor keeps its tree and draft and the explorer doesn't flash on every folder.nav: "projects", a Files row above the project list), the closest to how Services was placed; the decisions didn't name a nav.page.files(its old core id); the explorer under its own default id.UpdateToast's "save your edits" hold is gone with the core editor; the plugin keeps drafts on the hub (written 800 ms after typing stops and on page hide), so a reload loses at most that.edits) are not carried over (rarely any; noted rather than migrated).Changelog
Test notes
Run on the EVOX2 (no Docker): backend modules each in bwrap with a throwaway
/data.test_*.pyon this branch vsorigin/main— 168/168 modules pass excepttest_typed_plugins.py::test_records_carry_kind, which is path-dependent (inspect_sourcemaps/home/…host paths; it passes from a/tmpcheckout of main, fails from a~/worktrees/~/projectscheckout, as noted before on main).test_hostfiles16,test_files_plugin_bridge9,test_authz_matrix,test_guests58 pass.tscclean; vitest 1104/1105 — the one failure isFreshContext.test.tsx(CacheExpiredNotice), failing on main too;vite buildandVITE_MOCK=1build OK.openapi.jsonre-dumped +gen:api: no diff.~/homelab, worktrees, raw route outside the grant → 404; context editor not active). Browser e2e: explorer navigation without frame reload + Back, relative markdown links; editor draft survives reload, ⌘S writes, draft dropped. Screenshots: desktop + phone, explorer, viewer kinds, project Files card, editor (clean/dirty/preview), Files drawer, guest views, redirects.FileChip.test.tsx/ opener tests; the mock's kitchen-sink thread didn't render the message in headless capture).git -C ~/projects/ai-agent-plugins pull;~/homelab/services/ai-agent/deploy.sh --detach && … --watch— startup seedsfile-explorerandcontext-editor; if either was installed before:ai-agent plugin reload file-explorer --approve,ai-agent plugin reload context-editor --approve. Pair 2 (context-skills dashboard) rebases on this branch and links viacontext-file{path}andhost-file.Screenshots
Merged into
mainase5a5dcdeby the auto-ship batch https://ai-agent.lab.gabvdl.xyz/conversation/91782f5a-872e-4531-8bde-f4031df38c26.Pull request closed