Repository navigation
Description
P2 · Reproduced locally at e3943c5f5c1e69c39309bb8f5b9cf5e63ce41672.
Home's Tasks ("… items need you") lists a task waiting for your review only when you are its named Reviewer. When a task has no named reviewer, its review falls back to the task's creator. The creator is asked: they get a Review requested bell, their board chip reads Waiting on you, and the board's Needs my review keeps the task. But Home does not list it and does not count it.
Reproduction
- As the owner, create a task assigned to editor A with no Reviewer. Create a second, identical task with Reviewer set to yourself (the control).
- As A, move both tasks to In review.
- As the owner, look at the bell, the board, Filter → Review → Needs my review, and Home → Tasks.
Expected: Home lists both tasks as Waiting for your review and counts both. The docs say Home "lists the open tasks assigned to you and those waiting for your review" (tasks.md:126), and so does index.md:42. The board treats both tasks as waiting on the owner.
Actual:
- The owner holds two unread Review requested bells.
- Both chips read Waiting on you, and Needs my review keeps both.
- Home → Tasks says "1 item needs you" and lists only the task with the named reviewer.
User impact
Home is where people pick up their own work. The default review target, the task's creator, is missing from it whenever nobody named a reviewer, and the count under Tasks is short. The same happens after Clear reviewer, which hands the review to the creator on purpose.
By reading the code, this also covers two paths that were not exercised here:
- the usual agent flow, where a task-agent run settles into In review and nobody named a reviewer;
- an erasure hand-over, which clears the designation.
The bell still leads to the task, but the list that should hold the person's open work does not.
Cause
- Home reads "waiting on my review" through
useTasksAcrossProjects({ reviewerId: myUserId, status: 'in_review' })(use-home-data.ts:127–131). - On the server that becomes
reviewer_user_id = ${reviewerId}(service.ts:2763), which is the stored designation. - The board decides on the pending review's
requestedForfirst (taskAwaitsMyReview, filter-tasks.ts:43–56). That is also whom the review gate asked.
The inverse also exists. A designated reviewer who can no longer act still sees the task on Home as "Waiting for your review", because Home follows the designation rather than the review; #3789 shows that case.
Suggested acceptance test
As the creator, check Home → Tasks in three cases:
- a task with no reviewer that its assignee moves to In review;
- a task with a named reviewer, after Clear reviewer;
- a task where the creator is the named reviewer (the control).
In each case, Home lists the task as Waiting for your review and counts it under "… need you", in the same way the board's Needs my review does. On the server, Home's read of "waiting on my review" follows the pending review's requestedFor.
Evidence: frozen output (proof-f6-home-review-fallback.cjs, one fresh organization)
A moves "Fallback review task" (no reviewer) to In review -> 200
A moves "Named reviewer task" (Reviewer = owner) to In review -> 200
setup: org pQsNtocwhmzhQUFBUhIfw2MVj4O78gn0 | owner [email protected]
owner bell rows: ["task_review_requested:UNREAD","task_status_changed:UNREAD","task_review_requested:UNREAD","task_status_changed:UNREAD"] | bell count = 4
owner board chips: ["Waiting on you","Waiting on you"]
owner board Needs my review keeps: {"fallback":1,"control":1}
CONFIRMED owner Home > Tasks lists "Fallback review task" = false
CONTROL owner Home > Tasks lists "Named reviewer task" = true | context: "Named reviewer task now RB-3 Waiting for your review Unread"
Home > Tasks text: "Tasks , 1 item needs you PROJECTS Review board TODAY Named reviewer task now RB-3 Waiting for your review Unread"
--- console/http log --- (none)
The control in the same run is the named-reviewer task, which Home lists as "RB-3 Waiting for your review". A second fresh organization gave the same result. The manual box TASK-F28 only checks a task "with you as its reviewer", that is, the named case.
Mocked boundary: none. Real SPA, backend and PostgreSQL. A moved the tasks through the task status door that the board uses.
Deduplication
Searched all 1,072 issues, in every state, for "Waiting for your review" and for Home combined with review and creator or fallback. None covers this. #3554 (merged) moved open reviews between people, but not Home's read. Found while auditing TALE-70's review paths, after an independent review of the stuck-review report pointed at the stored-designation read. No production system, real provider, mailbox or external delivery was used.
Local stack (loopback only)
- Source: a detached worktree of
e3943c5f5c1e69c39309bb8f5b9cf5e63ce41672(origin/main on 2026-09-28) withbun install --frozen-lockfile. The code named in this issue is unchanged on maine71775a8b(9 commits later). On main,home-panel.tsxbecame resizable, which does not change what Home lists, and the docs cited here changed only in other sections. - Databases: PostgreSQL 16.14 (embedded-postgres binaries) with pgvector 0.8.6 on
127.0.0.1;tale_app, andtale_knowledgewithvector. No pg_search (not involved). - Backend, from
services/platform:node --experimental-transform-types --import ./backend/node-loader.mjs backend/main.tswithROLE=all PORT=3005 SITE_URL=http://localhost:3000 NODE_ENV=development, an emptyTALE_CONFIG_DIR,TALE_CONFIG_BUILTIN_DIR=configs/platform/custom,TALE_ALLOW_OPEN_SIGN_UP=true,TALE_DEV_SEED_USER=1, locally generatedBETTER_AUTH_SECRET/ENCRYPTION_SECRET_HEX/INSTANCE_SECRET, and no object store. Egress is blocked:NODE_USE_ENV_PROXY=1 HTTP_PROXY=HTTPS_PROXY=http://127.0.0.1:9 NO_PROXY=127.0.0.1,localhost,::1. - SPA:
bun --bun vite build, thenTALE_BACKEND_URL=http://127.0.0.1:3005 bunx --bun vite preview --port 3000(the production-build E2E serving path; the boot-shell prerender step was skipped). - Browser: Chromium 141.0.7390.37 headless, driven by the worktree's
playwright-core1.58.2 withserviceWorkers: 'block',en-US, 1280×900. - Fixtures: each proof signs up its own accounts and organization through
POST /api/auth/sign-up/emailandPOST /api/auth/organization/create. Credentials carry fake secrets that nothing tests; no provider, mailbox or other external service is reachable. - Replay:
T70_ROOT=<dir> node <proof>.cjs, where<dir>/taleis the worktree and<dir>/evidence/receives the log; adjust the Chromium path inlib.cjs.
probes/proof-f6-home-review-fallback.cjs
// PROOF F6: Home's "waiting for your review" misses a review that falls back to the task's creator.
// T-fallback: the owner creates a task assigned to editor A with NO reviewer; A moves it to In review, so the
// review falls back to the creator (the owner), who is asked (bell) and sees "Waiting on you".
// T-control: the same, but the owner is named as Reviewer explicitly.
// Read, as the owner: the bell rows, the board chips, the board's Needs my review, and Home > Tasks.
// Mocked boundary: none (real SPA, backend, Postgres, /events).
const L = require('./lib.cjs'); const T = require('./tasklib.cjs');
const out = [];
const say = (...a) => { const s = a.map((x) => (typeof x === 'string' ? x : JSON.stringify(x))).join(' '); out.push(s); console.log(s); };
async function toggleNeedsMyReview(page) {
await page.getByRole('button', { name: /^Filter/ }).first().click();
const panel = page.getByRole('dialog', { name: 'Filters' });
await panel.waitFor();
const box = panel.getByRole('checkbox', { name: 'Needs my review' });
if (!(await box.isVisible())) await panel.getByRole('button', { name: 'Review' }).click();
await box.waitFor({ timeout: 5000 });
await box.click();
await L.sleep(800);
await page.keyboard.press('Escape'); await L.sleep(300); await page.keyboard.press('Escape'); await L.sleep(500);
}
(async () => {
const browser = await L.launch();
const log = [];
try {
const s = await T.setupReviewOrg(browser, 'f6home', { title: 'Unused starter task' });
const mk = async (title, reviewer) => {
const t = await L.api(s.o.ctx, 'POST', `/api/app/tasks?orgId=${s.o.orgId}`, { projectId: s.projectId, title, status: 'todo', assigneeType: 'user', assigneeId: s.a.userId });
if (reviewer) await L.api(s.o.ctx, 'POST', `/api/app/tasks/${t.body.taskId}?orgId=${s.o.orgId}`, { reviewerUserId: reviewer });
return t.body.taskId;
};
const fallback = await mk('Fallback review task', null);
const control = await mk('Named reviewer task', s.o.userId);
for (const id of [fallback, control]) {
const r = await L.api(s.a.ctx, 'POST', `/api/app/tasks/${id}/status?orgId=${s.o.orgId}`, { status: 'in_review' });
say('A moves', id === fallback ? '"Fallback review task" (no reviewer)' : '"Named reviewer task" (Reviewer = owner)', 'to In review ->', r.status);
}
say('setup: org', s.o.orgId, '| owner', s.o.email);
const page = await s.o.ctx.newPage();
L.watch(page, log);
await L.goto(page, T.boardUrl(s), 2500);
say('owner bell rows:', await T.notes(s.o, s.o.orgId), '| bell count =', await T.bell(page));
const chips = await page.locator('[aria-label^="Waiting on"]').evaluateAll((els) => els.map((e) => e.getAttribute('aria-label')));
say('owner board chips:', chips);
await toggleNeedsMyReview(page);
const nmr = { fallback: await page.getByRole('button', { name: 'Fallback review task', exact: true }).count(), control: await page.getByRole('button', { name: 'Named reviewer task', exact: true }).count() };
say('owner board Needs my review keeps:', nmr);
await toggleNeedsMyReview(page);
await L.goto(page, `/dashboard/${s.o.orgId}`, 2500);
await page.getByRole('radio', { name: 'Tasks' }).click();
await L.sleep(1500);
const nav = (await page.getByRole('navigation', { name: 'Home' }).innerText()).replace(/\s+/g, ' ');
const has = (t) => nav.includes(t);
say(`${has('Fallback review task') ? 'ok' : 'CONFIRMED'} owner Home > Tasks lists "Fallback review task" = ${has('Fallback review task')}`);
say(`${has('Named reviewer task') ? 'CONTROL' : 'unexpected'} owner Home > Tasks lists "Named reviewer task" = ${has('Named reviewer task')} | context: ${JSON.stringify(nav.match(/Named reviewer task[^A-Z]*[A-Z][^·]{0,40}/)?.[0] ?? '')}`);
say('Home > Tasks text:', JSON.stringify(nav.slice(nav.indexOf('Tasks'), nav.indexOf('Tasks') + 260)));
await L.shot(page, 'f6-owner-home-tasks');
} finally {
say('--- console/http log ---', log.length ? '' : '(none)');
for (const l of log) say(l);
L.fs.writeFileSync(L.path.join(L.ROOT, 'evidence/proof-f6-home-review-fallback.log'), out.join('\n') + '\n');
await browser.close();
}
})().catch((e) => { console.error(e); process.exit(1); });probes/tasklib.cjs
// Task-review helpers shared by the task probes: an owner and two editors of one fresh org, each in its own
// browser context (its own session cookies), with an org-wide project holding one task in To do.
const L = require('./lib.cjs');
async function setupReviewOrg(browser, label, opts = {}) {
const o = await L.freshOrg(browser, label);
const a = await L.addMember(browser, o, opts.aRole ?? 'editor', 'Ava Editor');
const b = await L.addMember(browser, o, opts.bRole ?? 'editor', 'Ben Editor');
const p = await L.api(o.ctx, 'POST', `/api/app/projects?orgId=${o.orgId}`, { name: opts.projectName ?? 'Review board', ...(opts.teamIds ? { teamIds: opts.teamIds } : {}) });
if (p.status !== 200) throw new Error(`project: ${p.status} ${JSON.stringify(p.body)}`);
const t = await L.api(o.ctx, 'POST', `/api/app/tasks?orgId=${o.orgId}`, { projectId: p.body.projectId, title: opts.title ?? 'Check the launch brief', status: 'todo' });
if (t.status !== 200) throw new Error(`task: ${t.status} ${JSON.stringify(t.body)}`);
return { o, a, b, projectId: p.body.projectId, taskId: t.body.taskId, title: opts.title ?? 'Check the launch brief' };
}
const boardUrl = (s) => `/dashboard/${s.o.orgId}/projects/${s.projectId}/tasks/board`;
/** The bell button's accessible name carries the unread count ("Notifications, 2 unread notifications"). */
async function bell(page) {
const label = await page.locator('button[aria-label^="Notifications"]').first().getAttribute('aria-label').catch(() => null);
const m = label && label.match(/(\d+) unread/);
return m ? Number(m[1]) : 0;
}
/** A user's task notifications in the org, newest first, as `kind:read|UNREAD`. */
async function notes(user, orgId) {
const r = await L.api(user.ctx, 'GET', `/api/app/collab/notifications?orgId=${orgId}`);
const list = r.body.rows ?? r.body.items;
if (!Array.isArray(list)) return [`(unexpected ${r.status}) ${JSON.stringify(r.body).slice(0, 200)}`];
return list.map((n) => `${n.type}:${n.read ? 'read' : 'UNREAD'}`);
}
/** The review chip(s) on the board ("Waiting on …"), or 'none'. Each proof board holds one task. */
async function chip(page) {
const c = page.locator('[aria-label^="Waiting on"], [aria-label="Needs review"]');
const labels = [];
for (let i = 0; i < (await c.count()); i++) labels.push(await c.nth(i).getAttribute('aria-label'));
return labels.length ? labels.join(' / ') : 'none';
}
async function openTask(page, s) {
await L.goto(page, `${boardUrl(s)}?task=${s.taskId}`, 1500);
await page.getByRole('dialog').waitFor();
}
/** In the open task dialog: pick a reviewer by visible name, or 'clear'. */
async function pickReviewer(page, who) {
const dlg = page.getByRole('dialog').first();
await dlg.getByRole('button', { name: 'Reviewer', exact: true }).click();
const list = page.getByRole('listbox', { name: 'Reviewer' });
await list.waitFor({ timeout: 5000 });
if (who === 'clear') {
await page.getByRole('button', { name: /Clear reviewer/ }).or(page.getByRole('option', { name: /Clear reviewer/ })).first().click();
} else {
await list.getByRole('option', { name: new RegExp(`^${who}`) }).first().click();
}
await L.sleep(1200);
return reviewerField(page);
}
/** The text the task dialog shows beside its Reviewer button (the designee's name, or No reviewer). */
async function reviewerField(page) {
return page.evaluate(() => {
const btn = document.querySelector('[role="dialog"] button[aria-label="Reviewer"]');
return btn ? (btn.parentElement.innerText || '').trim() : '(no Reviewer button)';
});
}
async function pickStatus(page, label) {
const dlg = page.getByRole('dialog').first();
await dlg.getByRole('button', { name: /^Status/ }).click();
await page.getByRole('listbox', { name: 'Status' }).getByRole('option', { name: new RegExp(`^${label}`) }).first().click();
await L.sleep(1200);
}
module.exports = { reviewerField, setupReviewOrg, boardUrl, bell, notes, chip, openTask, pickReviewer, pickStatus };probes/lib.cjs
// TALE-70 local audit probe helpers. Local stack only: SPA http://localhost:3000 (vite preview of the
// production build, proxying /api, /events, /dav to the backend on 127.0.0.1:3005). Every probe mints its
// own synthetic organization and accounts through the local sign-up door; nothing else is touched.
const path = require('node:path');
const fs = require('node:fs');
const ROOT = process.env.T70_ROOT || path.join(process.env.HOME, '.cache/t70');
const { chromium } = require(path.join(ROOT, 'tale/node_modules/playwright-core'));
const BASE = 'http://localhost:3000';
const ORIGIN = { origin: BASE };
const PW = 'TaleAudit!Passw0rd';
const SHOTS = path.join(ROOT, 'evidence/shots');
async function launch() {
return chromium.launch({
executablePath: '/opt/ms-playwright/chromium-1194/chrome-linux/chrome',
headless: true,
args: ['--disable-dev-shm-usage'],
});
}
async function newContext(browser, opts = {}) {
return browser.newContext({
baseURL: BASE,
serviceWorkers: 'block',
viewport: opts.viewport ?? { width: 1280, height: 900 },
locale: opts.locale ?? 'en-US',
colorScheme: opts.colorScheme ?? 'light',
reducedMotion: 'reduce',
});
}
async function api(ctx, method, url, data) {
const r = await ctx.request.fetch(url, { method, data, headers: ORIGIN });
const text = await r.text();
let body = text;
try { body = JSON.parse(text); } catch { /* keep text */ }
return { status: r.status(), body };
}
function stamp(label) { return `${label}-${Date.now().toString(36)}`; }
/** A fresh owner with a fresh organization (sign-up + organization/create + set-active). */
async function freshOrg(browser, label, opts = {}) {
const s = stamp(label);
const email = `t70-${s}@tale.test`;
const ctx = await newContext(browser, opts);
const su = await api(ctx, 'POST', '/api/auth/sign-up/email', { email, password: PW, name: `Owner ${label}` });
if (su.status !== 200) throw new Error(`sign-up ${email}: ${su.status} ${JSON.stringify(su.body)}`);
const org = await api(ctx, 'POST', '/api/auth/organization/create', { name: `T70 ${s}`, slug: `t70-${s}` });
if (org.status !== 200) throw new Error(`org create: ${org.status} ${JSON.stringify(org.body)}`);
await api(ctx, 'POST', '/api/auth/organization/set-active', { organizationId: org.body.id });
return { ctx, orgId: org.body.id, email, userId: su.body.user.id, stamp: s, name: `Owner ${label}` };
}
/** A second account added to the owner's organization with `role`, in its own browser context. */
async function addMember(browser, owner, role, name, opts = {}) {
const email = `t70-${owner.stamp}-${name.toLowerCase().replace(/[^a-z0-9]+/g, '-')}@tale.test`;
const ctx = await newContext(browser, opts);
const su = await api(ctx, 'POST', '/api/auth/sign-up/email', { email, password: PW, name });
if (su.status !== 200) throw new Error(`sign-up ${email}: ${su.status} ${JSON.stringify(su.body)}`);
const add = await api(owner.ctx, 'POST', `/api/app/members?orgId=${owner.orgId}`, { userId: su.body.user.id, role });
if (add.status !== 200) throw new Error(`add member ${role}: ${add.status} ${JSON.stringify(add.body)}`);
await api(ctx, 'POST', '/api/auth/organization/set-active', { organizationId: owner.orgId });
return { ctx, email, name, userId: su.body.user.id, memberId: add.body.memberId };
}
function watch(page, sink, tag = '') {
page.on('console', (m) => { if (['error', 'warning'].includes(m.type()) && !BENIGN.some((b) => b.test(m.text()))) sink.push(`${tag}[console.${m.type()}] ${m.text().slice(0, 300)}`); });
page.on('pageerror', (e) => sink.push(`${tag}[pageerror] ${String(e).slice(0, 300)}`));
page.on('response', (r) => { if (r.status() >= 400 && r.url().includes('/api/')) sink.push(`${tag}[http ${r.status()}] ${r.request().method()} ${r.url().replace(BASE, '')}`); });
}
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
/** One-line description of document.activeElement. */
const focusedDesc = (page) => page.evaluate(() => {
const e = document.activeElement;
if (!e || e === document.body) return 'BODY';
const name = (e.getAttribute('aria-label') || e.innerText || e.getAttribute('placeholder') || e.value || '').trim().split('\n')[0].slice(0, 60);
const role = e.getAttribute('role');
return `${e.tagName.toLowerCase()}${role ? `[role=${role}]` : ''} "${name}"`;
});
async function shot(page, name, opts = {}) {
fs.mkdirSync(SHOTS, { recursive: true });
const p = path.join(SHOTS, `${name}.png`);
await page.screenshot({ path: p, fullPage: opts.fullPage ?? false });
return p;
}
/** Horizontal overflow of the document and of every element wider than the viewport. */
const overflow = (page) => page.evaluate(() => {
const vw = document.documentElement.clientWidth;
const doc = document.documentElement.scrollWidth;
const wide = [];
for (const el of document.querySelectorAll('body *')) {
const r = el.getBoundingClientRect();
if (r.width > 0 && (r.right > vw + 1) && getComputedStyle(el).position !== 'fixed') {
// skip descendants of a horizontally scrollable ancestor (a table frame that scrolls on purpose)
let p = el.parentElement, clipped = false;
while (p && p !== document.body) {
const cs = getComputedStyle(p);
if (/(auto|scroll|hidden|clip)/.test(cs.overflowX)) { clipped = true; break; }
p = p.parentElement;
}
if (!clipped) wide.push(`${el.tagName.toLowerCase()}.${String(el.className).slice(0, 60)} right=${Math.round(r.right)}`);
}
}
return { viewport: vw, scrollWidth: doc, docOverflows: doc > vw + 1, wide: wide.slice(0, 8) };
});
/** Visible toasts (sonner region). */
const toasts = async (page) => (await page.locator('[role="region"] li').allInnerTexts()).map((s) => s.replace(/\s*\n+\s*/g, ' ').trim()).filter(Boolean);
/** Every toast shown since the page loaded (a MutationObserver installed before any script runs). */
const TOAST_RECORDER = () => {
window.__toasts = [];
const seen = new WeakSet();
const scan = () => {
for (const li of document.querySelectorAll('[role="region"] li')) {
if (seen.has(li)) continue;
const text = (li.innerText || '').replace(/\s*\n+\s*/g, ' ').trim();
if (text) { seen.add(li); window.__toasts.push(text); }
}
};
new MutationObserver(scan).observe(document, { subtree: true, childList: true, characterData: true });
};
async function recordToasts(ctx) { await ctx.addInitScript(TOAST_RECORDER); }
const allToasts = (page) => page.evaluate(() => window.__toasts || []);
// The /events SSE stream keeps the network busy, so never wait for networkidle.
async function goto(page, url, settleMs = 1200) {
await page.goto(url, { waitUntil: 'domcontentloaded' });
await page.locator('main').first().waitFor({ timeout: 15000 }).catch(() => {});
await sleep(settleMs);
}
// Harness artefacts (serviceWorkers: 'block', font preload hints, the route prefetcher's miss note).
const BENIGN = [/Service Worker registration blocked by Playwright/, /Service worker registration failed TypeError: Cannot read properties of undefined \(reading 'waiting'\)/, /was preloaded using link preload but not used/, /\[prefetch\] no 0\.5 row/];
module.exports = { recordToasts, allToasts, launch, newContext, api, freshOrg, addMember, watch, sleep, focusedDesc, shot, overflow, toasts, goto, BASE, ORIGIN, PW, ROOT, SHOTS, fs, path };
/** With a menu open, move keyboard focus with ArrowDown until the focused item matches `re`. */
async function focusMenuItem(page, re) {
await page.getByRole('menu').waitFor();
await sleep(150);
for (let i = 0; i < 12; i++) {
const cur = await focusedDesc(page);
if (/menuitem/.test(cur) && re.test(cur)) return cur;
await page.keyboard.press('ArrowDown');
await sleep(120);
}
throw new Error(`menu item ${re} never took focus`);
}
/** Inside an open dialog, Tab until the focused element matches `re`. */
async function tabTo(page, re, max = 12) {
for (let i = 0; i < max; i++) {
const cur = await focusedDesc(page);
if (re.test(cur)) return cur;
await page.keyboard.press('Tab');
await sleep(80);
}
throw new Error(`Tab never reached ${re}; at ${await focusedDesc(page)}`);
}
Object.assign(module.exports, { focusMenuItem, tabTo });
Activity
test(platform): prove Home lists reviews that fall back to the creator
test(platform): prove Home lists reviews that fall back to the creator