diff --git a/web/src/modules/decisions/DecisionDetail.tsx b/web/src/modules/decisions/DecisionDetail.tsx index f37c1fe5..19b53efa 100644 --- a/web/src/modules/decisions/DecisionDetail.tsx +++ b/web/src/modules/decisions/DecisionDetail.tsx @@ -17,9 +17,8 @@ import { TimeAgo } from "../../ui/atoms/TimeAgo"; import { ClaimPill, ClassifierLines, Disclosure, Facts, KindTag, RelatedList } from "./parts"; import { Refs } from "./Refs"; import { ExecLine } from "./ExecLine"; -import { AnswerNotice } from "./AnswerNotice"; import { DuplicateGroup, RiskList } from "./Group"; -import { localActions, ordered, refOf, useDecisionFilter, useDecisionList, useLocal, usePinned, useSelection, useUndo, type AnswerEntry } from "./state"; +import { localActions, ordered, refOf, useDecisionFilter, useDecisionList, useLocal, usePinned, useSelection, useUndo } from "./state"; import { WorkflowBox } from "./Workflow"; import { ItemThread } from "../item/ItemThread"; import { scrollToThreadEnd } from "../item/ItemDecisions"; @@ -37,29 +36,26 @@ export function DetailPanel({ user }: ViewProps) { const checked = list.filter((d) => loc.checked.has(d.id)); if (checked.length > 1) return ; - const just = loc.justAnswered.find((x) => x.id === id); const inList = list.find((x) => x.id === id); - const pinned = usePinned(id, !!inList || !!just); + const pinned = usePinned(id, !!inList); const d = inList ?? pinned ?? null; const idx = d ? list.indexOf(d) : -1; return (
- {data && d && ( + {data && idx >= 0 && ( {idx + 1} of {list.length} )}
go(list[idx - 1])} /> - = list.length - 1} onClick={() => go(list[idx + 1])} /> + = list.length - 1} onClick={() => go(list[idx + 1])} />
- {just && !d ? ( - - ) : d ? ( - go(list[idx + 1] ?? list[idx - 1], true)} /> + {d ? ( + ) : missing && item ? ( ) : ( @@ -103,14 +99,6 @@ function EmptyDetail({ count }: { count: number }) { ); } -function AnsweredNotice({ entry }: { entry: AnswerEntry }) { - return ( -
- -
- ); -} - function Section({ title, children }: { title: ReactNode; children: ReactNode }) { return (
diff --git a/web/src/modules/decisions/PhoneInbox.tsx b/web/src/modules/decisions/PhoneInbox.tsx index 0c0ccc8f..8ea31a98 100644 --- a/web/src/modules/decisions/PhoneInbox.tsx +++ b/web/src/modules/decisions/PhoneInbox.tsx @@ -9,7 +9,7 @@ import { InboxList, summaryLine } from "./InboxList"; import { DecisionsToolbar } from "./Toolbar"; import { ordered, useDecisionFilter, useDecisionList, useLocal, usePinned, useReselectOnFilter, useSelection } from "./state"; -/** Phone flow: one decision per screen with previous/next, filters in a sheet. */ +/** Phone flow: one decision per screen with previous/next, filters in a sheet. An answered decision stays on screen. */ export function PhoneInbox(props: ViewProps) { const { data, loading } = useDecisionList(); const { filter } = useDecisionFilter(); @@ -56,7 +56,7 @@ export function PhoneInbox(props: ViewProps) {
)} {detail &&
- {d ? go(list[idx + 1] ?? list[idx - 1], true)} pager={{ pos: `${idx + 1} of ${list.length}`, prev: idx > 0 ? () => go(list[idx - 1]) : undefined, next: idx < list.length - 1 ? () => go(list[idx + 1]) : undefined }} /> : missing && item ? :

Nothing waiting.

} + {d ? = 0 ? `${idx + 1} of ${list.length}` : "", prev: idx > 0 ? () => go(list[idx - 1]) : undefined, next: idx < list.length - 1 ? () => go(list[idx + 1]) : undefined }} /> : missing && item ? :

Nothing waiting.

}
}