Skip to content

DocIr UX harvest from papermerge-core: page identity, field schema - #283

Closed
AdaWorldAPI wants to merge 1 commit into
mainfrom
claude/happy-hamilton-0azlw4
Closed

AdaWorldAPI wants to merge 1 commit into
mainfrom
claude/happy-hamilton-0azlw4

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Summary

  • Researched papermerge/papermerge-core (the real source — ciur/papermerge is a now-empty meta-repo, worth knowing if anyone else goes looking) for UX-facing architectural lessons applicable to ogar-doc-ir, scoped deliberately to exclude infra concerns (search indexing, folders/permissions, the task-queue boundary — those are archive-layer, not this crate's).
  • Adds docs/DOCIR-UX-HARVEST.md: two proposals, each a doc.v2-scale design sketch (not a live code change) —
    1. Page identity — DocPage today is addressed only by Vec position, no stable id. Papermerge's actual mechanism (real citations, not README paraphrase): a structural page edit mints a whole new document version and copies forward unaffected pages' already-recognized content by explicit old-id→new-id mapping, never re-running OCR. Proposes PageId + PageOp + CarriedForward.
    2. Document type + field schema — proposes FieldKind/FieldSchema/DocumentType, mirroring papermerge's converged "one JSONB value + typed generated columns" design for custom fields, to validate a document's TypedFields against an expected schema.
  • Appends a D-DOCIR-UX-HARVEST entry to docs/DISCOVERY-MAP.md.
  • Caught mid-write: origin/main had just landed the document_actions.rs W4 council ruling (no separate ogar-doc crate — persistence ActionDefs live in ogar-vocab::document_actions, executed by tesseract-paperless/paperless-kv). Synced to main first, then corrected every reference in the new doc that assumed a nonexistent ogar-doc crate, and re-verified the two struct-citation line numbers against the post-sync file.

Test plan

  • Every citation checked against real papermerge-core source (file:line), not the README
  • Every ogar-doc-ir citation re-verified against the current (post-sync) lib.rs line numbers
  • Confirmed no stale `ogar-doc` crate references remain after the sync-driven correction
  • docs/DISCOVERY-MAP.md diff reviewed — purely additive, one entry appended at the true tail, upstream's own new content intact
  • N/A — documentation only, no code changed, no build/test surface affected

🤖 Generated with Claude Code


Generated by Claude Code

…hema

Extracted the UX-facing (not infra) architectural lessons from
papermerge/papermerge-core (the real source; ciur/papermerge is a
now-empty meta-repo) for ogar-doc-ir specifically, per the operator's
explicit scope: page-level editing as a first-class capability (pages
have no independent identity today, addressed only by Vec position),
and document-type/custom-field schema. Deliberately excludes the
infra-shaped findings from the same research (search-as-projection,
folder+permission design, dead checksum columns, the Celery boundary)
as archive-layer-not-doc-ir concerns.

Findings are expressed as concrete Rust type sketches against the
crate's actual current shape (DocPage/TypedField), not paraphrase of
the Python source. Citations verified against papermerge-core commit
4a69d097 (FastAPI + SQLAlchemy 2.0 async + Alembic + Celery/Redis +
PostgreSQL, confirmed from pyproject.toml).

Written against a stale ogar-doc-ir/DISCOVERY-MAP.md snapshot; synced
to origin/main (which had just landed the document_actions.rs W4
council ruling) before finalizing, and corrected every reference this
surfaced: no separate ogar-doc crate exists, persistence ActionDefs
live in ogar-vocab::document_actions with the executor in
tesseract-paperless/paperless-kv; two struct citations re-verified
against the post-sync line numbers.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Aug 25, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_a9eb7579-2f42-42e1-ad69-3cfc3d8fdc1d)

Copy link
Copy Markdown
Owner Author

Closing — wrong layer. ogar-doc-ir is an IR: perceptual structure, source-agnostic, carries facts not policy. This doc proposed page-editing capabilities and document-type metadata, which is UX, and UX belongs in paperless-rs. The IR would only take a finding like this if it were a render primitive — something the IR must represent so a renderer can draw it — and nothing here is that.

Re-doing it in the right repo, aimed at usability rather than data-model archaeology.


Generated by Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants