8000 feat(entities): every entity has its own page at /wiki/namespace/Name by adeelahmad · Pull Request #393 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(entities): every entity has its own page at /wiki/namespace/Name - #393

Merged
adeelahmad merged 11 commits into
mainfrom
claude/project-thread-2u9xmx
Oct 15, 2026
Merged

adeelahmad merged 11 commits into
mainfrom
claude/project-thread-2u9xmx

Conversation

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

Requested by Adeel · project thread

Description

Before: an entity had no page of its own. /entities/<id> sent you to the graph, and its notes lived at /notes/about/entity/<id>, a bare note with no idea of what the entity is or where it's said.

After: every entity has its own page, named by its name the way a wiki names pages: /wiki/<namespace>/<Name> with spaces as underscores (Ada Lovelace in work is /wiki/work/Ada_Lovelace). The page shows what the entity is (type, other names, description), the notes people and the assistant keep on it in the BlockSuite (AFFiNE) editor, every line that says it with the name highlighted and a link to the moment, and on the side the recordings, the entities it comes up with (each a link to its own page), the same entity in other namespaces, who says it and similar content. Edit opens the existing side panel; renaming moves the page to the new name.

How: nothing is stored for the address. app/domain/wiki.py reads an address the way analysis matches names (the entity key: any case, any spacing), then falls back to entity_alias, so a name it had before a rename, or the name of an entity merged into it, still opens it and the page switches to its own address. GET /api/v1/wiki/{ns}/{address} resolves an address (members only, like /entities). EntityDetail.page, MCP get_entity (url) and the assistant's find_entities (page) give the address. /entities/<id>, /notes/about/entity/<id>, @ links in notes, the graph panel's link, the entity's name on the Entities page and the RDF URI /id/entity/<id> all lead there. The notes page gained an embedded mode (just the editor, view toggle, history and links); on an entity's page the empty notes area says what to write and has a border.

Two red Clicks checks fixed on the way:

  • graph-merge timed out (also on main, feat(recordings): edit an entity from a recording's Entities tab #388): the graph shows an entity once something links it twice (graph.min_edge_weight), and Raspberry Pi's second link comes from the uploaded pi-episode, whose conversion took 45s on CI. Main (fix(ui): keep the Ask button off the page's buttons #396) now waits for the imports' jobs before this journey, so this PR takes main's wait.
  • chat-ask on a phone needed a swipe once v0.10.0 was out: the update notice sat above Chat, which is sized to the screen less the top bar, so the question box ended up 75px below the screen. The notice now sets --lens-banner to its height and the full-screen pages (Chat, the graph, recordings, home) take it off.

Motivation and Context

Adeel asked that every entity have its own page with a wiki- or notes-style URL. The notes module (#118, #122, #135) already gave every thing a notes page in the BlockSuite editor, decided 2026-10-04; this makes the entity's page a real page at a readable address.

Steps to reproduce (if appropriate):

Entities → click an entity's name → /wiki/<ns>/<Name>. Try /wiki/<ns>/<name in lowercase>, or an old name after a rename: it opens the page and the address switches.

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 (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

Done questions (AGENTS.md)

  • Goal: every entity has its own page at a wiki-style address, with the BlockSuite notes editor; merged on green CI.
  • Agents: GET /api/v1/wiki/{ns}/{address}, page on GET /entities/{eid}, url on MCP get_entity, page on the assistant's find_entities.
  • Zero setup: nothing to install or configure.
  • Fewest clicks: one click on the name opens the page (entity-find stays at its baseline); the row still opens the side panel.
  • Configurable: n/a, no new settings.
  • Light: no new dependency; the BlockSuite editor was already there and loads on demand.
  • Private and secure: n/a for the threat model, no new surface: a read with the same namespace-member check as /entities; other namespaces look absent (404).
  • Cost: no model calls.
  • User decides: nothing acts on its own; no default changes.
  • Upgrades: nothing stored changes (the address is computed from the name and aliases), so no upgrade step.
  • Honest: docs say built; topics/recordings wiki addresses are listed as planned.
  • Tests, docs and generated files updated (openapi.json and the client from the generator).
  • Open standards: the RDF URI now 303s browsers to the page; no new dependencies.
  • Refine later (docs/notes.md): wiki addresses for topics, recordings, collections and speakers; a namespace wiki index; names that differ only by _ vs a space share an address.

🤖 Generated with Claude Code

https://claude.ai/code/session_012V6irFWrfGHnWJgJtRvRSf


Generated by Claude Code

…ame>

An entity's page is named by its name, the way a wiki names pages (spaces as underscores), and shows what it is,
its notes in the BlockSuite editor, every line that says it, the recordings, people and entities it comes up with,
the same entity in other namespaces and similar content. Any case, an old name or a merged name finds it and
switches to its own address. /entities/<id>, /notes/about/entity/<id>, @ links in notes, the graph panel, the
Entities list and the RDF URI all lead there. The API, MCP get_entity and the assistant's find_entities give the
page's address; GET /api/v1/wiki/{ns}/{address} resolves one. Nothing stored changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012V6irFWrfGHnWJgJtRvRSf
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012V6irFWrfGHnWJgJtRvRSf
@adeelahmad adeelahmad self-assigned this Oct 15, 2026
…ce to write

An entity page's notes started as a blank box with nothing saying it can be
written in. It now says what to do and has a border, and the note's cost
panel stays on the note's own page.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012V6irFWrfGHnWJgJtRvRSf
The graph shows an entity once something links it twice (graph.min_edge_weight),
and Raspberry Pi's second link comes from the uploaded pi-episode. On CI its
conversion took 45s, so graph-merge opened a graph with no entities and timed
out (also on main, #388). The journey now waits, uncounted, until the entity's
page says it is said in both.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012V6irFWrfGHnWJgJtRvRSf
Chat, the graph and a recording's page are sized to the screen less the top
bar, so the update notice (Lens vX is out) pushed their bottom 75px below a
phone's screen: Chat's question box needed a swipe. The notice now sets
--lens-banner to its height and those pages take it off.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012V6irFWrfGHnWJgJtRvRSf
@adeelahmad adeelahmad changed the title feat(entities): every entity has its own page at /wiki/<namespace>/<Name> feat(entities): every entity has its own page at /wiki/namespace/Name Oct 15, 2026
adeelahmad pushed a commit that referenced this pull request Oct 15, 2026
Both were red on main. The update banner pushed pages that fill the screen
(Chat, the graph, a recording) below the fold, so the phone's question box needed
a swipe: ported from #393, the banner sets --lens-banner to its height and those
pages leave it room. Merging from the graph needs Raspberry Pi linked twice,
which takes the second import's analysis: the journey now waits for the jobs to
finish, as other journeys wait for background work.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaZgCPYVesfDJhLzGCKJXX
adeelahmad added a commit that referenced this pull request Oct 15, 2026
The floating Ask button sat on whatever was in the bottom-right corner, such as
Import on the Import page. It now finds what it would cover with the browser's
own hit testing (a transparent probe just under it) and rises above any control
there that scrolling can't carry clear: one in a bar fixed or stuck to the
bottom, or with the page at its end. With no room to rise it steps out of
sight. Dialogs, drawers and toasts drawn over it don't move it.

The clicks survey fails a journey whose control the Ask button covers, and
checks every page scrolled to its end. Also steadies two journeys that were red
on main: the update banner leaves full-screen pages their room (ported from
#393), and graph-merge waits for the imports' jobs to finish.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaZgCPYVesfDJhLzGCKJXX
…-2u9xmx

# Conflicts:
#	CHANGELOG.md
#	ci/clicks/journeys.mjs
…-2u9xmx

# Conflicts:
#	docs/mcp.md
#	docs/processing.md
…h opens entity pages

Matches #273's wording, and the notes search hit for an entity's page now
links /entities/<id>, which opens the entity's wiki page.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012V6irFWrfGHnWJgJtRvRSf
@adeelahmad
adeelahmad merged commit fe8247a into main Oct 15, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-2u9xmx branch October 15, 2026 12:57
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