Skip to content

Netlist review threads (async, in git) - #34

Merged
xtofalex merged 2 commits into
mainfrom
review-threads
Nov 1, 2026
Merged

xtofalex merged 2 commits into
mainfrom
review-threads

Conversation

@xtofalex

@xtofalex xtofalex commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Lets people (and agents) leave findings on a netlist and pass them to each other asynchronously, through git. A review is a directory committed next to the design; see docs/review_format.md.

Format

  • One new file per write (threads/<id>/thread.json, then one file per comment or status change); no file is ever rewritten, so two branches commenting on the same thread merge cleanly.
  • Objects are identified by naja ids only (instance id_path, term/net id, bus bit); names are stored only as labels.
  • Each thread is pinned to the netlist it was written on, stored in the review as a content-addressed naja-if snapshot. On another netlist a thread is listed, not drawn (other_snapshot): no name-based guessing. naja-schematic --review DIR alone opens the latest snapshot (--snapshot ID picks one).

Python host

  • review.py: format, anchor location, resolution, snapshots.
  • ViewerSession pushes review_response after each root load and every write; review_add_thread / review_add_event requests.
  • naja-schematic --review DIR [--author NAME], review= on show() / Schematic.
  • Requires najaeda 0.7.34 (SNLDesign.getNetByID, SNLNet.getID).

Viewer

  • Review tab: open/all filter, comments, Reply, Resolve / Won't Fix / Reopen, Select / Show in Schematic.
  • "Add Comment..." in the tree's instance/pin/net menus and the schematic's box/pin menus (when the host has an author).
  • [n] open threads after tree rows, numbered badge on schematic boxes (also in SVG exports).
  • nets_response entries carry net_id (both backends).

Not in this PR

  • Native desktop app (LocalSNLProvider) review support: the Review tab there says no review is loaded.
  • Saved views, Markdown report, CI check (later milestones).

Testing

  • pytest python/tests: 177 passed, 1 skipped.
  • Native ctest: 244 passed (new ReviewStoreTest, ReviewViewTest, net_id checks).
  • Tried in a browser against the Python host: listing, selecting, replying, resolving/reopening, commenting on a net from the tree, schematic badge; each write added exactly one file.

A review is a directory committed with the design (docs/review_format.md):
threads anchored on netlist objects by naja ids only, one new file per
write so branches merge without conflicts, and the netlist each thread was
written on stored as a content-addressed naja-if snapshot.

- review.py: the format, anchor location by ids (names only at write time),
  resolution (exact / other_snapshot / unresolved), snapshots.
- ViewerSession pushes review_response after each root load and every
  write; review_add_thread / review_add_event requests.
- naja-schematic --review DIR [--author NAME]; --review alone opens the
  latest snapshot (--snapshot ID picks one). review= on show()/Schematic.
- Requires najaeda 0.7.34 (SNLDesign.getNetByID, SNLNet.getID).
- ReviewStore parses the host's review_response and matches threads to
  objects by ids only (instance id_path, term/net id, bit), and only those
  the host resolved exact on the loaded design.
- Review tab: open/all filter, a thread's comments, Reply, Resolve /
  Won't Fix / Reopen, Select / Show in Schematic, the snapshot id of a
  thread written on another netlist. Selecting a thread keeps the tab in
  front.
- "Add Comment..." in the tree's instance/pin/net menus and the schematic's
  box/pin menus (writable hosts only); [n] open threads after tree rows and
  a numbered badge on schematic boxes, drawn through the painter.
- nets_response entries carry net_id (both backends), so a net row can
  anchor a thread.
@xtofalex
xtofalex merged commit 5eaa36f into main Nov 1, 2026
15 checks passed
@xtofalex
xtofalex deleted the review-threads branch November 1, 2026 00:32
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