overseer disableable

This commit is contained in:
legop3
2026-06-18 23:26:16 -04:00
parent 80f1f82d6e
commit 8a556a3634
11 changed files with 211 additions and 33 deletions
@@ -40,7 +40,7 @@ function OverseerMemoryPopup({ memory, onClose }) {
);
}
export default function OverseerPreferencePanel() {
function OverseerPreferencePanelBody() {
const { identifySession } = useSessionActions();
const vote = useSessionSelector((state) => state.session?.overseerVote || null);
const overseerMemory = useSessionSelector((state) => state.overseerMemory || null);
@@ -102,3 +102,21 @@ export default function OverseerPreferencePanel() {
</>
);
}
export default function OverseerPreferencePanel() {
const visible = useSessionSelector((state) => {
const vote = state.session?.overseerVote;
// The server owns whether voting has any effect. The panel appears only
// when the autonomous vote-gated scheduler is active; direct-address mode
// is intentionally hidden because users invoke it by starting a chat
// message with the configured overseer name instead of voting it on.
return Boolean(vote?.votingEnabled);
});
if (!visible) {
return null;
}
return <OverseerPreferencePanelBody />;
}