Skip to content

Fix what clicking through the seven reading features found - #12

Merged
RutaTang merged 4 commits into
mainfrom
claude/relaxed-cori-bw7sku
Oct 1, 2026
Merged

RutaTang merged 4 commits into
mainfrom
claude/relaxed-cori-bw7sku

Conversation

@RutaTang

@RutaTang RutaTang commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Two passes over the real app under Xvfb, driven by mouse on the clew repo and on a small Python project, turned up the bugs below. Each one is fixed and has a test.

First pass

  • Churn: the most-changed list included files that had since been deleted or renamed, and clicking one reported a missing path. It now keeps only files that exist.
  • Type map: a name resolved to the first type of that name anywhere in the project. It now resolves within its language, to a kind it can mean (a Rust impl names a trait), preferring the same file and then the same folder, else not at all. A Rust type inside an impl is listed as an associated type.
  • Value trace: following a value into a callee failed for wrapped parameter lists and for any pub(crate) fn. Lines read from disk were trimmed, so closed files were classified at the wrong column. return f(x) now counts as "passed to f", and x += … counts as an assignment. When a traced file changes, each row follows its line, and the tab offers "trace again".
  • Ask changes tool: it ignored uncommitted edits. With edits in the working tree it now diffs from where the work started to the working tree, and says so.
  • Glossary: any short all-caps name was treated as an acronym. Now only acronyms the docs spell out count. Rustdoc links read as their text, and each section has its own cap.
  • Export: the glossary section was empty unless the docs index had already been built, and the trail indented one level per visit. Free text is escaped, and the save dialog opens in the project folder.
  • Graph legend: one import-graph legend served every graph. It now describes the graph that is shown.

Second pass

  • Module docs in the glossary (protocol v15): the docs index now carries each file's own doc comment (Rust //!, a Python module docstring, Go's package comment). The glossary defines modules by it and finds spelled-out acronyms in it. DocFile gains a required doc field, so PROTOCOL_VERSION moves to 15 with a new wire snapshot.
  • LSP-refined call graph lost cross-file edges: pyright only looks for callers within its workspace folders, and Clew opened it with rootUri alone. Every incoming-calls request came back null, so called functions were listed as possibly dead. initialize now names the project root as the one workspace folder, and the client answers workspace/workspaceFolders.
  • Edited trace rows: a row whose line was edited kept its old line number, which pointed at an unrelated line after an insertion above it. It now moves as far as its nearest unchanged neighbour.
  • Export spacing: empty sections were followed by two blank lines instead of one.

Checks run locally

  • cargo fmt --check, strict clippy on the backend crates, and rustdoc with warnings denied are all clean.
  • Workspace clippy on Linux shows only the three known Linux-only dead-code warnings.
  • Backend tests (server, core, protocol) all pass.
  • GUI tests: 1,003 pass. The 12 that fail are the ones already known to fail only on Linux.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WRJ4sDknvQJ86tFvGydgpf


Generated by Claude Code

claude added 4 commits October 1, 2026 04:34
…s found

A pass over the real app under Xvfb, by mouse, on the clew repo and a
small Python project, turned up these; each is fixed and tested.

- Churn: the most-changed list counted files deleted or renamed since, and
  a click on one reported a missing path. `git::churn` keeps the files
  that exist under the root now.
- Type map: a name resolved to the first type of that name in the project,
  so `impl Platform for Native` drew an edge to an enum, std's `Read` one
  to a type alias inside a function, and `Value` everywhere one to the
  first `Value`. A name now resolves within its language, to a kind it can
  mean (a Rust impl names a trait), in the same file, then the same
  folder, else not at all. Types local to a function are no nodes, and a
  Rust `type` inside an `impl` is listed as an associated type (it has a
  container now) rather than as a module's type.
- Value trace: following a value into a callee read one line of the
  declaration and took the first `(` on it — `pub(crate)`'s — so a
  wrapped parameter list, or any `pub(crate) fn`, could not be followed.
  It reads the declaration from the name on, over up to 32 lines. Lines
  read off disk were trimmed while the server's columns are on the raw
  line, so closed files were classified at the wrong column, and the
  callee's column was shifted twice for open ones: lines are raw now and
  each node keeps its indentation. `return f(x)` is "passed to f", not
  "returned"; `print(x)` is a call; `x += …` is an assignment even where
  the server lists it as a definition. When a traced file changes, each
  occurrence follows its line by its text; a line gone is marked changed
  and the tab offers to trace again — rows used to jump to stale lines.
- Ask's `changes` tool ignored uncommitted edits: asked what the work in
  progress changed, it answered with the last commit. With edits in the
  working tree it diffs from where the work started to the working tree
  (the branch's merge base, or HEAD on main/master) and says so.
- Glossary: any short all-caps name (`SYSTEM`, `MAX`) was an "acronym". An
  acronym is now one the docs spell out — "Debug Adapter Protocol (DAP)"
  or "LSP (Language Server Protocol)", initials matching. Rustdoc links
  (`[Foo::bar]`, `[text][ref]`) read as their text; the old stripping
  could also pair one link's bracket with the next link's. Each section
  is capped on its own, so many types no longer hide the modules.
- Export: the glossary section was empty unless the docs index had been
  built; the export now starts that build and waits for it (bounded). A
  straight run of visits no longer indents one level per visit — the
  trail nests only at forks. Free text is escaped and identifiers are code
  spans, so `__init__` reads as written. The dialog opens in the project.
- Graph legend: one import-graph legend served every graph ("838 files" on
  the type map). It now says what a node and an arrow are for the graph
  shown, what colour means with heat on or off, and explains the cycle
  and last-run rings where they apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRJ4sDknvQJ86tFvGydgpf
The docs index now carries each file's own doc comment (Rust `//!`, a
Python module docstring, Go's package comment). The glossary lists a
module term for each file that has one, named the way the language names
modules, and finds spelled-out acronyms in it too. This adds a required
field to DocFile, so the protocol version moves to 15 with a new wire
snapshot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRJ4sDknvQJ86tFvGydgpf
pyright looks for a function's callers in other files only within its
workspace folders. Opened on rootUri alone, it answered every incoming
calls request with null, so the LSP-refined call graph lost every
cross-file edge and listed called functions as possibly dead.

initialize now names the root as the one workspace folder, declares
workspace folder support, and answers workspace/workspaceFolders with
the same folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRJ4sDknvQJ86tFvGydgpf
When a traced file changes and a row's line now reads differently, the
row is still marked changed, but it now moves as far as its nearest
re-found neighbour did. Before, it kept its old line number, which after
an insertion above pointed at an unrelated line. The notice now says the
marked rows were edited since the trace.

An exported notes file no longer has two blank lines after an empty
Notes, Bookmarks or Reading trail section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRJ4sDknvQJ86tFvGydgpf
@RutaTang
RutaTang merged commit 8af0cb1 into main Oct 1, 2026
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