8000 fix(ui): open the graph on the namespace that has one by adeelahmad · Pull Request #339 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

fix(ui): open the graph on the namespace that has one - #339

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-uw6mmd
Oct 11, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-uw6mmd

Conversation

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

Requested by Adeel · project thread

Description

Before: on a fresh install (podcasts shared, interviews isolated), Graph opened on "all shared namespaces" while everything imported sat in interviews, which keeps its graph to itself. The page said "No graph for all shared namespaces yet" until interviews was picked in the namespace switcher. On a phone that couldn't be done at all, because the switcher is hidden below 640px.

After: with no namespace picked, Graph opens on all shared namespaces as before when any of them has a graph. When none does and an isolated namespace has one, it opens on that namespace (the fullest if there are several). On a computer the Find in graph box has the focus, so typing a name and pressing Enter finds it. A namespace in the URL, one picked in the top bar, or "All shared" in the filters is always kept.

Clicks survey (ci/clicks/run.sh from #325, journey graph-find "Find a speaker in the graph of what was imported", same machine before and after, only this journey changed):

Before After
Computer 4 clicks + 7 keys (11) 1 click + 7 keys (8)
Phone can't be done 4 taps + 7 keys (11)

Motivation and Context

Adeel asked to cut clicks, keys and touches. The survey's top item for the graph: "The first namespace keeps its graph to itself, so the graph opens empty until it is picked in the switcher."

How

  • openingNamespace() in components/graph/model.ts picks where the graph opens from the namespace list the app already loads (analyzed recordings + speakers per namespace). It makes no new API call.
  • graph-page.tsx uses it only when nothing is picked, and waits for the namespaces before building a graph, so it doesn't build the empty global one first.
  • The side column's Find in graph box gets autoFocus. The phone's filters sheet is left as it is.

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 (pre-commit: eslint, prettier and tsc are clean).
  • I added or updated tests: __tests__/graph-opening.test.ts.
  • My change requires documentation updates, and I have updated docs/ accordingly (docs/graph.md, The explorer).
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md. n/a, the title says it.

Done questions (AGENTS.md)

  • Goal: the graph opens on the data, merged on green. Clicks baselines: main's baseline.json has no graph journey yet. The graph-find journey and baseline-phone.json arrive with ci(clicks): survey every module, and on a phone with taps and swipes #325, which re-baselines from main, so it records these counts.
  • Agents: n/a, web page default only. Agents already name a scope on every graph call (API, MCP, assistant tools).
  • Zero setup: nothing new.
  • Fewest clicks and keystrokes: computer 11 to 8, phone impossible to possible.
  • Configurable: n/a, no new setting. The opening scope follows what is picked.
  • Light: one fewer graph build on open (the empty global one); no new request.
  • Private and secure: n/a, it reads only namespaces the person can already see.
  • Cost: n/a, no model calls.
  • User decides: an explicit pick (URL, top bar, filters) always wins. The default changes only where it showed nothing.
  • Upgrades: n/a, no stored data.
  • Honest: numbers are from the survey runs.
  • Tests and docs updated; no generated files touched.
  • Open standards; no new dependencies.
  • Result reported with evidence. Refine later: on a phone the filters sheet stays open over the picked node (the "Lens on a phone" thread has that).

🤖 Generated with Claude Code

https://claude.ai/code/session_018GNzYTT6fQRMPesPRNan3u

With no namespace picked, the graph opened on all shared namespaces even
when only a namespace that keeps its graph to itself had anything, so it
showed empty until that namespace was picked in the switcher. It now opens
there, waits for the namespaces before building a graph, and on a computer
the Find in graph box has the focus.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GNzYTT6fQRMPesPRNan3u
@adeelahmad adeelahmad self-assigned this Oct 10, 2026
@adeelahmad
adeelahmad merged commit 36b245c into main Oct 11, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-uw6mmd branch October 11, 2026 00:40
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