8000 feat(entities): a fixed list of entities, with Unknown and Unlabeled by adeelahmad · Pull Request #64 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(entities): a fixed list of entities, with Unknown and Unlabeled - #64

Merged
adeelahmad merged 2 commits into
mainfrom
claude/project-thread-2qdx7m
Oct 3, 2026
Merged

adeelahmad merged 2 commits into
mainfrom
claude/project-thread-2qdx7m

Conversation

@adeelahmad
@adeelahmad adeelahmad commented Oct 3, 2026 •
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: every name the extractors found became an entity of its own; there was no way to say "these are the entities here".

After: Entities → Setup offers a Fixed list mode next to Self-organizing, for a namespace or any collection.

  • Editors define the entities with Add entity: name, type, other ways it's said, description, and whether it's for the whole namespace or one collection (and those inside it). An entity already found under one of the other names is merged into the defined one (undoable, listed in merge history); a name that's another defined entity's is refused, and nothing is half-saved.
  • When a recording is analysed, each name found goes to the defined entity it names (by name or another way it's said, in any case; defined names are looked for in the transcript too, so "acme" is found), else to Unlabeled when it's a type that belongs here, else to Unknown. Nothing new is created.
  • Unknown and Unlabeled are always there (badged in the list) and can't be renamed, retyped, merged, hidden or deleted; the merge suggestions and the nightly organiser skip them.
  • People's corrections still win, and moving a mention to a new name in a fixed-list place adds that name to the list.
  • The side panel edits other names and the "On the fixed list" switch, and deletes a defined entity nothing mentions.
  • Apply to analysed recordings re-analyses the namespace's (or collection's) recordings so they follow the setup now.

API: POST /api/v1/namespaces/{name}/entities, DELETE /api/v1/entities/{id}, PATCH /api/v1/entities/{id} gains aliases and defined, POST /api/v1/namespaces/{name}/entity-setup/apply, and setups accept mode: "fixed". Mapping lives in a new entity_map.py, called from analyze_recording, so workflow extraction nodes (save entities) go through it too; the workflow executor is untouched. Self-organizing behaviour is unchanged.

Motivation and Context

Fourth of the small PRs for entity modes. Next: self-organizing mapped by descriptions with assistant tools, then hybrid.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (ruff, mypy, eslint, prettier, tsc).
  • I added or updated tests (tests/api/test_entity_fixed.py, entities-model.test.ts).
  • My change requires documentation updates, and I have updated docs/ accordingly (processing.md).
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

Local checks: backend 344 passed on the first commit (only test_office_and_text_files_become_documents fails, as on main: this machine's LibreOffice), entity, routine, workflow, chat and MCP suites re-run after the fix commit; frontend jest 546 passed. Walked through Add entity → Fixed list → Apply in a browser against a seeded archive.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VmPYPheY7aGQv9TiA563P5

claude added 2 commits October 3, 2026 01:00
A namespace or collection can now use a fixed list. Editors define its
entities (name, type, other ways it's said, description), for the whole
namespace or one collection and those inside it. When a recording is
analysed each name found goes to the defined entity it names (also when
written in lower case), else to Unlabeled when it is of a type that
belongs, else to Unknown; nothing new is created. Unknown and Unlabeled
are always there and can't be renamed, merged, hidden or deleted.
People's corrections still win, and moving a mention to a new name adds
it to the list.

The Entities page gets Add entity, defined and always-there badges, other
names and the fixed-list switch in the side panel, and the setup's mode
with Apply to analysed recordings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VmPYPheY7aGQv9TiA563P5
…hing is half-saved

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VmPYPheY7aGQv9TiA563P5
@adeelahmad adeelahmad self-assigned this Oct 3, 2026
@adeelahmad
adeelahmad merged commit d0a6a9a into main Oct 3, 2026
0 of 6 checks passed
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

0