transmission, extracted into plugins/transmission — the platform half
Sixth extraction, straight after photos. Everything transmission now lives at gitea.officer.dev/plugins/transmission. Deleted, not commented: the sidecar, the api router, the Transmission app (28 files including detail/ and dialogs/), the screen, the App.tsx route pair, the Dashboard barrel line, the usePageTitle rule, the AppRegistry wiring, the officerdev barrel re-exports, the permission registry entry, the hono.ts import and mount comments, and the app-store catalogue entry. No database change: transmission owns no tables. Its connection lives in service_connections, a core table it now depends on from outside — a real coupling, recorded in the plugin's own PLUGIN.md rather than left to be discovered. ── Test fixtures, repointed rather than deleted ── Transmission was the canonical `members: 'none'` fixture — a single-tenant daemon with no user concept — across three app-store test files. slskd has the identical shape, so the assertions moved there. Deleting them would have quietly dropped coverage of the no-members install path along with the plugin, which is the same trap the vault extraction hit with `members: 'invite'`. ── Vocabulary swept, per the runbook ── Six screens and two App.tsx comments pointed at `/photos` or `/transmission` as the worked example of the Workspace/Panel shape. Both are plugins now, so those pointers dangled at code no longer in the tree. Repointed at /command-hq and /soulseek, which are core. bunx tsgo clean. 1080 pass / 0 fail. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import { WorkspaceView } from 'officerdev';
|
||||
import { useDashboardState } from 'state/useDashboardState';
|
||||
import { defaultLayout } from './defaultLayout';
|
||||
|
||||
// /calendar uses the Workspace/Panel system (like /transmission): the calendar list on the left, the
|
||||
// /calendar uses the Workspace/Panel system (like /command-hq): the calendar list on the left, the
|
||||
// selected calendar's agenda on the right. Both panels read the officer-caldav sidecar through the
|
||||
// /api/caldav auth proxy, which holds no DAV credentials of its own.
|
||||
//
|
||||
|
||||
@@ -4,7 +4,7 @@ import { WorkspaceView, DEFAULT_GITEA_SECTION, giteaSectionPath, isGiteaSection
|
||||
import { useDashboardState } from 'state/useDashboardState';
|
||||
import { defaultLayout } from './defaultLayout';
|
||||
|
||||
// /gitea uses the Workspace/Panel system (like /transmission): a section nav on the left and the section view
|
||||
// /gitea uses the Workspace/Panel system (like /command-hq): a section nav on the left and the section view
|
||||
// on the right. Both talk to the officer-gitea sidecar through the /api/gitea auth proxy, which holds no
|
||||
// Gitea credentials of its own — the instance URL and the access token live in the sidecar.
|
||||
//
|
||||
|
||||
@@ -4,7 +4,7 @@ import { DEFAULT_INVOICES_SECTION, invoicesSectionPath, isInvoicesSection, Works
|
||||
import { useDashboardState } from 'state/useDashboardState';
|
||||
import { defaultLayout } from './defaultLayout';
|
||||
|
||||
// /invoices uses the Workspace/Panel system (like /transmission and /offscale): the section nav on the
|
||||
// /invoices uses the Workspace/Panel system (like /command-hq): the section nav on the
|
||||
// left, the section itself on the right. Both panels talk to the officer-invoiceshelf sidecar through the
|
||||
// /api/invoiceshelf auth proxy — the InvoiceShelf URL, its Sanctum token and the company header live in the
|
||||
// sidecar and never reach the browser.
|
||||
|
||||
@@ -4,7 +4,7 @@ import { WorkspaceView, DEFAULT_SOULSEEK_SECTION, soulseekSectionPath, isSoulsee
|
||||
import { useDashboardState } from 'state/useDashboardState';
|
||||
import { defaultLayout } from './defaultLayout';
|
||||
|
||||
// /soulseek uses the Workspace/Panel system (like /photos): a section nav (soulseek-nav) on the left and
|
||||
// /soulseek uses the Workspace/Panel system (like /command-hq): a section nav (soulseek-nav) on the left and
|
||||
// a section view (soulseek-view) on the right, both reading `:section` from the URL. Deeper selection —
|
||||
// which search, which peer — is the query string. Both talk to slskd through the /api/slskd auth proxy.
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { WorkspaceView, DEFAULT_MONITOR_SCOPE, monitorScopePath, isMonitorScope
|
||||
import { useDashboardState } from 'state/useDashboardState';
|
||||
import { defaultLayout } from './defaultLayout';
|
||||
|
||||
// /system-monitor uses the Workspace/Panel system (like /photos): the scope list on the left, the scope
|
||||
// /system-monitor uses the Workspace/Panel system (like /command-hq): the scope list on the left, the scope
|
||||
// itself on the right. Which scope is open is `:scope` in the URL, not a panel channel.
|
||||
|
||||
export const SystemMonitorScreen = () => {
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
import { Navigate, useParams } from 'react-router';
|
||||
import type { LayoutNode } from 'officerdev';
|
||||
import {
|
||||
WorkspaceView,
|
||||
DEFAULT_TRANSMISSION_SECTION,
|
||||
transmissionSectionPath,
|
||||
isTransmissionSection,
|
||||
} from 'officerdev';
|
||||
import { useDashboardState } from 'state/useDashboardState';
|
||||
import { defaultLayout } from './defaultLayout';
|
||||
|
||||
// /transmission uses the Workspace/Panel system (like /offscale): a filter nav on the left and the section
|
||||
// view on the right. Both talk to the officer-transmission sidecar through the /api/transmission auth proxy,
|
||||
// which holds no Transmission credentials of its own — the RPC URL and any Basic auth live in the sidecar.
|
||||
//
|
||||
// The open section is :section in the URL and the torrent filters are query params, so both panels read the
|
||||
// URL with useParams/useSearchParams instead of passing state between themselves over a channel. This screen
|
||||
// backs both /transmission and /transmission/:section and is the single place that decides what an absent or
|
||||
// bogus section means.
|
||||
|
||||
export const TransmissionScreen = () => {
|
||||
const { section } = useParams();
|
||||
const workspace = useDashboardState<LayoutNode>('screens/transmission', defaultLayout);
|
||||
|
||||
// Bare /transmission, or a section that doesn't exist, resolves to a canonical URL rather than rendering a
|
||||
// default while the address bar says something else — the nav highlight is derived from the URL.
|
||||
if (!isTransmissionSection(section)) {
|
||||
return <Navigate to={transmissionSectionPath(DEFAULT_TRANSMISSION_SECTION)} replace />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="h-full w-full pt-2">
|
||||
<WorkspaceView
|
||||
workspace={workspace}
|
||||
locked
|
||||
appTypes={{ allowed: ['transmission-nav', 'transmission-view'], fallback: 'transmission-view' }}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import type { LayoutNode } from 'officerdev';
|
||||
|
||||
export const defaultLayout: LayoutNode = {
|
||||
type: 'group',
|
||||
id: 'transmission-root',
|
||||
direction: 'horizontal',
|
||||
children: [
|
||||
{ node: { type: 'panel', id: 'transmission-nav', appType: 'transmission-nav' }, size: 22 },
|
||||
{ node: { type: 'panel', id: 'transmission-view', appType: 'transmission-view' }, size: 78 },
|
||||
],
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
export * from './TransmissionScreen';
|
||||
@@ -4,7 +4,7 @@ import { WorkspaceView, DEFAULT_WALLET_SECTION, walletSectionPath, isWalletSecti
|
||||
import { useDashboardState } from 'state/useDashboardState';
|
||||
import { defaultLayout } from './defaultLayout';
|
||||
|
||||
// /wallet uses the Workspace/Panel system (like /transmission): the wallet list and section nav on the left,
|
||||
// /wallet uses the Workspace/Panel system (like /command-hq): the wallet list and section nav on the left,
|
||||
// the section itself on the right. Both talk to the officer-wallet sidecar through the /api/wallet auth
|
||||
// proxy, which holds no key material of its own — seeds live encrypted in the sidecar and are decrypted
|
||||
// there only for the length of an unlock window.
|
||||
|
||||
@@ -16,7 +16,6 @@ export * from './Contacts';
|
||||
export * from './Soulseek';
|
||||
export * from './CommandHQ';
|
||||
export * from './Jellyfin';
|
||||
export * from './Transmission';
|
||||
export * from './Gitea';
|
||||
export * from './Invoices';
|
||||
export * from './Wallet';
|
||||
|
||||
Reference in New Issue
Block a user