# NativeCAD 0.31.0 "Kempe": Pinpoint shows the work as it happens

**No tool is added or removed in 0.31.0 (200 tools; command schema 1.100.0).** The kernel and tool changes in this release are in the CHANGELOG entry. This note covers the two Pinpoint changes: models are drawn from the team stream part by part, and every project page has a Work feed.

## Models come from the stream

Before 0.31.0 a model reached a Pinpoint page as a viewer pack: one file for the whole model, built and copied after each change. Now each part is published to the team stream as its own STEP when it changes, and the page draws the parts it is given.

* Only the parts that changed get a new version. The page shows the new version as B and the previous one as A.
* The `solid` check runs first on each part. A failed check opens a defect pin on that part.
* A part the model no longer has is retired.
* Face ids are the same as in a pack, so pins stay on their faces when a design moves from a pack to the stream.
* A pack is hidden once its design is streamed. Packs copied by hand still work for designs that are not streamed.

## The Work feed

Every build, check, script run and NativeCAD tool call on a project shows on that project's Pinpoint page while it runs and when it ends. No setup per project is needed, and a project nobody set up appears as soon as something works on it.

The feed is grouped into changesets, not listed edit by edit. A changeset is one actor's stretch of work: it has a name when the work gave it one, and otherwise it runs until that actor has been quiet for 30 minutes. Each changeset shows:

* the parts its builds changed,
* the newest verdict of each check, however many times the check ran,
* its runs, when opened,
* a clock while something in it is still running. Running changesets are listed first.

**Compare A/B** on a changeset sets A to the newest version from before the changeset began, on every open model of the project.

### Where the rows come from

| Work | How it reaches the feed |
|---|---|
| NativeCAD tool calls | read from the session journal, calls in flight included; nothing to set up |
| A script | `tools/team/activity.js`: `begin()` and `end()` round a step, or `auto()` to make the whole process one run |
| Any command | `node tools/team/activity.js run --project <name> -- <command>` |
| Naming the work | `node tools/team/activity.js changeset --project <name> "<label>"`, or `NATIVECAD_CHANGESET` in the environment |

The paths above are a checkout's. In an installed package the same files are under the package's `team/` folder: `team/tools/team/activity.js`, and `team/tools/team/stamp.js` for naming a moment of the stream to compare against.

`node tools/team/activity.js list --project <name>` prints the same changesets in the terminal. The section "Work on a project, mirrored in Pinpoint" in `tools/team/README.md` has the details.

## What this note does not claim

* Activity stays on the machine that wrote it. It is not carried to team peers yet.
* Compare A/B needs a kept version from before the changeset began. When there is none, A is not set.
* A check that passes is a row in the feed, not a pin.
* Tested in `tests/test_pinpoint_activity.js`, `tests/test_partstream.js` and `tests/test_cadsf-3488.js`. Compare A/B was tested against a stand-in page, not clicked on a real model.
