mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 15:23:29 +00:00
chore(release): v1.28.22 — full sync survives dense histories; quieter document chrome
Google Health: the fullSync rollup-defer tracker collected its touched keys via a single spread push — one argument PER READING, so a multi-year heart-rate history (six figures of samples) overflowed the call stack and aborted the metrics collection mid-cycle, exactly on the accounts with the most data. A plain loop replaces the spread. Reported by a self-hoster; the v1.28.21 sync diagnostics confirmed every other read on that account healthy in one log line. Documents: the vault card's read-by-AI tag no longer takes its own line — a small glyph rides inline on the date-and-size row. The detail view drops the status bar under the preview entirely; with automatic reading on and nothing to review the whole block collapses, so the content starts straight with the document's fields. The provenance contract moves with it: the e2e specs now pin the card marker instead of the sheet pill, and the unmounted status-pill component is removed rather than left dead.
This commit is contained in:
1 parent
94ad48527e
commit
869f5e561b
18 files changed
+95
-209
No files matched your search
@@ -6,7 +6,6 @@ import type { DocumentSuggestionDto } from "@/lib/validations/inbound-documents"
|
||||
import {
|
||||
AiUnavailableHint,
|
||||
AssistSuggestionReview,
|
||||
ContentSearchStatus,
|
||||
DocumentSummaryPanel,
|
||||
} from "../document-ai-panels";
|
||||
|
||||
@@ -172,48 +171,3 @@ describe("<DocumentSummaryPanel>", () => {
|
||||
expect(html).toContain("read the document");
|
||||
});
|
||||
});
|
||||
|
||||
describe("<ContentSearchStatus>", () => {
|
||||
it("shows a calm not-searchable-yet pill before the auto-index lands", () => {
|
||||
const html = render(
|
||||
<ContentSearchStatus
|
||||
hasContentIndex={false}
|
||||
source={null}
|
||||
isPending={false}
|
||||
/>,
|
||||
);
|
||||
expect(html).toContain('data-slot="content-search-status"');
|
||||
expect(html).toContain('data-state="none"');
|
||||
expect(html).toContain("Not searchable yet");
|
||||
// A status, never a chore button.
|
||||
expect(html).not.toContain("<button");
|
||||
});
|
||||
|
||||
it("highlights an AI-read document distinctly from a locally-indexed one", () => {
|
||||
const aiRead = render(
|
||||
<ContentSearchStatus hasContentIndex source="vision" isPending={false} />,
|
||||
);
|
||||
expect(aiRead).toContain('data-state="ai-read"');
|
||||
expect(aiRead).toContain("Read by AI");
|
||||
expect(aiRead).toContain("text-primary");
|
||||
|
||||
const local = render(
|
||||
<ContentSearchStatus
|
||||
hasContentIndex
|
||||
source="local-pdf"
|
||||
isPending={false}
|
||||
/>,
|
||||
);
|
||||
expect(local).toContain('data-state="searchable"');
|
||||
expect(local).toContain("Searchable");
|
||||
expect(local).not.toContain("Read by AI");
|
||||
});
|
||||
|
||||
it("reflects a running read as an indexing state", () => {
|
||||
const html = render(
|
||||
<ContentSearchStatus hasContentIndex={false} source={null} isPending />,
|
||||
);
|
||||
expect(html).toContain('data-state="indexing"');
|
||||
expect(html).toContain("Making searchable…");
|
||||
});
|
||||
});
|
||||
@@ -80,9 +80,9 @@ describe("<DocumentAiSection>", () => {
|
||||
);
|
||||
expect(html).toContain('data-slot="document-read-ai"');
|
||||
expect(html).toContain("Read again");
|
||||
// The status pill reflects the AI-read provenance.
|
||||
expect(html).toContain('data-state="ai-read"');
|
||||
expect(html).toContain("Read by AI");
|
||||
// v1.28.22 — no status pill any more; the re-read label alone carries the
|
||||
// provenance in this block (the marker lives on the vault card).
|
||||
expect(html).not.toContain('data-state="ai-read"');
|
||||
});
|
||||
|
||||
it("shows the calm settings pointer (no 422 actions) when no provider is available", () => {
|
||||
@@ -98,8 +98,9 @@ describe("<DocumentAiSection>", () => {
|
||||
// Every AI action must be absent — never a 422-guaranteed tap.
|
||||
expect(html).not.toContain('data-slot="assist-suggest"');
|
||||
expect(html).not.toContain('data-slot="document-read-ai"');
|
||||
// But the searchable status pill still renders — auto-index is honest here.
|
||||
expect(html).toContain('data-slot="content-search-status"');
|
||||
// v1.28.22 — the status pill is gone entirely (provenance lives on the
|
||||
// vault card's meta row); only the calm hint renders here.
|
||||
expect(html).not.toContain('data-slot="content-search-status"');
|
||||
});
|
||||
|
||||
it("keeps a locally-indexed document honestly searchable without a provider", () => {
|
||||
@@ -112,8 +113,10 @@ describe("<DocumentAiSection>", () => {
|
||||
contentIndexSource: "local-pdf",
|
||||
}),
|
||||
);
|
||||
expect(html).toContain('data-state="searchable"');
|
||||
expect(html).toContain("Searchable");
|
||||
// v1.28.22 — the searchable pill is gone; only the calm provider hint
|
||||
// renders for a locally-indexed document without a provider.
|
||||
expect(html).not.toContain('data-state="searchable"');
|
||||
expect(html).toContain('data-slot="assist-unavailable"');
|
||||
expect(html).not.toContain("Read by AI");
|
||||
});
|
||||
|
||||
@@ -163,11 +166,10 @@ describe("<DocumentAiSection>", () => {
|
||||
expect(html).not.toContain('data-slot="assist-suggest"');
|
||||
expect(html).not.toContain("Summarise");
|
||||
expect(html).not.toContain("Show extracted text");
|
||||
// The header and the searchable status pill stay. The scoped chat entry
|
||||
// now lives in the detail-sheet header (a neutral Coach icon), not in this
|
||||
// section, so this block no longer owns a chat slot.
|
||||
expect(html).toContain('data-slot="document-ai-section"');
|
||||
expect(html).toContain('data-slot="content-search-status"');
|
||||
// v1.28.22 — with auto-read ON and nothing pending the WHOLE block
|
||||
// collapses: no chrome, no status pill; the sheet content starts straight
|
||||
// with the document fields under the preview.
|
||||
expect(html).toBe("");
|
||||
});
|
||||
|
||||
it("shows the manual AI action row when auto-read is off", () => {
|
||||
|
||||
Reference in new issue
Block a user