Skip to content

Sharpen method summaries, CLI errors, and review UI; add dark mode - #5

Merged
Raman369AI merged 1 commit into
mainfrom
review-accuracy-and-ui
Sep 27, 2026
Merged

Raman369AI merged 1 commit into
mainfrom
review-accuracy-and-ui

Conversation

@Raman369AI

Copy link
Copy Markdown
Owner

Summary

A review pass from a first-time user's view (someone who knows some Python), run against the bundled example, Threadline itself, and agent-kanban-pm.

Method summary accuracy

  • False "Changes": a callee calling param.method() counted as possibly mutating the caller's argument, even for email: str. Parameters typed as immutable (str, int | None, Optional[str], tuple[int, ...]) are now skipped. Changes that remain only possible show as dashed chips with the source in the tooltip.
  • @dataclass constructions were "probably": any decorator downgraded the call. Imported @dataclass / @total_ordering classes now resolve as direct calls. @staticmethod stays "probably", as the curated corpus requires. Two corpus cases were added.
  • Side effects were missing: Calls now lists methods called on objects the method receives (db.execute, db.commit, repository.save). Library calls show solid, with the library method in the tooltip; unresolved ones are dashed. Clicking one highlights its line.
  • Raises: the summary shows e.g. Raises: HTTPException when a method raises.
  • Search ranking: exact method names first, then name prefixes; project code before tests and lambdas. The live server and saved-HTML search are kept in sync.

threadline review CLI

  • Errors print as plain text rather than JSON; the agent query commands still output JSON.
  • A bad --base names the revision; a missing --output folder is caught before analysis.
  • Warns when no Python files are found; request logging is off.
  • Falls back to a free port when 4173 is busy, unless --port is given.
  • Every option has --help text.

UI

  • Commands: test modules with a main guard move to a collapsed "Test modules you can run" group (19 → 2 real commands on this repo).
  • Clearer labels: the call-map context names the selected step, module cards show the line instead of repeating the file, <module> is gone, and Coverage is explained in plain language.
  • Dark mode: the ~190 hard-coded colors became 45 light-dark() tokens. The page follows the system setting, and a Theme button cycles System / Light / Dark (remembered, and applied before first paint). Below the header, light mode is pixel-identical to before.
  • Header: a ☰ button replaces "Hide sidebar"; the Coverage button is removed.
  • Instructions: a corner button replaces "Source only · not executed". Its panel has How to read and Coverage sections, and the analysis-issues badge opens Coverage directly.
  • Resizable code pane: drag the divider, or use the arrow keys; double-click or Enter resets it; the width is remembered.
  • The reading guide now fits narrow windows; before, it overflowed.

Testing

  • Unit tests: 162 pass, including new tests for immutable parameters, search rank, plain-text review errors, the empty-repo warning and the busy-port fallback.
  • test_semantic_accuracy.py: 25 cases pass, 2 of them new.
  • tests/browser_smoke.py in all four modes (live, --changes, --html, --html --changes): all checks pass, including new ones for summary calls and raises, the theme toggle and persistence, divider drag and reset, and Coverage inside Instructions.
  • tests/browser_accessibility.py --browser chrome: 84 checks pass, and axe now runs in both themes at each of 24 states with zero violations.
  • tests/release_smoke.py on a freshly built wheel passes (theme.js is packaged and served). mypy (CI scope) and node --check pass.
  • Not run locally: native Safari (the macOS CI job) and Windows.

Notes for review

  • Two existing test expectations changed on purpose: test_usability.py now expects test modules in their own testCommands catalog category, and one browser check looks up each module card's scope id because cards no longer repeat the file name.
  • New asset threadline/static/theme.js, added to the server routes, the HTML export, CI node --check, and the release smoke test.

🤖 Generated with Claude Code

Summary accuracy:
- Skip immutable-typed parameters (str, int | None, tuple[...]) as possible
  callee mutations, and show remaining possible changes as dashed chips.
- Resolve imported @DataClass / @total_ordering constructions as direct calls.
- List methods called on received objects (db.commit, repository.save) under
  Calls, and add Raises.
- Rank search by name closeness; project code before tests and lambdas.

CLI (threadline review): plain-text errors, clearer --base and --output
messages, warn on no Python files, quiet request log, free-port fallback,
help text for every option.

UI:
- Test modules with a main guard move to a collapsed group on Commands.
- Clearer call-map context, module cards, and Coverage wording.
- Dark mode: every color is a light-dark() token; Theme button cycles
  System / Light / Dark. Light mode is pixel-identical below the header.
- Hamburger sidebar toggle; corner Instructions button holds the reading
  guide and Coverage; resizable code pane.

Tests: new unit, semantic-corpus, and browser checks; axe now runs in
both themes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Raman369AI
Raman369AI merged commit c728557 into main Sep 27, 2026
14 checks passed
@Raman369AI
Raman369AI deleted the review-accuracy-and-ui branch September 27, 2026 02:18
@Raman369AI Raman369AI mentioned this pull request Sep 27, 2026
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.

1 participant