Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: bound form fields and use responsive desktop rows
[._.]/ Adam Eivyaa460b5312ca
diff --git a/client/src/AGENTS.md b/client/src/AGENTS.mdindex e6a8dd6afb..bb3fe9e35f 100644--- a/client/src/AGENTS.md+++ b/client/src/AGENTS.md@@ -9,6 +9,7 @@ These apply to React/Vite client code. Universal constraints (functional program- **Mobile responsive** - all pages should be mobile responsive friendly. **A `grid-cols-N` with N > 3 and no `…:grid-cols-*` anywhere in the same class string is a bug**, not a style nit: at 360px a four-up stat bar gives each card ~65px of outer width, so its label wraps to five lines and the whole above-the-fold region is unreadable. Give text-bearing cards a narrow phone default and let the viewport opt into the wide layout (`grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-4`); a widened *gap* (`gap-4 sm:gap-6`) is not a column breakpoint. A grid of square thumbnails or heatmap cells may stay four-plus wide on a phone, but it still needs a column breakpoint so the desktop isn't stuck at the phone count. Enforced tree-wide by `client/src/responsiveGridConventions.test.js`, which carries the allowlist for the few grids that really are frozen N-across (a seven-day month grid, the fixed five-trait Big Five bars).- **A shared primitive that bakes in `inline-flex` must yield it to a caller's own display utility.** Tailwind v4 emits display utilities in alphabetical order, so `.inline-flex` lands AFTER `.hidden` in the stylesheet and wins at equal specificity: a `<Pill className="hidden sm:inline-flex">` stayed visible at every width, and the responsive variant it was paired with did nothing. `Pill` handles this (see `OWN_DISPLAY` in `components/ui/Pill.jsx`); `InfoTooltip`, `CopyableId`, and `ProvenanceChip` still interpolate `className` after a hardcoded `inline-flex` and need the same treatment the first time one of them is given a `hidden md:` call site. Primitives baking `flex`/`grid` are not exposed — those sort BEFORE `.hidden` and lose to it correctly.- **A fixed-width popover carries a viewport clamp** - an absolutely-positioned panel whose width is fixed at 256px or more (`w-64` and up, or the same size as an arbitrary `w-[19rem]`) must also carry `max-w-[calc(100vw-1rem)]`. `Layout`'s root shell is `overflow-x-hidden`, so anything wider than the viewport is *clipped away*, not made scrollable: a `w-96` filter panel anchored `right-3` on a 360px phone puts its whole left column of controls permanently off-screen with nothing to scroll to. The `calc(100vw-1rem)` form (not `90vw`) is the standard because it holds an 8px gutter at every width instead of a proportional one that collapses on small screens. Enforced tree-wide by `client/src/popoverClampConventions.test.js`.+- **Size form fields for their content.** Short selects, numeric inputs, and related settings should share rows when the container has room, then stack on narrow screens or drawers. Prefer wrapping grids with bounded columns (for example `grid-cols-[repeat(auto-fit,minmax(min(100%,18rem),24rem))]`) over full-page-width controls. Keep labels and help text with their fields, preserve DOM/tab order, and leave prose editors and long paths room to work. Avoid global input width limits; compact toolbars and narrow panels have different needs.- **Above the fold** - keep actionable content and info above the fold and design pages for maximum information and access without scrolling- **No hardcoded localhost** - use `window.location.hostname` for URLs; app accessed via Tailscale remotely- **Chrome floating over media uses `.port-media-overlay`** - a label, status bar, badge, or control panel sitting on top of an image, a video, or a 3D canvas takes its surface and ink from the theme (`.port-media-overlay`, or `.port-media-overlay-strong` for a small label directly on photography; `.port-media-overlay-item` for its buttons, `.port-media-overlay-divider` for its separators — all defined in `index.css`, which carries the mechanism and the rule for picking between this, `.always-dark`, and the OpenWorld HUD remap). **Don't write `bg-black/NN` + `text-white`/`text-gray-N00` for this** — day mode remaps the text to the theme's dark ink while the black scrim stays black, so the label renders dark-on-black. Older overlays outside the 3D/Three.js pages still carry that idiom (migration tracked in #3796), so match the new convention rather than the nearest neighbor.diff --git a/client/src/components/ProviderModelSelector.jsx b/client/src/components/ProviderModelSelector.jsxindex f65314cae8..ad9c79b6cb 100644--- a/client/src/components/ProviderModelSelector.jsx+++ b/client/src/components/ProviderModelSelector.jsx@@ -197,9 +197,11 @@ export default function ProviderModelSelector({: surviving;if (filteredSurviving !== effort) onEffortChange(filteredSurviving);};- // `row` was sized for two selects; the effort control makes it three, which is- // unreadable at phone width — stack until `sm` when it's showing.- const rowClass = showEffort ? 'flex flex-col sm:flex-row sm:items-center gap-2' : 'flex items-center gap-2';+ // Use available container space, including narrow drawers on desktop. Bound+ // labeled fields so a lone provider does not stretch across the whole page.+ const rowClass = compact+ ? (showEffort ? 'flex flex-col sm:flex-row sm:items-center gap-2' : 'flex items-center gap-2')+ : 'grid grid-cols-[repeat(auto-fit,minmax(min(100%,16rem),24rem))] items-start gap-2';const wrapperClass = layout === 'stacked' ? 'flex flex-col gap-1' : rowClass;return (<div className={wrapperClass}>diff --git a/client/src/components/cos/tabs/schedule/MaintenanceRunForm.jsx b/client/src/components/cos/tabs/schedule/MaintenanceRunForm.jsxindex 80ca66a433..6f6e7c059d 100644--- a/client/src/components/cos/tabs/schedule/MaintenanceRunForm.jsx+++ b/client/src/components/cos/tabs/schedule/MaintenanceRunForm.jsx@@ -142,27 +142,29 @@ export default function MaintenanceRunForm({ schedule, apps = [], providers = []return (<div className="mt-3 space-y-3 text-sm">- <label htmlFor="maintenance-run-app" className="block">- App- <select id="maintenance-run-app" value={appId} disabled={busy} onChange={event => setAppId(event.target.value)} className="mt-1 w-full bg-port-bg border border-port-border rounded p-2 text-white">- <option value="">Select an app</option>- {apps.filter(app => app.archived !== true).map(app => <option key={app.id} value={app.id}>{app.name}</option>)}- </select>- </label>- <label htmlFor="maintenance-run-mode" className="block">- Audit mode- <select id="maintenance-run-mode" value={mode} disabled={busy} onChange={event => { setMode(event.target.value); setConsent(false); }} className="mt-1 w-full bg-port-bg border border-port-border rounded p-2 text-white">- <option value="file-issues">File issues</option>- <option value="fix">Audit and fix</option>- </select>- </label>- {mode === 'file-issues' && <label htmlFor="maintenance-run-claims" className="block">- Issue handling- <select id="maintenance-run-claims" value={String(claimBetweenAudits)} disabled={busy} onChange={event => { setClaimBetweenAudits(event.target.value === 'true'); setConsent(false); }} className="mt-1 w-full bg-port-bg border border-port-border rounded p-2 text-white">- <option value="true">Resolve issues between audits</option>- <option value="false">Leave issues open for review</option>- </select>- </label>}+ <div className="grid grid-cols-[repeat(auto-fit,minmax(min(100%,18rem),24rem))] gap-3">+ <label htmlFor="maintenance-run-app" className="block min-w-0">+ App+ <select id="maintenance-run-app" value={appId} disabled={busy} onChange={event => setAppId(event.target.value)} className="mt-1 w-full bg-port-bg border border-port-border rounded p-2 text-white">+ <option value="">Select an app</option>+ {apps.filter(app => app.archived !== true).map(app => <option key={app.id} value={app.id}>{app.name}</option>)}+ </select>+ </label>+ <label htmlFor="maintenance-run-mode" className="block min-w-0">+ Audit mode+ <select id="maintenance-run-mode" value={mode} disabled={busy} onChange={event => { setMode(event.target.value); setConsent(false); }} className="mt-1 w-full bg-port-bg border border-port-border rounded p-2 text-white">+ <option value="file-issues">File issues</option>+ <option value="fix">Audit and fix</option>+ </select>+ </label>+ {mode === 'file-issues' && <label htmlFor="maintenance-run-claims" className="block min-w-0">+ Issue handling+ <select id="maintenance-run-claims" value={String(claimBetweenAudits)} disabled={busy} onChange={event => { setClaimBetweenAudits(event.target.value === 'true'); setConsent(false); }} className="mt-1 w-full bg-port-bg border border-port-border rounded p-2 text-white">+ <option value="true">Resolve issues between audits</option>+ <option value="false">Leave issues open for review</option>+ </select>+ </label>}+ </div><p className="text-xs">{mode === 'fix'? 'Fix findings in each audit; finish with documentation and one final claim pass.': claimBetweenAudits ? 'Claim passes resolve the backlog before the next audit.' : 'File findings for review; run documentation last. No claim jobs.'}</p>diff --git a/client/src/components/settings/TelegramTab.jsx b/client/src/components/settings/TelegramTab.jsxindex 589a9941b3..ba91cfddb3 100644--- a/client/src/components/settings/TelegramTab.jsx+++ b/client/src/components/settings/TelegramTab.jsx@@ -172,39 +172,41 @@ export function TelegramTab() {</div>)}- <div className="space-y-1">- <label htmlFor={botTokenId} className="block text-sm text-gray-400">Bot Token</label>- <div className="flex gap-2">+ <div className="grid grid-cols-[repeat(auto-fit,minmax(min(100%,18rem),28rem))] gap-4">+ <div className="space-y-1">+ <label htmlFor={botTokenId} className="block text-sm text-gray-400">Bot Token</label>+ <div className="flex gap-2">+ <input+ id={botTokenId}+ type={tgShowToken ? 'text' : 'password'}+ value={tgToken}+ onChange={e => setTgToken(e.target.value)}+ className="flex-1 min-w-0 bg-port-bg border border-port-border rounded-lg px-3 py-2 text-sm text-white focus:outline-none focus:border-port-accent"+ placeholder={tgStatus?.hasToken ? '••••••••••• (configured)' : 'Paste bot token from @BotFather'}+ />+ <button+ onClick={() => setTgShowToken(!tgShowToken)}+ aria-label={tgShowToken ? 'Hide bot token' : 'Show bot token'}+ className="inline-flex items-center justify-center min-w-[40px] min-h-[40px] px-3 py-2 bg-port-border hover:bg-port-border/70 text-white rounded-lg transition-colors shrink-0"+ >+ {tgShowToken ? <EyeOff size={16} /> : <Eye size={16} />}+ </button>+ </div>+ </div>++ <div className="space-y-1">+ <label htmlFor={chatIdId} className="block text-sm text-gray-400">Chat ID</label><input- id={botTokenId}- type={tgShowToken ? 'text' : 'password'}- value={tgToken}- onChange={e => setTgToken(e.target.value)}- className="flex-1 min-w-0 bg-port-bg border border-port-border rounded-lg px-3 py-2 text-sm text-white focus:outline-none focus:border-port-accent"- placeholder={tgStatus?.hasToken ? '••••••••••• (configured)' : 'Paste bot token from @BotFather'}+ id={chatIdId}+ type="text"+ value={tgChatId}+ onChange={e => setTgChatId(e.target.value)}+ className="w-full bg-port-bg border border-port-border rounded-lg px-3 py-2 text-sm text-white focus:outline-none focus:border-port-accent"+ placeholder="Message your bot /start to get your chat ID"/>- <button- onClick={() => setTgShowToken(!tgShowToken)}- aria-label={tgShowToken ? 'Hide bot token' : 'Show bot token'}- className="inline-flex items-center justify-center min-w-[40px] min-h-[40px] px-3 py-2 bg-port-border hover:bg-port-border/70 text-white rounded-lg transition-colors shrink-0"- >- {tgShowToken ? <EyeOff size={16} /> : <Eye size={16} />}- </button></div></div>- <div className="space-y-1">- <label htmlFor={chatIdId} className="block text-sm text-gray-400">Chat ID</label>- <input- id={chatIdId}- type="text"- value={tgChatId}- onChange={e => setTgChatId(e.target.value)}- className="w-full bg-port-bg border border-port-border rounded-lg px-3 py-2 text-sm text-white focus:outline-none focus:border-port-accent"- placeholder="Message your bot /start to get your chat ID"- />- </div>-<p className="text-xs text-gray-500">1. Message <code>@BotFather</code> on Telegram, send <code>/newbot</code>, copy the token, paste above, click Save.2. Message your bot <code>/start</code> — it will reply with your Chat ID.