Skip to content

feat(sources): the personal Library - #881

Open
yaacovcorcos wants to merge 42 commits into
mainfrom
claude/sources-library-20261113
Open

yaacovcorcos wants to merge 42 commits into
mainfrom
claude/sources-library-20261113

Conversation

@yaacovcorcos

@yaacovcorcos yaacovcorcos commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

Scient's Sources become a personal Library: one store per computer for all of a researcher's sources. Projects keep their own citation keys and project notes and cite into the Library. This PR carries the whole Sources stack, squashed onto current main, and supersedes #823 (its agent-trust work is included).

  • The Library and the move. Existing projects move into the Library once (journaled, resumable, verified). Before anything leaves a project, a sealed, checksummed copy of its evidence is kept in the project. Recover brings it back on any computer.
  • Projects. A "This project / All Library" switch above the list, always shown. Complete citation details travel with each project, so a co-author without the Library gets the same bibliography. Project notes are checked writes, protected by a cross-process lock, with history and a conflict box.
  • Duplicates. Automatic merging needs corroboration across the whole group: title, type, no conflicting identifier. Everything else is listed as a possible duplicate with its reason. Undo of a merge stays undone. Every pair and merge is reachable ("Show more"; agents page too). A contradicted match can be linked or kept separate deliberately. Deleting for good stays deleted.
  • Project packages. Save and import a project's citations, notes, reviews, PDFs and highlights. An import keeps a receipt; Undo removes the project's own unchanged additions and never removes papers from the Library.
  • Scale. A virtual list, bulk edits above 500 sources in parts with progress, Stop and one Undo, and the record index warmed at start for Libraries of 3,000+ sources.
  • Agents can do what a person can, through the existing Sources tools (no new tool).

Why

The owner's goal is for Scient to replace a researcher's reference manager. Per-project stores could not do that. The design, the scale gate, and two independent first-principles reviews (FP-1, FP-2) are in the Sources roadmap folder. Every step was reviewed by Codex until clean; the integrated result was reviewed again.

Documentation Impact

Documentation impact: Updated — docs/user/sources.md, docs/internals/scient-sources.md, and the systematic-review skill text.

Verification

  • Full gate on this tree's parent (main merged, macOS Apple Silicon only): install, format, lint, typecheck, build, desktop smoke, branding, diff check and context budget all pass.
    • Full tests fail only where main fails the same way: FX skills, Git paths, Antigravity casing, runtime cleanup, file watching, SyncTeX setup, image-dialog pan.
    • One latexVisualStability scroll drift appeared once, then passed 40/40 on this branch and 40/40 on main at CPU throttle 6 and 8. It is the known flaky family; no tolerance or retry was changed.
  • After main's 6 newest commits were merged: the budget, skills, analytics and process-tree tests pass, and the server typecheck passes.
  • Platforms: the scale gate measured the store on Windows, Linux, Intel and Apple Silicon runners. Platform-specific code (junctions, hard-link-only restore with a recoverable stop where unsupported) is covered by tests. No hands-on Windows or Linux run of this build.

Added since the first version (2026-11-15)

Hardening found and fixed four defects, each with a test that fails without its fix:

  • An interrupted merge or Undo is finished before the next change. A stopped Scient (or a full disk) could leave a merged paper stuck in the Trash, or a restored paper whose project keys still cited the other one.
  • After a merge is undone, a project key cites the right paper. It never links to the other paper, and the project's saved details of both papers are exactly the Library's, also when the paper was removed before the project refreshed. The same holds for systematic-review snapshots.
  • Unlink holds. Withdrawing a manual link puts the project's saved details back, and the paper is not linked again by itself.
  • The Library's rules are tested. Seven written rules are checked under seeded random use (300 runs of 150 actions locally), and by killing a real child process at every file change of 14 actions, or filling the disk (168 parts locally; CI runs a sample).

Then the first experience fixes (2026-11-15, later the same day):

  • Typing a citation in LaTeX offers your papers. Inside \cite{ and the natbib and biblatex forms (multicites included), in Visual and in Source: the entries of the document's own .bib files, then this project's Library sources, by key, author, year or title. If the document does not load references.bib yet, the list says which line to add.
  • A copy a merge took away is not in the Trash. It is the merge's Undo, so the Trash list and count leave it out, emptying the Trash no longer ends a merge's Undo, and it is deleted with the merged paper when that is deleted for good. Agents see the same Trash.
  • Small fixes: Move to Trash in "This project" rows; Add to project on the message after adding by identifier from All Library; a failed move's button is Try again and runs the move; the Zotero refresh dialog offers Check again; a review's "another version" line shows Show versions; Export follows the list while a search is typed.
  • Large libraries: typing in the search shows each letter at once (about 20 ms at 20,000 sources in a released build); the list answer is about 6% smaller.

Then, after an independent first-principles review of the whole area:

  • Recent changes. One list in the Library's ⋯ menu of the changes still on record (bulk edits, merges, imports, the Trash), newest first, with who made each and one action: Undo, Show sources or Restore. A bulk edit of thousands of sources is one line. It says what it does not list; it is a recovery list, not a history.
  • An Undo offered later does not reverse a later decision. A tag or a type that was changed on a paper after the bulk edit stays, and the line says how many were left. Collections are the stated exception (no per-paper history).
  • After a merge is undone, nothing a project had is dropped. A value the project's saved details had and the Library record lacks is kept in the project (.scient/library/displaced/).
  • The Library names its computer when a project runs on another one.

Then backup and restore:

  • Back up the Library. "Back up the Library…" in the Library's ⋯ menu writes a dated folder with every file the Library keeps, a README, and a list of checksums. Changes wait while it runs and the Library says so. It says when a project had not finished moving into the Library.
  • Restore from a backup. The backup is checked file by file and copied beside the Library, which is not changed. It takes the Library's place the next time Scient starts; until then Cancel drops it. If the Library that was there held anything, it is kept as a folder beside the restored one and the message says where. Restore replaces; joining two Libraries is the next piece.
  • Why at start: one server owns a data folder, so right after it starts nothing else reads or writes the Library and the swap is two renames. A start with nothing to restore pays 0.1 ms. Tested by a drill that rebuilds a Library with every kind of content, restores it elsewhere and compares every file and every rule, and by stopping the swap at each step.
  • A restore keeps later choices. If "Move back into this project" was chosen after the backup, the restored Library takes that over from the one it replaces. A restore that stops half way cannot be shadowed by a new, empty Library. Recent changes lists each restore with where the replaced Library is kept.
  • Add from another Library. Adds the sources a backup, or the Library a restore replaced, holds and this Library lacks, each whole (versions, note, read and star, PDFs, highlights, collections). It changes nothing that is in the Library: a source both hold that differs, or a paper that may be the same one, is counted and left as it is here; a source removed here is not brought back. It can be repeated. Undo in Recent changes moves what was added to the Trash, except what was changed or used since (edited, read, starred, cited by a project, filed in a collection, highlighted).
  • Show differences. On an addition's line in Recent changes: the papers that were not added because this Library has them, or may have them, where the other has something this one lacks, with both sides (the two notes, the PDFs only the other has, tags, read or star there, each detail that differs). Each row says how the two papers stand now. Three actions, one paper and one thing at a time: add the other note under your own, attach one PDF, add a look-alike paper separately. An action is done only if the row is exactly current (both papers, how they stand, and the papers it names); a PDF is taken only if its bytes are the PDF the row named. Details, tags, and read or star are shown, not copied. A session that may only read sees no personal notes.
  • Put it back. For a restore made by mistake: on the restore's line in Recent changes, the Library that was replaced takes its place again at the next start, whole, and the restored one is kept in its turn, so this too can be reversed. Until the restart Cancel leaves both as they are.
  • A restore that has begun is finished, never dropped. Once a start has moved a folder, Cancel and another restore are refused and the Library says to restart. Libraries kept by earlier restores stay listed after another restore. A later backup that turns out damaged leaves the waiting one in place.
  • After Codex's review of the whole block (9 findings, 8 fixed and 1 in part; reviews/sources-improve-20261115/DECISIONS.md): the list no longer hashes the whole backup on every page, an edit made during an addition is noticed, and wording that was untrue was corrected.
  • After Codex's review of "Put it back" (5 findings, all fixed): a put-back that cannot finish puts the Library back and can be cancelled; a kept Library is accepted only beside this Library, under a restore's name, holding the Library that was set aside; "Add separately" copies nothing from a backup that is not the file the backup lists; Cancel names the restore the window shows.
  • Two computers, by hand: work on one at a time → back up, restore. Worked on both → add from the other Library in both directions and take what differs from Show differences. Merging sources both hold automatically is left for sync.
  • Not for agents yet: backup, restore, adding from another Library and its differences are recorded gaps; they wait for the Sources tools in the tool-use eval.

The rules these rest on, each with its trade-off, are one page for the owner: reviews/sources-improve-20261115/RULES-FOR-OWNER.md (local).

Then the move-in from Zotero, first step:

  • A Zotero import says what it did not bring. When it ends, "Not brought from Zotero" lists everything Zotero holds for the imported references that did not come, each with how many references and a way to show them: fields Scient has no place for yet (place of publication, edition, number of pages and others), lines of Extra it does not read, highlights and comments on PDFs, files that are not PDFs, links, PDFs Zotero could not hand over, notes whose formatting became plain text, and notes and files that belong to no reference. The import's line in Recent changes opens the same list later; an agent's import result carries it in the same words.
  • How it is made: every text field Zotero sends is kept before any is dropped, and each is brought, listed, or Zotero's own bookkeeping. A test holds that rule on 42 real references of every Zotero item type from a public library (bibliographic details only). Its list of what is not brought (92 kinds today) is the baseline the next steps shorten.
  • Measured on four public Zotero libraries (reviews/sources-improve-20261115/design/F1-zotero.md): today's import drops at least one bibliographic field on 11% to 100% of references, most often the place of publication; the loss is concentrated in books, reports, software and humanities material.
  • Every bibliographic field Zotero holds is kept. A source has "More details": edition, place of publication, series, number of pages, a report's number, date accessed and the like, under the names citations use, so a book cites with its edition and a report with its number. A field only Zotero names, and the other lines of Zotero's Extra, are kept as written. Cases, statutes and emails now arrive with their titles (Zotero keeps them under other field names). Software, presentations and manuscripts are source types; a program is cited by its programmer, a film by its director. On the 42 real references, what the import does not bring fell from 92 kinds of things to 5, none a bibliographic field.
  • Show and edit them. A paper's details list them by name; Edit changes or removes one and adds one from a list; each change is in the paper's History. Agents read them and may pass them back.
  • Refresh and Send. Refresh compares each detail on its own: a new one comes in, one corrected here stays and is reported, one removed here stays removed; a source imported earlier gets them on its next refresh. Send writes each detail to the field Zotero has for it in that kind of item (asking zotero.org which fields the type accepts), else to Extra. A legal case's name, court and reporter were never sent before.
  • Duplicates and files. Two sources that differ only in edition or version are not flagged as possibly the same. .bib, RIS, EndNote XML and CSL-JSON carry these details in and out.
  • Fixes from Codex's review of these two steps (ten findings). A second DOI, PMID or citation key in Extra is kept; a film's director is cited as director; a creator named in Extra is added; a report's number and its issue both survive export; an export names every detail the file could not carry; date ranges are cited whole; a talk's place is the event's place; a reference that was already here is listed under "Not brought from Zotero".
  • A whole Zotero library in one import. A collection or library larger than 500 references comes in parts of 500 that the panel runs one after the other and shows as one import (also in Recent changes). It goes on by itself after Scient was closed; a stop offers "Import the rest". A collection is listed by its keys alone (two requests, whatever its size). An agent's import says how many remain and takes a run ID to go on.
  • Refresh from Zotero for a large Library: 200 sources at a time, with progress; in a project it reads only the sources that came from Zotero. Send refuses more than 500 with a sentence instead of leaving the rest out.
  • Zotero's field map is Scient's own table of what Zotero publishes for apps (its repository has no licence file, so the file is not copied); pnpm check:zotero-schema compares the two.

Codex reviewed every part and challenged each design before it was built; each finding is fixed or declined with a reason. Limits that remain are stated in docs/internals/scient-sources.md ("Rules the stores keep", the notes on unmerged sources, and "Library restore").

Agent Context

Needs agent-context-increase. The tool list is 121,450 bytes, against 91,677 on main (+29,773: +29,227 from the first version, +168 for the one input that lets an agent read Recent changes, +275 for the Zotero step: three source types, a source's further details in the update input, and the refresh choice, +103 for going on with a large Zotero import; measured again after each step). Codex measured the change tool by tool on both trees:

  • All of the growth is Sources:
    • 17 new Library tools and their schemas: +19,924.
    • Sources fields on the paper-fetching tools (addToLibrary, sourceId): +497.
    • The annotations and references tools: the rest.
  • The main merge is clean. Every tool outside Sources matches main in name, description and input schema.
  • Context +723 (Codex additional context and Scient awareness): this is one Library guidance block that sends agents to the Library before the web, has them cite page numbers and check quotes, and tells them to load the references skill. Earlier experiments support each of those instructions.
  • No cuts in this PR. Every measured cut together saves 6,023 tool-list bytes and 158 context bytes, which still leaves +23,204. The wording cuts change text agents act on, so they need model evals first. They go in a follow-up PR with evals: the schema reductions first (739, deterministic), then the shorter descriptions.

UI Changes

Screens and every user flow (75 screens, 48 flows, light/dark, wide/narrow) are in the local review pack the owner has (reviews/sources-roadmap-20261110/review-pack/index.html). The owner's test app runs this build.

Checklist

  • This PR is small and focused: no; it is the full Sources stack, delivered as one squashed commit for provenance
  • I explained what changed and why
  • I included before/after screenshots for any UI changes: in the review pack
  • I included a video for animation/interaction changes

🤖 Generated with Claude Code

One Library per computer for all of a researcher's sources; projects keep
their citation keys and project notes and cite into it. Existing projects
move in once, with a sealed copy of their evidence kept in the project.
Includes the agent-trust work of #823, M2 (linked PDFs, categories, Zotero
groups, styles) and M3 (store, merges, possible duplicates, bulk edits in
parts, the move, packages, recovery), reviewed and gated together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XXL labels Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.5 KiB 5.5 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 4.2 KiB 4.2 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 22.3 KiB 22.3 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.5 KiB 5.5 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 4.2 KiB 4.2 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 22.7 KiB 22.7 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 12.0 KiB 12.0 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 45.5 KiB 45.5 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 45.5 KiB 45.5 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 12.2 KiB 12.2 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.1 KiB 384.1 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 46.1 KiB 46.1 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 46.1 KiB 46.1 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: fd426be · PR result: a79792f · Source CI: failure

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Bounded compact HTTP snapshot with live cursor.

  • Codex decoded thread snapshot: 88.2 KiB
  • Claude decoded thread snapshot: 88.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

yaacovcorcos and others added 2 commits November 13, 2026 16:06
Conflict in .github/workflows/ci.yml (Windows Overleaf job): kept main's
accounts and browser tests and the Google sign-in smoke test, then the
Sources file tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One conflict: the measured agent context budget file. Main's values, then
the Library's three measured values on the merged tree.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

This PR changes the test suite by +1064 test cases (browser +152, unit +530, server +382).

New browser test files: apps/web/src/scient/annotations/PdfAnnotationLayer.browser.test.tsx, apps/web/src/scient/annotations/SourceAnnotations.browser.test.tsx, apps/web/src/scient/annotations/documentQuoteTargets.browser.test.tsx, apps/web/src/scient/latex/LatexReferenceDialog.library.browser.test.tsx, apps/web/src/scient/latex/LatexVisualEditor.citationOpen.browser.test.tsx, apps/web/src/scient/latex/latexLibraryCitationTyping.browser.test.tsx, apps/web/src/scient/latex/useLatexCitationOpener.browser.test.tsx, apps/web/src/scient/markdownEditor/prosemirror/view.libraryCitation.browser.test.ts, apps/web/src/scient/markdownEditor/prosemirror/view.quotation.browser.test.ts, apps/web/src/scient/markdownEditor/ui/LibraryCitationMenu.browser.test.tsx, apps/web/src/scient/pdf/anchors/pdfPageReveal.browser.test.tsx, apps/web/src/scient/references/ReferenceCheckDialog.browser.test.tsx, apps/web/src/scient/sources/AddByIdentifier.browser.test.tsx, apps/web/src/scient/sources/ImportSummary.browser.test.tsx, apps/web/src/scient/sources/JoinDifferences.browser.test.tsx, apps/web/src/scient/sources/LibraryBackup.browser.test.tsx, apps/web/src/scient/sources/LibraryDuplicates.browser.test.tsx, apps/web/src/scient/sources/LibraryMoveNotice.browser.test.tsx, apps/web/src/scient/sources/PackageImportsDialog.browser.test.tsx, apps/web/src/scient/sources/RecentChanges.browser.test.tsx, apps/web/src/scient/sources/ReviewVersions.browser.test.tsx, apps/web/src/scient/sources/ScientSourcesPanel.browser.test.tsx, apps/web/src/scient/sources/SourceCards.browser.test.tsx, apps/web/src/scient/sources/SourceDetails.browser.test.tsx, apps/web/src/scient/sources/SourceEditor.browser.test.tsx, apps/web/src/scient/sources/SourceFullTextResults.browser.test.tsx, apps/web/src/scient/sources/SourceOrganizeSection.browser.test.tsx, apps/web/src/scient/sources/SourceReference.browser.test.tsx, apps/web/src/scient/sources/SourceUses.browser.test.tsx, apps/web/src/scient/sources/SourcesActivity.browser.test.tsx, apps/web/src/scient/sources/SourcesBulkBar.browser.test.tsx, apps/web/src/scient/sources/SourcesBulkBar.parts.browser.test.tsx, apps/web/src/scient/sources/SourcesFilterMenu.browser.test.tsx, apps/web/src/scient/sources/SourcesList.browser.test.tsx, apps/web/src/scient/sources/SystematicReviewScreening.browser.test.tsx, apps/web/src/scient/sources/ZoteroSync.browser.test.tsx.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.

Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.

yaacovcorcos and others added 22 commits November 15, 2026 03:47
Main: one conflict, the measured agent context budget file (main's values,
then the Library's three as measured on the merged tree).

Sources improvement program, part 1 (library branch 666642d..4987854):
- an interrupted merge or Undo is finished before the next change;
- after an Undo, a key never links to the other paper and both papers'
  project copies are their Library records;
- Unlink puts the saved copies back and holds;
- the Library's rules are tested under random use, killed processes and a
  full disk.
Details per part: reviews/sources-improve-20261115/INDEX.md in the workspace.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- The crash and random rule tests timed out on the CI runners (about eight
  times slower there). Their default runs are now a smoke check; the full
  sweeps stay as local runs.
- Typing in the Library search no longer waits for the list to filter.

Library branch 4987854..b272e10.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…l fixes; merge main (220f377)

Brings the library branch's tree at 9aba20b onto the PR branch:
- typed LaTeX citations offer the document's .bib entries and the Library's sources
- a copy a merge took away is not in the Trash; Empty Trash keeps a merge's Undo
- Move to Trash in This project rows, Add to project after adding by identifier,
  Try again for a failed move, Check again for Zotero, Show versions
- the list's diagnostics are sparse; typing in the search is not held by the list
- main merged; measured agent context sizes updated

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… values after a merge Undo

Brings the library branch's tree at dcdd131 onto the PR branch:
- Recent changes: one list of bulk edits, merges, imports and the Trash, each
  with who made it and one action (Undo, Show sources, Restore)
- a bulk Undo offered later leaves a tag or a type that was changed on the
  paper since, and remembers what it left
- after a merge is undone, a value a project's saved details had and the
  Library record lacks is kept in the project instead of dropped
- merged copies are deleted before their paper; agents see the panel's Trash
- the Library names its computer when it is not this one
- the typed citation list updates when a .bib read finishes
- the move and the full-text store use the shared safe file writer

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…for agents

Brings the library branch's tree at bdf680b onto the PR branch:
- Back up the Library: a dated folder with every file the Library keeps, a
  manifest with each file's hash, and a check that says what changed, is gone
  or does not belong; runs in the background with progress in the panel
- a merge Undo keeps displaced values per holder: the project's saved details
  and each review, one copy per Undo
- an agent can read Recent changes through scient_sources_list

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Brings the library branch's tree at e626a2e onto the PR branch:
- Restore from a backup: the backup is checked and copied beside the Library,
  and takes the Library's place the next time Scient starts; Cancel until then.
  A Library that held anything is kept as a folder beside the restored one
- a backup leaves files out by exact name only, checks its snapshot inside the
  lock, and says when a project had not finished moving into the Library
- a backup's progress line no longer stops after a failed status read
- the agent wording for Recent changes says to undo only unfinished parts

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…rd, a kept Move back

Brings the library branch's tree at f794298 onto the PR branch:
- a restore that stops half way cannot be shadowed by a new, empty Library
- the restored Library records what it replaced; Recent changes lists each
  restore with the kept Library's folder
- a 'Move back into this project' chosen after the backup is kept
- a refused second request is said beside the copy that still waits; the panel
  drops a status answer for a project it has left
- a backup file name a restore will not write is named in the answer

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Brings the library branch's tree at 1328dc8 onto the PR branch:
- Add from another Library: adds the sources a backup, or the Library a restore
  replaced, holds and this Library lacks, each whole; nothing that is in the
  Library is changed, and what both hold is counted and left as it is here
- Recent changes lists each join with Undo, and offers Add its sources on a
  restore whose replaced Library is kept
- a join that stops is settled before a later one adds anything; the same
  folder can be added from again

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Brings the library branch's tree at c0d00d3 onto the PR branch:
- a source is added only when nothing here could be it, checked again as it is
  added; two copies rebuilt from one project source are recognised
- Undo leaves a source a project uses, one filed in another collection, and one
  whose PDF was highlighted since
- a merge the other Library undid stays undone here; each source is filed as it
  arrives; a stopped join is settled and its sources filed
- a restore that has not finished keeps every project out of the Library until
  the next start
- the guide no longer suggests restoring to make two worked-on Libraries equal

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Brings main's 25 commits (the guest room work and the 0.6.29 release notes)
under the Sources stack. No conflicts; the agent context budget is unchanged.
The tree is the library branch's at 03ff2b1.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ond review fixes

Brings main's T3 alignment through 7f6e403 under the Sources stack. One
conflict: the measured agent context budget, measured again on the merged tree
(the tool list is 121,072 bytes; main's is 91,677).

Also brings the library branch's fixes after the second review of adding from
another Library (c4d3453): a kill-safe order of adding, an Undo that keeps
whatever it cannot show is untouched, collections a source could not be put in
named in the result, and no write to the Library while a restore is unfinished.
The tree is the library branch's at a3d5edb.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The previous commit on this branch named main at b5d3189 as a parent while
its tree was made before that commit, so it would have undone the release
notes change. This commit's tree is the library branch's at 1dbe78b, which
has it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Brings the library branch's tree at 03e9136 onto the PR branch:
- Show differences on an addition in Recent changes: the papers both Libraries
  have where the other has something this one lacks, with both sides
- three actions, one at a time, each an ordinary edit: add the other note
  under your own, attach one PDF, add a look-alike paper separately
- an action is refused when either paper changed since the list was shown

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…found

Same tree as claude/sources-library-server-20261111 at f5ae10e.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Same tree as claude/sources-library-server-20261111 at 639c367.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…eview of Put it back

Same tree as claude/sources-library-server-20261111 at 91b4d1d.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Same tree as claude/sources-library-server-20261111 at e277a3a.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Same tree as claude/sources-library-server-20261111 at 48039ce.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nd the join

Same tree as claude/sources-library-server-20261111 at 6bf2d9c.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Same tree as claude/sources-library-server-20261111 at ea4b20b.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… one import

Same tree as c6df1ff on claude/sources-library-server-20261111.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…n versions of a review; main merged

Same tree as 4b0321f on claude/sources-library-server-20261111.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
yaacovcorcos and others added 17 commits November 15, 2026 16:28
…e; the weekly retraction watch; main merged

Same tree as a82aa56 on claude/sources-library-server-20261111.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same tree as bc4fd8f on claude/sources-library-server-20261111.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… night

Same tree as d9805b6 on claude/sources-library-server-20261111.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same tree as ca30c75 on claude/sources-library-server-20261111.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Library menus regrouped, one result slot and Activity instead of stacked cards,
sort headings and cards, source page facts rail and filing row, silent note saves,
every bibliography key kept, incomplete author lists, journal icons from the article
page, My Library wording, university connect in the header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ter, star beside the menu; no Main note in the university picker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pandoc citation groups and LaTeX citation commands yield each cited key with
the locator written for it; a locator's first page is read as a printed page
label. Shared by the citation navigation and the list of a source's uses.

Co-Authored-By: Claude Fable <noreply@anthropic.com>
Quote in my document no longer cites the first of several sources that share
one PDF (the chapters of a book carry the book's PDF). The source the PDF was
opened from wins, and gives no key when it has none; opened another way, one
keyed source is used and several are offered as a choice. The citation's page
is the PDF's printed page label when every quoted page has one, also when
quoting from a source's highlight list, and the PDF page number otherwise.

Co-Authored-By: Claude Fable <noreply@anthropic.com>
Clicking a Markdown citation (Control/Command-click while writing) now goes as
far as the citation says: a citation ending a quote made by Quote in my
document reveals that highlight; a page locator opens the source's PDF at the
page with that printed label (the page number when the PDF has no labels); no
page opens the source's details. Several Library sources in one citation are
offered in a menu instead of opening the first. A source without a PDF opens
its details and says so. The PDF reader gains a page reveal next to the
passage reveal.

Co-Authored-By: Claude Fable <noreply@anthropic.com>
The guide promised that Control/Command-click opens a citation's source while
writing; LaTeX had no such handler. In Source, Control/Command-click inside a
\cite-family command opens the key under the click, or every key of the
command; biblatex multicites give each key its own note. In Visual, it opens
the clicked citation (the clicked key when citations are numbered), and a plain
click does when the editor cannot be edited. Both pass the text quoted just
before the command, so a quote made by Quote in my document reveals its
highlight.

Co-Authored-By: Claude Fable <noreply@anthropic.com>
A % comment between a citation command and its arguments, or inside a key list, hid the citation from the key rename or turned the comment into a key. Arguments are now read from text whose comments are masked to spaces (offsets kept), and only the key bytes are rewritten. Found by the Codex review of the citations work (finding 6).
A source's page lists every citation of it in the project's Markdown and LaTeX
documents, by document, with line, locator and the sentence around it; an
occurrence opens the document at that line. Only in-text citations count:
prose in Markdown, \cite-family commands outside comments and verbatim in
LaTeX; \nocite is reported apart. A key counts when it is one of the project's
keys for the source; when a document's own bibliography defines it, the entry
must name the same work (DOI, PMID, arXiv), or it is reported as naming another
work. Anything that could not be read makes the result incomplete, and the
page then never says the source is not cited.

Agents get the same list through scient_sources_get's new uses input (+82
bytes of tool text, mcpToolListJsonBytes 122041).

Co-Authored-By: Claude Fable <noreply@anthropic.com>
Opening a citation now asks the server which work each key names in the document's effective bibliography (its own files, the managed references.bib, and for LaTeX the including document's): another work is not opened and Scient says why; an entry that cannot be compared opens with a note. Retained keys (alsoCitedAs) open their source. A repeated quotation is narrowed by each PDF's printed page labels, never by physical page numbers; unreadable or ambiguous labels keep the repeated-passage notice. LaTeX Source clicks ignore verbatim text and read arguments past comments. Fixes Codex review findings 1, 2, 5 and 7.
A built-in compare-sources skill compares the sources a researcher names on
their question and writes an editable Markdown document: columns from the
question, each cell reported, derived (with its working) or interpretation,
cited with the printed page when seen and the PDF page beside it, empty cells
as Not reported, Could not assess or Not checked, possible shared studies
flagged, and what was read stated. It puts a finding into another document
only when asked. Compare in the Library's selection bar (2+ sources) puts the
request in the chat draft and never sends. Labelled experimental: there is no
evaluation of its output yet.

Co-Authored-By: Claude Fable <noreply@anthropic.com>
The user guide and internals describe quoting at the printed page and the
choice between sources sharing a PDF, opening a citation's page or passage in
Markdown and LaTeX, Used in this project with its rules and limits, and Compare.

Co-Authored-By: Claude Fable <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he newest annotation reading wins

In the Visual LaTeX editor that cannot be edited, the citation button became focusable
but Enter did nothing; it now opens the citation like a click. Overlapping reloads of a
PDF's annotations keep only the newest answer, so a quote cites the current source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant