mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 07:13:29 +00:00
fix(01-16): remove redundant score and summary presentation
- keep useful Today prose without repeating the ring score - remove stored-summary regeneration and Health Score notice/method/list copy
This commit is contained in:
1 parent
b39ddeb5b5
commit
d67b899138
3 files changed
+42
-96
No files matched your search
@@ -27,7 +27,7 @@
|
||||
* provider call. With no AI provider configured the block renders the state
|
||||
* without an action rather than an button that would 422.
|
||||
*/
|
||||
import { FileText, RefreshCw } from "lucide-react";
|
||||
import { FileText } from "lucide-react";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useTranslations } from "@/lib/i18n/context";
|
||||
@@ -63,9 +63,8 @@ export function DocumentSummaryBlock({
|
||||
}) {
|
||||
const { t } = useTranslations();
|
||||
|
||||
// A stored summary wins over every state: it is shown from storage. The
|
||||
// adjacent action is explicit, so opening the sheet never spends a provider
|
||||
// call; a successful replacement is persisted by the summary route.
|
||||
// A stored summary wins over every state and is shown read-only from storage.
|
||||
// Generation remains available only for absent terminal states below.
|
||||
if (summary) {
|
||||
return (
|
||||
<section className="space-y-2" data-slot="document-detail-summary">
|
||||
@@ -76,28 +75,6 @@ export function DocumentSummaryBlock({
|
||||
<p className="text-sm leading-none font-medium">
|
||||
{t("documents.detail.summary.title")}
|
||||
</p>
|
||||
{aiEnabled ? (
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
data-slot="document-detail-summary-regenerate"
|
||||
onClick={onGenerate}
|
||||
disabled={isGenerating || actionsDisabled}
|
||||
>
|
||||
<RefreshCw
|
||||
className={
|
||||
isGenerating
|
||||
? "size-4 animate-spin motion-reduce:animate-none"
|
||||
: "size-4"
|
||||
}
|
||||
aria-hidden
|
||||
/>
|
||||
{isGenerating
|
||||
? t("documents.detail.summary.generating")
|
||||
: t("documents.detail.summary.regenerate")}
|
||||
</Button>
|
||||
) : null}
|
||||
</div>
|
||||
<p className="text-foreground text-sm">{summary}</p>
|
||||
{generatedAtLabel ? (
|
||||
|
||||
Reference in new issue
Block a user