@anthusai/papyrus 5.43.0-next.41 → 5.43.0-next.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,7 @@ import { useEffect, useId, useState } from "react";
4
4
  import { CheckIcon, Loader2Icon, XIcon } from "lucide-react";
5
5
  import { UNRECORDED_CONFIDENCE } from "../lib/reference-feed-ranking";
6
6
  import { cn } from "../lib/utils";
7
+ import { AutoGrowTextarea } from "./ui/auto-grow-textarea";
7
8
  import type { CardPrediction, ReviewChoice } from "./reference-review-card";
8
9
 
9
10
  /**
@@ -236,7 +237,7 @@ export function DecisionControl({
236
237
  </label>
237
238
  {/* Written reasons only. A row of canned answers collects a label the model mostly has already;
238
239
  what trains the next prediction is a sentence. */}
239
- <textarea
240
+ <AutoGrowTextarea
240
241
  className={cn(
241
242
  "w-full rounded-[var(--feed-radius-md,16px)] border-0 bg-[var(--feed-control)] px-3 py-2 text-sm leading-5 text-foreground outline-none transition-[min-height] placeholder:text-muted-foreground focus-visible:ring-[3px] focus-visible:ring-ring",
242
243
  field,
@@ -245,7 +246,7 @@ export function DecisionControl({
245
246
  id={fieldId}
246
247
  onBlur={() => { if (!disabled) onReasonCommit?.(); }}
247
248
  onChange={(event) => { setReasonDirty(true); onReasonChange?.(event.target.value); }}
248
- placeholder="Why? In your own words — this is what the next prediction learns from."
249
+ placeholder="Why? In your own words…"
249
250
  value={reason}
250
251
  />
251
252
  </div>
@@ -118,6 +118,9 @@ export function useRatingStore({ save, saved, seed, needsReason, sticky, saveNot
118
118
  if (inFlight.current.has(id)) { dirty.current.add(id); return; }
119
119
  inFlight.current.add(id);
120
120
  dirty.current.delete(id);
121
+ // The note goes out with this save, so its own pending autosave has nothing left to send.
122
+ dirty.current.delete(`note:${id}`);
123
+ clearTimeout(timers.current[id]);
121
124
  const started = itemsRef.current[id] ?? EMPTY;
122
125
  patch(id, { pending: choice, askReason: false, feedback: { phase: "saving" } });
123
126
  try {
package/package.json CHANGED
@@ -510,7 +510,7 @@
510
510
  "optional": true
511
511
  }
512
512
  },
513
- "version": "5.43.0-next.41",
513
+ "version": "5.43.0-next.42",
514
514
  "dependencies": {
515
515
  "@aws-amplify/adapter-nextjs": "^1.7.3",
516
516
  "@aws-crypto/sha256-js": "5.2.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.43.0-next.41",
2
+ "version": "5.43.0-next.42",
3
3
  "routes": [
4
4
  {
5
5
  "file": "app/%5F_preview/[[...path]]/route.ts",