codeburn/app/renderer/sections/Plugins.module.css
iamtoruk 747e6a619e feat(desktop): complete plugin-era UI with details, install flow, settings, and team registry
Implement five missing D1-D3 components for full plugin era desktop support:

1. PluginDetails modal (sections/PluginDetails.tsx): Display full plugin manifest with all syncAttributes disclosures verbatim, spanKinds, commands, and on-disk sections loaded via pluginInfo. Defensive rendering for unknown fields.

2. InstallFlow stepper modal (sections/InstallFlow.tsx): Three-step flow for plugin installation - Step 1 source selection (org name input or folder via chooseDirectory), Step 2 installation with spinner and CLI error display verbatim, Step 3 success confirmation with "View details" button. Special handling for no-sync-config errors.

3. Plugin row actions (update sections/Plugins.tsx): Add Details, Verify, and Remove action buttons to plugin list. Remove action shows confirm modal naming plugin. Wired to CLI bridge calls.

4. Settings > Sharing pane (sections/SettingsSharing.tsx): Complete automatic sync configuration UI within Settings panes. Empty state with "Set up automatic sync" flow: cadence selection (daily/hourly) + work-matching toggle -> disclosure text via syncAutoEnable(accept:false) -> scrollable display -> Accept flow. Active state displays fingerprint (truncated), acceptedAt, cadence, work-matching, receipts list. Drift detection with "Review and re-accept" button. Always-visible "Stop automatic sync" danger button.

5. Team tab registry (components/TeamRegistry.tsx): Detect "teams.*" keys in payload plugins record; render Team section in nav when present. v1 renderers for teams.week (spend card) and teams.status (status link to teams.codeburn.app). Unknown keys fallback rendered. schemaVersion > 1 displays update prompt.

All components reuse existing app patterns (card/list/button/modal styles, CSS tokens, no new dependencies). Tests added for component row states, disclosure flow, and Team tab detection. All gates pass: root 3839 tests, app 614 tests, typecheck clean, build succeeds.
2026-08-28 06:59:50 -07:00

234 lines
3.7 KiB
CSS

.container {
padding: 1rem;
flex: 1;
overflow-y: auto;
}
.container h1 {
margin: 0 0 1.5rem;
font-size: 1.5rem;
font-weight: 600;
}
.error {
padding: 0.75rem 1rem;
margin-bottom: 1rem;
background: var(--color-error-bg);
border: 1px solid var(--color-error-border);
border-radius: 4px;
color: var(--color-error-text);
font-size: 0.875rem;
}
.empty {
text-align: center;
padding: 2rem;
color: var(--color-text-secondary);
}
.empty button {
margin-top: 1rem;
padding: 0.5rem 1rem;
background: var(--color-action);
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
.list {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.row {
padding: 0.75rem 1rem;
border: 1px solid var(--color-border);
border-radius: 4px;
background: var(--color-bg-secondary);
display: flex;
justify-content: space-between;
align-items: center;
}
.row[data-status="rejected"] {
background: var(--color-error-bg);
border-color: var(--color-error-border);
}
.info {
flex: 1;
}
.name {
font-weight: 600;
color: var(--color-text);
margin-bottom: 0.25rem;
}
.reason {
font-size: 0.875rem;
color: var(--color-text-secondary);
margin-top: 0.25rem;
}
.caps {
display: flex;
gap: 0.5rem;
margin-top: 0.5rem;
font-size: 0.75rem;
}
.caps span {
padding: 0.25rem 0.5rem;
background: var(--color-bg-hover);
border-radius: 3px;
color: var(--color-text-secondary);
}
.actions {
display: flex;
gap: 0.5rem;
align-items: center;
}
.actions button {
padding: 0.35rem 0.75rem;
font-size: 0.875rem;
border: 1px solid var(--line);
border-radius: 4px;
background: var(--panel);
color: var(--ink);
cursor: pointer;
transition: all 0.2s;
}
.actions button:hover:not(:disabled) {
background: var(--hover);
border-color: var(--ink);
}
.actions button:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.modalBackdrop {
position: fixed;
inset: 0;
z-index: 1000;
display: grid;
place-items: center;
padding: 24px;
background: rgba(8, 10, 14, 0.56);
}
.modal {
position: relative;
width: min(600px, 100%);
max-height: 80vh;
overflow-y: auto;
border: 1px solid var(--line);
border-radius: 12px;
background: var(--panel);
color: var(--ink);
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28), 0 3px 12px rgba(0, 0, 0, 0.16);
}
.modalClose {
position: absolute;
top: 10px;
right: 10px;
z-index: 1;
width: 28px;
height: 28px;
padding: 0;
border: 0;
border-radius: 7px;
background: transparent;
color: var(--mut);
font: inherit;
font-size: 24px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.modalClose:hover {
background: var(--hover);
color: var(--ink);
}
.modalContent {
padding: 24px;
}
.modalContent h2 {
margin: 0 0 1rem;
font-size: 1.25rem;
font-weight: 600;
}
.modalContent h3 {
margin: 1.5rem 0 0.75rem;
font-size: 1rem;
font-weight: 600;
}
.modalContent p {
margin: 0.5rem 0;
font-size: 0.9375rem;
line-height: 1.5;
}
.description {
color: var(--mut);
font-size: 0.875rem;
}
.section {
margin: 1rem 0;
padding: 0.75rem;
background: var(--fill);
border-radius: 4px;
}
.section ul {
margin: 0.5rem 0;
padding-left: 1.5rem;
}
.section li {
margin: 0.5rem 0;
font-size: 0.875rem;
}
.section strong {
color: var(--ink);
font-weight: 600;
}
.disclosure {
font-size: 0.75rem;
color: var(--mut);
font-style: italic;
margin-top: 0.25rem;
}
.spinner {
display: inline-block;
width: 40px;
height: 40px;
border: 3px solid var(--line);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}