Skip to content

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

fix([issue-709]): drop misleading Ask 'Promote' inline action

[._.]/ Adam Eivyd71a78d61c55
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 3b4c00a20c..ebb846bebe 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -3,7 +3,7 @@
## Added
- **[issue-709] Review Hub "Needs Attention" queue** — the Review Hub now opens with a cross-domain queue that pulls everything currently waiting on you into one list: Brain inbox items that need classifying, Ask answers ready to promote, CoS tasks awaiting approval, unsent message drafts, critical/high health anomalies, and failed backups. The most urgent items sort to the top, each row opens straight to where you handle it, and you can dismiss anything you don't want to act on right now. A slow or unavailable source is noted instead of blocking the rest.
-- **[issue-709] Act on Review Hub items in place** — rows in the "Needs Attention" queue now carry an inline action so you can clear them without leaving the page: mark a Brain inbox item done, promote an Ask answer, or approve a waiting CoS task or message draft. The row drops away the moment it's handled. Items with no one-click resolution (health anomalies clear when the condition does; a failed backup is retried from Backup settings) keep their open-and-dismiss controls.
+- **[issue-709] Act on Review Hub items in place** — rows in the "Needs Attention" queue now carry an inline action so you can clear them without leaving the page: mark a Brain inbox item done, or approve a waiting CoS task or message draft. The row drops away the moment it's handled. Items that need a choice or have no one-click resolution (promoting an Ask answer to a note/task/goal, health anomalies that clear when the condition does, a failed backup retried from Backup settings) keep their open-and-dismiss controls.
- **[issue-708] Digital Twin personas** — give your twin named contexts — Professional, Casual, Family, or your own — each with instructions for how it should modulate voice and behavior. Activate one from the new Personas tab and your CoS agents adopt that context when they act on your behalf, while building your base identity stays unaffected. Create, edit, switch, and clear personas at any time.
- **[issue-708] Digital Twin values-alignment tests** — the Digital Twin's Test tab gains a second test mode: instead of only checking whether your twin *sounds* like you, it poses ethical dilemmas and grades whether the twin's choice is consistent with your ranked values. Each dilemma names the values at stake and ships an "aligned" and "misaligned" reference, and runs score against the values hierarchy from your Identity tab — so you can see, per model, where your twin holds your values and where it drifts. Ships a starter dilemma suite you can customize.
- **[issue-708] Test your twin as a persona** — the Digital Twin's Test tab can now run both the behavioral and values-alignment suites *as* a chosen persona instead of only the base twin: pick "Professional", "Casual", or any persona you've created and the suite embodies that context's instructions before answering. Each run is tagged in the history with the persona it used, so you can compare how the same model behaves across contexts. With no personas defined, the picker stays hidden and nothing changes.
diff --git a/client/src/pages/Review.jsx b/client/src/pages/Review.jsx
index 8492c38e7c..ca6250df8e 100644
--- a/client/src/pages/Review.jsx
+++ b/client/src/pages/Review.jsx
@@ -76,7 +76,8 @@ export default function Review() {
// Cross-domain live queue (M42 P5). These rows are derived live from each
// producer, not stored, so "dismiss" is a per-session client-side hide rather
- // than a server mutation — accept/promote actions are a follow-up.
+ // than a server mutation. Rows whose producer declares an inline action also
+ // get a server-backed accept/promote that resolves the underlying record.
const [queue, setQueue] = useState(null);
const [dismissedQueueIds, setDismissedQueueIds] = useState(() => new Set());
// Rows with an inline accept/promote in flight — disables the button so a
diff --git a/server/services/reviewQueue.js b/server/services/reviewQueue.js
index e7a5a3aa2b..af0cbf44be 100644
--- a/server/services/reviewQueue.js
+++ b/server/services/reviewQueue.js
@@ -92,10 +92,11 @@ const PRODUCERS = [
source: 'ask',
label: 'Ask answers',
drillTo: '/ask',
- action: 'Promote',
- async resolve(id) {
- return askConversations.setPromoted(id, true);
- },
+ // No inline action: "promote" for an Ask answer means saving a specific turn
+ // into Brain/Task/Goal (askConversations.promoteAskTurn), which needs the
+ // user to pick a target — so it can't be one-click. (setPromoted only *pins*
+ // the conversation against expiry, which the Ask UI labels "Pin", not the
+ // promote-to-target the queue title implies.) Drill into /ask to promote.
async gather() {
// Conversations with content that haven't been promoted to brain/task/goal.
const convs = await askConversations.listConversations({ limit: PER_SOURCE_LIMIT * 2 });
diff --git a/server/services/reviewQueue.test.js b/server/services/reviewQueue.test.js
index c8e71ec8c3..e854f18fdf 100644
--- a/server/services/reviewQueue.test.js
+++ b/server/services/reviewQueue.test.js
@@ -3,7 +3,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest';
// Mock every producer service the aggregator pulls from, so the test exercises
// only the normalization / sort / cap / degrade-on-failure logic.
const brain = { getInboxLog: vi.fn(), markInboxDone: vi.fn() };
-const askConversations = { listConversations: vi.fn(), setPromoted: vi.fn() };
+const askConversations = { listConversations: vi.fn() };
const cosTaskStore = { getCosTasks: vi.fn(), approveTask: vi.fn() };
const messageDrafts = { listDrafts: vi.fn(), approveDraft: vi.fn() };
const proactiveAlerts = { generateAlerts: vi.fn() };
@@ -153,15 +153,19 @@ describe('reviewQueue.buildQueue', () => {
expect(queue.sources.brain.shown).toBe(25);
});
- it('tags resolvable rows with an inline action verb, leaves health/backup without one', async () => {
+ it('tags resolvable rows with an inline action verb, leaves no-clean-resolve sources without one', async () => {
brain.getInboxLog.mockResolvedValue([{ id: 'b1', capturedText: 'classify', capturedAt: '2026-06-03T10:00:00.000Z' }]);
+ cosTaskStore.getCosTasks.mockResolvedValue({ awaitingApproval: [{ id: 'sys-1', description: 'approve me', priority: 'HIGH', createdAt: '2026-06-03T09:00:00.000Z' }] });
askConversations.listConversations.mockResolvedValue([{ id: 'a1', title: 'promote me', promoted: false, turnCount: 1 }]);
proactiveAlerts.generateAlerts.mockResolvedValue({ alerts: [{ type: 'disk', severity: 'critical', title: 'crit', detail: 'full', link: '/apps' }] });
backup.getState.mockResolvedValue({ status: 'error', error: 'disk full' });
const queue = await buildQueue();
expect(queue.items.find(i => i.source === 'brain').action).toBe('Done');
- expect(queue.items.find(i => i.source === 'ask').action).toBe('Promote');
- // Live-computed / settings-driven sources have no inline resolve.
+ expect(queue.items.find(i => i.source === 'cos').action).toBe('Approve');
+ // Ask "promote" needs a per-turn target choice (drill-down), and health
+ // (live-computed) / backup (settings-driven retry) have no clean local
+ // resolve — none of them carry an inline action.
+ expect(queue.items.find(i => i.source === 'ask').action).toBeUndefined();
expect(queue.items.find(i => i.source === 'health').action).toBeUndefined();
expect(queue.items.find(i => i.source === 'backup').action).toBeUndefined();
});
@@ -179,12 +183,6 @@ describe('reviewQueue.resolveQueueItem', () => {
expect(result).toMatchObject({ source: 'brain', id: 'brain:b1', resolved: true });
});
- it('dispatches ask rows to setPromoted(id, true)', async () => {
- askConversations.setPromoted.mockResolvedValue({ id: 'a1', promoted: true });
- await resolveQueueItem('ask:a1');
- expect(askConversations.setPromoted).toHaveBeenCalledWith('a1', true);
- });
-
it('dispatches draft rows to approveDraft', async () => {
messageDrafts.approveDraft.mockResolvedValue({ id: 'd1', status: 'approved' });
await resolveQueueItem('drafts:d1');
@@ -197,8 +195,10 @@ describe('reviewQueue.resolveQueueItem', () => {
expect(brain.markInboxDone).toHaveBeenCalledWith('b:1:2');
});
- it('rejects an unknown source with a 400', async () => {
+ it('rejects sources without an inline resolve (ask/health/backup) and unknown sources with a 400', async () => {
+ await expect(resolveQueueItem('ask:a1')).rejects.toMatchObject({ status: 400 });
await expect(resolveQueueItem('health:x')).rejects.toMatchObject({ status: 400 });
+ await expect(resolveQueueItem('backup:last-run')).rejects.toMatchObject({ status: 400 });
await expect(resolveQueueItem('nope:x')).rejects.toMatchObject({ status: 400 });
});