@davmash/bygone 0.9.7 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.md +74 -1
  3. package/cli/commandSpec.js +2 -0
  4. package/cli/completions.js +3 -3
  5. package/cli/present.js +28 -10
  6. package/cli/tour.js +22 -1
  7. package/cli/tourExport.js +147 -0
  8. package/cli/tourFile.js +109 -4
  9. package/cli/tourHistory.js +31 -1
  10. package/completions/_bygone +1 -1
  11. package/completions/bygone +1 -1
  12. package/completions/bygone.fish +1 -1
  13. package/docs/change-tour-format.md +86 -67
  14. package/docs/explore.md +14 -3
  15. package/docs/generating-change-tours.md +84 -46
  16. package/docs/present.md +103 -14
  17. package/docs/product-surface.md +19 -8
  18. package/docs/sharing-tours.md +95 -0
  19. package/docs/visual-walkthrough/README.md +89 -0
  20. package/docs/visual-walkthrough/build-tour.mjs +54 -0
  21. package/docs/visual-walkthrough/capture-desktop.cjs +42 -0
  22. package/docs/visual-walkthrough/capture-desktop.mjs +21 -0
  23. package/docs/visual-walkthrough/captures.md +49 -0
  24. package/docs/visual-walkthrough/create-demo.mjs +57 -0
  25. package/docs/visual-walkthrough/deconstructed-demo.bygone +100 -0
  26. package/docs/visual-walkthrough/images/01-two-files.png +0 -0
  27. package/docs/visual-walkthrough/images/02-many-panels.png +0 -0
  28. package/docs/visual-walkthrough/images/03-directories.png +0 -0
  29. package/docs/visual-walkthrough/images/04-search.png +0 -0
  30. package/docs/visual-walkthrough/images/05-repository-history.png +0 -0
  31. package/docs/visual-walkthrough/images/06-file-history.png +0 -0
  32. package/docs/visual-walkthrough/images/07-branch-review.png +0 -0
  33. package/docs/visual-walkthrough/images/08-tour-reader.png +0 -0
  34. package/docs/visual-walkthrough/images/09-focused-step.png +0 -0
  35. package/docs/visual-walkthrough/images/10-deconstructed.png +0 -0
  36. package/docs/visual-walkthrough/images/11-exploration.png +0 -0
  37. package/docs/visual-walkthrough/images/12-authoring.png +0 -0
  38. package/docs/visual-walkthrough/images/13-export.png +0 -0
  39. package/docs/visual-walkthrough/images/14-vscode.png +0 -0
  40. package/docs/visual-walkthrough/images/15-cli.png +0 -0
  41. package/docs/visual-walkthrough/narrative.md +134 -0
  42. package/docs/visual-walkthrough/outline.md +52 -0
  43. package/docs/visual-walkthrough/walkthrough.bygone +340 -0
  44. package/docs/walkthrough.md +6 -101
  45. package/examples/bygone-history.bygone +11 -44
  46. package/examples/marker-focus.bygone +116 -0
  47. package/examples/navigation-lab.bygone.yaml +401 -336
  48. package/examples/tour-orientation.bygone +349 -0
  49. package/media/diff.worker.js +13 -3
  50. package/media/webview.css +1 -1
  51. package/media/webview.js +394 -319
  52. package/out/changeTour.js +865 -397
  53. package/out/deepLink.js +167 -0
  54. package/out/historyDirectory.js +66 -0
  55. package/out/standalone-main.js +20515 -16822
  56. package/out/tourCoverage.js +850 -386
  57. package/out/tourDocument.js +97 -0
  58. package/package.json +1 -1
  59. package/schemas/change-tour-source.schema.json +91 -64
  60. package/skills/pr-tour-guide/SKILL.md +144 -128
  61. package/skills/pr-tour-guide/references/expectations-and-feedback.md +57 -0
  62. package/standalone/index.html +10 -25
  63. package/web/export-bootstrap.js +62 -0
  64. package/web/export-licenses.txt +78 -0
  65. package/web/export-runtime.json +12 -0
  66. package/web/index.html +54 -47
  67. package/web/presenter.css +337 -176
  68. package/web/web-host.js +239 -137
@@ -0,0 +1,340 @@
1
+ {
2
+ "version": 4,
3
+ "title": "Bygone, one screen at a time",
4
+ "range": {
5
+ "base": "e431a208f5ad24e3fae1a22300a14fc7d041375f",
6
+ "head": "32bf8166cf6ae852fa801a540fe722b4070d5f4f"
7
+ },
8
+ "anchors": {
9
+ "two-files": {
10
+ "file": "docs/visual-walkthrough/narrative.md",
11
+ "revision": "head",
12
+ "contains": "### Two files, one visual comparison"
13
+ },
14
+ "many-panels": {
15
+ "file": "docs/visual-walkthrough/narrative.md",
16
+ "revision": "head",
17
+ "contains": "### Keep more versions in view"
18
+ },
19
+ "directories": {
20
+ "file": "docs/visual-walkthrough/narrative.md",
21
+ "revision": "head",
22
+ "contains": "### Start with the directory"
23
+ },
24
+ "search": {
25
+ "file": "docs/visual-walkthrough/narrative.md",
26
+ "revision": "head",
27
+ "contains": "### Find without abandoning the comparison"
28
+ },
29
+ "repository-history": {
30
+ "file": "docs/visual-walkthrough/narrative.md",
31
+ "revision": "head",
32
+ "contains": "### Begin with repository history"
33
+ },
34
+ "file-history": {
35
+ "file": "docs/visual-walkthrough/narrative.md",
36
+ "revision": "head",
37
+ "contains": "### Follow a file through real revisions"
38
+ },
39
+ "branch-review": {
40
+ "file": "docs/visual-walkthrough/narrative.md",
41
+ "revision": "head",
42
+ "contains": "### Review the shape of a branch"
43
+ },
44
+ "tour-reader": {
45
+ "file": "docs/visual-walkthrough/narrative.md",
46
+ "revision": "head",
47
+ "contains": "### Read the tour as a document"
48
+ },
49
+ "focused-step": {
50
+ "file": "docs/visual-walkthrough/narrative.md",
51
+ "revision": "head",
52
+ "contains": "### Keep the explanation beside its evidence"
53
+ },
54
+ "deconstructed": {
55
+ "file": "docs/visual-walkthrough/narrative.md",
56
+ "revision": "head",
57
+ "contains": "### Separate explanation stages from commits"
58
+ },
59
+ "exploration": {
60
+ "file": "docs/visual-walkthrough/narrative.md",
61
+ "revision": "head",
62
+ "contains": "### Explore, then return to the story"
63
+ },
64
+ "authoring": {
65
+ "file": "docs/visual-walkthrough/narrative.md",
66
+ "revision": "head",
67
+ "contains": "### Write the tour with explicit evidence"
68
+ },
69
+ "export": {
70
+ "file": "docs/visual-walkthrough/narrative.md",
71
+ "revision": "head",
72
+ "contains": "### Share a particular place or a portable view"
73
+ },
74
+ "vscode": {
75
+ "file": "docs/visual-walkthrough/narrative.md",
76
+ "revision": "head",
77
+ "contains": "### Stay near the editor in VS Code"
78
+ },
79
+ "cli": {
80
+ "file": "docs/visual-walkthrough/narrative.md",
81
+ "revision": "head",
82
+ "contains": "### Choose the launch that matches the question"
83
+ }
84
+ },
85
+ "connections": [],
86
+ "chapters": [
87
+ {
88
+ "id": "chapter-1",
89
+ "title": "Compare what is in front of you",
90
+ "scenes": [
91
+ {
92
+ "id": "arc-1",
93
+ "title": "Compare what is in front of you",
94
+ "summary": "Start with concrete files. The same visual language scales from two versions to directories and search.",
95
+ "bullets": [],
96
+ "tags": [
97
+ "visual-guide"
98
+ ],
99
+ "takeaway": "Start with concrete files. The same visual language scales from two versions to directories and search.",
100
+ "steps": [
101
+ {
102
+ "id": "two-files",
103
+ "title": "Two files, one visual comparison",
104
+ "body": "Start with two files when you already know what belongs on each side. Blue regions connect corresponding changed text; green regions mark content present on only one side. The ribbons show where the regions meet across the gutter. Read the pane labels before interpreting the colors: a local file can be editable, while a historical snapshot is read-only. Change navigation moves between the interesting regions without requiring you to scan every line.",
105
+ "focus": "two-files",
106
+ "depth": "explained",
107
+ "image": {
108
+ "file": "docs/visual-walkthrough/images/01-two-files.png",
109
+ "revision": "head",
110
+ "alt": "Two JavaScript files with paired blue changes, green additions, and gutter ribbons connecting the regions."
111
+ }
112
+ },
113
+ {
114
+ "id": "many-panels",
115
+ "title": "Keep more versions in view",
116
+ "body": "A comparison can contain more than two panels. Visible panels controls how many fit in the window, while the active adjacent pair determines the current diff. Choose a fixed density or Fit; a narrower window may show fewer panels. The numbered headers keep the sequence legible. Use this when two endpoints hide an intermediate version that matters to the explanation.",
117
+ "focus": "many-panels",
118
+ "depth": "explained",
119
+ "image": {
120
+ "file": "docs/visual-walkthrough/images/02-many-panels.png",
121
+ "revision": "head",
122
+ "alt": "Three of five JavaScript versions are visible, with Fit selected and the first adjacent pair active."
123
+ }
124
+ },
125
+ {
126
+ "id": "directories",
127
+ "title": "Start with the directory",
128
+ "body": "When you know the area but not the file, compare directories first. The inventory puts additions, deletions, and changed files together. Open a file to inspect its contents, then return to the directory. This keeps the question “which file matters?” separate from the closer reading of its lines.",
129
+ "focus": "directories",
130
+ "depth": "explained",
131
+ "image": {
132
+ "file": "docs/visual-walkthrough/images/03-directories.png",
133
+ "revision": "head",
134
+ "alt": "The before and after directory trees align three modified files and one added changelog."
135
+ }
136
+ },
137
+ {
138
+ "id": "search",
139
+ "title": "Find without abandoning the comparison",
140
+ "body": "Search helps when you know a name or phrase but not its location. Choose the scope before interpreting the results: visible panes, all comparison panels, the current change set, and Git history answer different questions. A result takes you back to the matching evidence. Replacement is a separate operation and depends on whether the target is writable.",
141
+ "focus": "search",
142
+ "depth": "explained",
143
+ "image": {
144
+ "file": "docs/visual-walkthrough/images/04-search.png",
145
+ "revision": "head",
146
+ "alt": "A search for publish finds one result in each of the two visible comparison panes."
147
+ }
148
+ }
149
+ ]
150
+ }
151
+ ]
152
+ },
153
+ {
154
+ "id": "chapter-2",
155
+ "title": "Ask how it got here",
156
+ "scenes": [
157
+ {
158
+ "id": "arc-2",
159
+ "title": "Ask how it got here",
160
+ "summary": "Add time to the comparison. Follow a path through commits or begin with the shape of a whole branch.",
161
+ "bullets": [],
162
+ "tags": [
163
+ "visual-guide"
164
+ ],
165
+ "takeaway": "Add time to the comparison. Follow a path through commits or begin with the shape of a whole branch.",
166
+ "steps": [
167
+ {
168
+ "id": "repository-history",
169
+ "title": "Begin with repository history",
170
+ "body": "Repository history combines file navigation with the commit axis. Here, the latest commit adds CHANGELOG.md: the earlier pane is explicitly absent. Files and Commits are two ways to choose your next question. Revision labels identify the snapshots being compared; commit-list selections are a draft until you apply them. The numbered badges show which revisions occupy the comparison panels.",
171
+ "focus": "repository-history",
172
+ "depth": "explained",
173
+ "image": {
174
+ "file": "docs/visual-walkthrough/images/05-repository-history.png",
175
+ "revision": "head",
176
+ "alt": "The commit navigator marks two loaded revisions; the comparison shows CHANGELOG.md added in the newest commit."
177
+ }
178
+ },
179
+ {
180
+ "id": "file-history",
181
+ "title": "Follow a file through real revisions",
182
+ "body": "File history brings that same timeline to one path. The panels show exact historical contents, making a changed line something you can place in time. History and Compare share the window controls. Use the file navigation to visit files changed by the selected comparison, and the change controls to move within the open file.",
183
+ "focus": "file-history",
184
+ "depth": "explained",
185
+ "image": {
186
+ "file": "docs/visual-walkthrough/images/06-file-history.png",
187
+ "revision": "head",
188
+ "alt": "Two pinned release.js revisions show a new channel field and sorted return value beside the commit navigator."
189
+ }
190
+ },
191
+ {
192
+ "id": "branch-review",
193
+ "title": "Review the shape of a branch",
194
+ "body": "A branch review starts with an overview of the committed range. Its suggested reading order helps you choose an entry point; the complete file list remains available. The range labels matter: this is a comparison of committed evidence, not an implicit inclusion of every local edit. Start broad, then drill into the files that explain the change.",
195
+ "focus": "branch-review",
196
+ "depth": "explained",
197
+ "image": {
198
+ "file": "docs/visual-walkthrough/images/07-branch-review.png",
199
+ "revision": "head",
200
+ "alt": "The branch overview recommends starting with release.yaml, paying attention to release.js, and shows four changed files."
201
+ }
202
+ }
203
+ ]
204
+ }
205
+ ]
206
+ },
207
+ {
208
+ "id": "chapter-3",
209
+ "title": "Turn exploration into an explanation",
210
+ "scenes": [
211
+ {
212
+ "id": "arc-3",
213
+ "title": "Turn exploration into an explanation",
214
+ "summary": "A tour turns findings into a reading path while leaving room for exploration.",
215
+ "bullets": [],
216
+ "tags": [
217
+ "visual-guide"
218
+ ],
219
+ "takeaway": "A tour turns findings into a reading path while leaving room for exploration.",
220
+ "steps": [
221
+ {
222
+ "id": "tour-reader",
223
+ "title": "Read the tour as a document",
224
+ "body": "A tour adds a written argument to the evidence. The outline groups chapters, scenes, and steps; the continuous narrative establishes the question before pointing at source. Scrolling the narrative advances the reading position. Scrolling the code lets you inspect the evidence without advancing the story. The Narration controls provide another way to follow the same explanation.",
225
+ "focus": "tour-reader",
226
+ "depth": "explained",
227
+ "image": {
228
+ "file": "docs/visual-walkthrough/images/08-tour-reader.png",
229
+ "revision": "head",
230
+ "alt": "A tour outline and continuous narrative introduce a safer release plan above its changed-file overview."
231
+ }
232
+ },
233
+ {
234
+ "id": "focused-step",
235
+ "title": "Keep the explanation beside its evidence",
236
+ "body": "A step brings a precise passage into focus. Its body should explain why those lines matter, rather than repeat their syntax. As you read farther into a scene, the scene heading can stay at the top; expand it to recover the overview. The narrative and evidence remain independently navigable.",
237
+ "focus": "focused-step",
238
+ "depth": "explained",
239
+ "image": {
240
+ "file": "docs/visual-walkthrough/images/09-focused-step.png",
241
+ "revision": "head",
242
+ "alt": "The Preview by default step sits under a sticky scene heading and highlights the dry-run code evidence below."
243
+ }
244
+ },
245
+ {
246
+ "id": "deconstructed",
247
+ "title": "Separate explanation stages from commits",
248
+ "body": "Deconstructed tours group changes into conceptual stages. These are explicitly labeled explanation stages, so they should not be read as a claim about the actual commit sequence. Historical tours and real revision stacks answer the chronological question. Choose the mode that matches the explanation you want to give, and keep its provenance visible.",
249
+ "focus": "deconstructed",
250
+ "depth": "explained",
251
+ "image": {
252
+ "file": "docs/visual-walkthrough/images/10-deconstructed.png",
253
+ "revision": "head",
254
+ "alt": "Deconstructed tour stages show an explanation baseline beside the Carry every anchor stage, with focused TypeScript changes."
255
+ }
256
+ },
257
+ {
258
+ "id": "exploration",
259
+ "title": "Explore, then return to the story",
260
+ "body": "A tour is a route through the material, not a fence around it. Files opens the broader inventory; Commits exposes the available revisions. History and Compare let you investigate a question that the author did not anticipate. Return to tour restores the authored passage after that detour.",
261
+ "focus": "exploration",
262
+ "depth": "explained",
263
+ "image": {
264
+ "file": "docs/visual-walkthrough/images/11-exploration.png",
265
+ "revision": "head",
266
+ "alt": "The Files navigator selects release.yaml while the authored narrative remains above; Return to tour is visible."
267
+ }
268
+ },
269
+ {
270
+ "id": "authoring",
271
+ "title": "Write the tour with explicit evidence",
272
+ "body": "The missing-tour handoff supplies an editable prompt and authoring instructions. It does not call an AI service on your behalf. The authoring workflow remains file based: write a .bygone source, validate the anchors against the intended Git range, then compile or present it. Keeping the evidence explicit makes the tour inspectable and repeatable.",
273
+ "focus": "authoring",
274
+ "depth": "explained",
275
+ "image": {
276
+ "file": "docs/visual-walkthrough/images/12-authoring.png",
277
+ "revision": "head",
278
+ "alt": "An authoring dialog contains an editable prompt, pinned review range, and a Read instructions button."
279
+ }
280
+ }
281
+ ]
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ "id": "chapter-4",
287
+ "title": "Take the work with you",
288
+ "scenes": [
289
+ {
290
+ "id": "arc-4",
291
+ "title": "Take the work with you",
292
+ "summary": "Choose a sharing format and a host that fit the next reader’s question.",
293
+ "bullets": [],
294
+ "tags": [
295
+ "visual-guide"
296
+ ],
297
+ "takeaway": "Choose a sharing format and a host that fit the next reader’s question.",
298
+ "steps": [
299
+ {
300
+ "id": "export",
301
+ "title": "Share a particular place or a portable view",
302
+ "body": "Heading links identify a particular place in the tour. This screenshot shows the other sharing route: an exported HTML document with Tour details expanded. Local desktop links still depend on the referenced repository and tour being available. An HTML export is the portable reading option: minimal exports keep the tour evidence, while full exports also include bounded history. The notice here identifies a minimal snapshot and an embedded viewer requiring no internet. Choose based on how much independent exploration the recipient needs; CDN-backed exports instead require internet for their pinned viewer.",
303
+ "focus": "export",
304
+ "depth": "explained",
305
+ "image": {
306
+ "file": "docs/visual-walkthrough/images/13-export.png",
307
+ "revision": "head",
308
+ "alt": "An exported tour has Tour details expanded: minimal snapshot, no browsable history, embedded viewer, no internet required."
309
+ }
310
+ },
311
+ {
312
+ "id": "vscode",
313
+ "title": "Stay near the editor in VS Code",
314
+ "body": "The VS Code companion handles contextual file comparison and file history near the editor. Larger repository, directory, multi-panel, and authored-tour work can open in Desktop. This is a division of workflows across hosts, with the same visual diff language carrying between them.",
315
+ "focus": "vscode",
316
+ "depth": "explained",
317
+ "image": {
318
+ "file": "docs/visual-walkthrough/images/14-vscode.png",
319
+ "revision": "head",
320
+ "alt": "VS Code hosts a read-only Bygone file history comparison next to the Explorer and source tabs."
321
+ }
322
+ },
323
+ {
324
+ "id": "cli",
325
+ "title": "Choose the launch that matches the question",
326
+ "body": "The CLI provides direct entry points: two paths for a comparison, --history for a file or directory, --git-diff for revisions, review for a branch, and present --tour for an authored document. The tour subcommands provide schema, validation, compilation, and export. Start with the smallest question you can name, then use the shared window to expand the investigation.",
327
+ "focus": "cli",
328
+ "depth": "explained",
329
+ "image": {
330
+ "file": "docs/visual-walkthrough/images/15-cli.png",
331
+ "revision": "head",
332
+ "alt": "A VS Code terminal displays the CLI usage forms for comparison, history, review, presentation, validation, compilation, and export."
333
+ }
334
+ }
335
+ ]
336
+ }
337
+ ]
338
+ }
339
+ ]
340
+ }
@@ -1,103 +1,8 @@
1
- # Bygone Walkthrough
1
+ # Bygone visual walkthrough
2
2
 
3
- This walkthrough uses Bygone on the Bygone source tree itself, so every screenshot shows real project data rather than sample filler.
3
+ The [15-screen visual guide](visual-walkthrough/README.md) covers the major
4
+ Bygone workflows with real screenshots and an executable Bygone tour.
4
5
 
5
- Source files used below:
6
-
7
- - `src/fileComparator.ts`
8
- - `media/script.js`
9
- - `media/dom.js`
10
- - the repository root for Git directory history
11
-
12
- ## 1. Start In Directory History
13
-
14
- If you launch Bygone with no arguments from the repo root, it opens Git directory history for the current directory:
15
-
16
- ```bash
17
- cd ~/code/bygone
18
- ./bin/bygone.js
19
- ```
20
-
21
- You can also be explicit:
22
-
23
- ```bash
24
- ./bin/bygone.js --history ~/code/bygone
25
- ```
26
-
27
- ![Directory history view](../media/walkthrough/directory-history.png)
28
-
29
- What to look for:
30
-
31
- - The timeline controls at the top move commit-by-commit.
32
- - The left rail defaults to `History`, with `Changed Files` available as a secondary scope.
33
- - The main panes compare directory snapshots, not individual files.
34
- - This is the best starting point when you want to answer “what changed in this repo over time?”
35
-
36
- ## 2. Narrow Down To One File
37
-
38
- For a file-level history view, point Bygone at a single tracked file:
39
-
40
- ```bash
41
- ./bin/bygone.js --history ~/code/bygone/src/fileComparator.ts
42
- ```
43
-
44
- ![File history view](../media/walkthrough/file-history.png)
45
-
46
- What to look for:
47
-
48
- - The history rail stays visible and becomes the primary way to jump between commits for that file.
49
- - Commit labels stay pinned above the two panes, so it is always clear which revision is on each side.
50
- - Change navigation sits above the editors. `Cmd/Ctrl+Alt+Up` and `Cmd/Ctrl+Alt+Down` jump between diff hunks.
51
- - This view is useful when you already know the file and want to understand how a specific implementation evolved.
52
-
53
- ## 3. Open A Direct Two-File Diff
54
-
55
- For a plain compare outside Git history, pass two files:
56
-
57
- ```bash
58
- ./bin/bygone.js ~/code/bygone/media/script.js ~/code/bygone/media/dom.js
59
- ```
60
-
61
- ![Direct file diff view](../media/walkthrough/direct-file-diff.png)
62
-
63
- What to look for:
64
-
65
- - There is no history rail here because this is a direct file-to-file compare, not a history session.
66
- - The compare stays focused on the diff canvas: current change position, copy controls, and hunk traversal.
67
- - `Editing On` indicates that both panes are editable in this mode.
68
- - This is the fastest path when you want to compare two working files directly, regardless of Git history.
69
-
70
- ## 4. Recommended Mental Model
71
-
72
- The current UI makes the most sense if you think about it along two axes:
73
-
74
- - `file` vs `directory`
75
- - `git-backed history` vs `direct compare`
76
-
77
- That yields the core flows:
78
-
79
- - directory history
80
- - file history
81
- - directory diff
82
- - file diff
83
-
84
- The shell then stays mostly consistent:
85
-
86
- - context at the top
87
- - commit navigation only in history-backed views
88
- - history or changed-files navigation in the left rail when it adds value
89
- - change navigation and copy actions close to the diff panes
90
-
91
- ## 5. Practical Shortcuts
92
-
93
- - `bygone` or `bygone <directory>`: open Git directory history
94
- - `bygone <file>`: open file history
95
- - `bygone <left> <right>`: open a direct file or directory compare
96
- - `Cmd/Ctrl+Alt+Down`: next change
97
- - `Cmd/Ctrl+Alt+Up`: previous change
98
-
99
- ## 6. When To Use Which View
100
-
101
- - Start in directory history when the question is “what happened in this area of the repo?”
102
- - Switch to file history when the question becomes “how did this file get here?”
103
- - Use direct file diff when you already have two concrete files and just want the compare.
6
+ Start with the [opening instructions](visual-walkthrough/README.md#open-the-tour),
7
+ or read the [narrative](visual-walkthrough/narrative.md) and browse the
8
+ [screenshots](visual-walkthrough/images/).
@@ -1,52 +1,19 @@
1
- version: 3
1
+ version: 5
2
2
  title: How Bygone learned to review a branch
3
+ opening:
4
+ title: How does a branch become reviewable evidence?
5
+ summary: Follow one branch-review pipeline from merge-base selection to temporary trees and the existing directory viewer. The final fixture checks the historical boundary; this tour does not assess every renderer behavior.
6
+ conclusion:
7
+ title: A stable boundary reaches the existing viewer
8
+ summary: The pipeline resolves the merge base before materializing snapshots, then hands those trees to the directory comparison surface. The fixture protects that range choice.
9
+ bullets:
10
+ - Git preparation and rendering meet at the temporary-tree boundary.
11
+ - The cited test establishes range semantics; interactive renderer behavior needs its own checks.
3
12
  sourceUrl: https://github.com/davidmashburn/bygone/commit/75b6d7c0303124ec314aa790d6b808c4a9d9ea0e
4
13
  range:
5
14
  base: 292fe9248c5c49f762489dc688296fc100d120bc
6
15
  head: 75b6d7c0303124ec314aa790d6b808c4a9d9ea0e
7
16
 
8
- review:
9
- baseOid: 292fe9248c5c49f762489dc688296fc100d120bc
10
- headOid: 75b6d7c0303124ec314aa790d6b808c4a9d9ea0e
11
- items:
12
- - id: merge-base-contract
13
- kind: concept
14
- title: Merge-base defines the reviewed history
15
- body: "resolveBranchReviewRange selects one merge base, then derives changed paths and commits from that boundary. The review is the merge-base-to-head story."
16
- evidence:
17
- - sceneId: review-pipeline
18
- stepId: establish-boundary
19
- - sceneId: review-pipeline
20
- stepId: lock-the-semantics
21
- - id: git-directory-boundary
22
- kind: boundary
23
- title: Git-specific work ends at two trees
24
- body: "The Git layer discovers the range and materializes snapshots; FileComparator then hands those temporary roots to the ordinary directory comparison. A reader needs the range model before the reusable directory surface is meaningful."
25
- evidence:
26
- - sceneId: review-pipeline
27
- stepId: make-range-portable
28
- - sceneId: review-pipeline
29
- stepId: turn-history-into-files
30
- - sceneId: review-pipeline
31
- stepId: reuse-the-diff-surface
32
- - id: setup-owns-complexity
33
- kind: tradeoff
34
- title: Review support moves complexity into range and snapshot setup
35
- body: "Reusing directory comparison avoids a branch-only renderer, while range resolution and temporary snapshot creation add complexity before that renderer."
36
- evidence:
37
- - sceneId: review-pipeline
38
- stepId: establish-boundary
39
- - sceneId: review-pipeline
40
- stepId: turn-history-into-files
41
- - sceneId: review-pipeline
42
- stepId: reuse-the-diff-surface
43
- - id: partial-materialization-cleanup
44
- kind: question
45
- title: Does a failed materialization clean up both temporary roots?
46
- body: "The focused walkthrough follows the successful handoff, but it does not prove cleanup when git show fails after one root has been partially populated."
47
- evidence: []
48
- nextCheck: "Inspect the preparation-error path and add a fault-injection fixture only if a failed materialization leaves either temporary root behind."
49
-
50
17
  anchors:
51
18
  choose-merge-base:
52
19
  file: src/gitComparison.ts
@@ -89,7 +56,7 @@ chapters:
89
56
  scenes:
90
57
  - id: review-pipeline
91
58
  title: From Git history to a visual workspace
92
- summary: Follow the branch-review feature from its historical boundary to the reusable comparison surface and the test that fixes its semantics.
59
+ summary: Which historical boundary should a branch review show? Trace the range resolver, tree materialization, and viewer handoff, then inspect the fixture. Notice that the merge base is chosen before any comparison files are created.
93
60
  bullets:
94
61
  - Resolve the range before materializing files for the comparison.
95
62
  - Keep Git-specific preparation at the temporary-tree handoff.
@@ -0,0 +1,116 @@
1
+ version: 5
2
+ title: Keep highlighted code in view when panels resize
3
+ opening:
4
+ title: Resizing a panel should not lose the highlighted code
5
+ summary: >-
6
+ A tour reveals a line of code. You resize a panel, and that line can move out of view—even
7
+ though you never scrolled. This fix changes which editor events trigger linked scrolling. Follow
8
+ the unwanted path, the guard that blocks it, and the tests that keep normal scrolling intact.
9
+ conclusion:
10
+ title: Keep redraws; synchronize only actual movement
11
+ summary: >-
12
+ The handler now distinguishes a changed scrollable area from a changed scroll position.
13
+ Layout-only events redraw the connectors and stop; unsuppressed movement still synchronizes. The
14
+ tests establish that routing distinction. They do not reproduce a resize, so the final visual
15
+ check is whether highlighted code stays in view when a panel changes size.
16
+ range:
17
+ base: a50c2a6f58a2dfd7f85039105a27e4b92b98a3f7
18
+ head: 901a193203e4840dbf6e06c6a273fac7f2d713bd
19
+ anchors:
20
+ before-guard:
21
+ file: media/script.js
22
+ revision: base
23
+ contains: |2-
24
+ editor.onDidScrollChange(() => {
25
+ if (suppressEditorEvents) {
26
+ connectorController.scheduleDrawConnections();
27
+ return;
28
+ }
29
+
30
+ if (editorMode === MODE_MULTI_WAY) {
31
+ synchronizeMultiScroll(editor);
32
+ } else {
33
+ synchronizeEditorScroll(editor);
34
+ }
35
+ connectorController.scheduleDrawConnections();
36
+ });
37
+ ignore-layout:
38
+ file: media/script.js
39
+ revision: head
40
+ contains: |2-
41
+ if (suppressEditorEvents || (!event.scrollTopChanged && !event.scrollLeftChanged)) {
42
+ connectorController.scheduleDrawConnections();
43
+ return;
44
+ }
45
+ width-test:
46
+ file: test/runTests.js
47
+ revision: head
48
+ contains: |2-
49
+ assert.deepEqual(
50
+ invokeScrollHandler({ scrollTopChanged: false, scrollLeftChanged: false, scrollWidthChanged: true }),
51
+ ['draw']
52
+ );
53
+ real-scroll-tests:
54
+ file: test/runTests.js
55
+ revision: head
56
+ contains: |2-
57
+ assert.deepEqual(
58
+ invokeScrollHandler({ scrollTopChanged: true, scrollLeftChanged: false }),
59
+ ['two-way-scroll', 'draw']
60
+ );
61
+ assert.deepEqual(
62
+ invokeScrollHandler({ scrollTopChanged: false, scrollLeftChanged: true }, 'multi-way'),
63
+ ['multi-scroll', 'draw']
64
+ );
65
+ connections: []
66
+ chapters:
67
+ - id: focus
68
+ title: Preserve code focus
69
+ scenes:
70
+ - id: marker-focus
71
+ title: Why a resize can move code—and where to stop it
72
+ summary: >-
73
+ The scroll callback also reports changes in how much content can be scrolled. The old
74
+ handler does not inspect that distinction. We’ll compare it with the new guard, then test
75
+ the layout-only case and real movement separately.
76
+ takeaway: >-
77
+ Filter the event before synchronization; preserve the redraw and the normal scrolling
78
+ path.
79
+ steps:
80
+ - id: before-guard
81
+ title: The old handler treats an unsuppressed event as movement
82
+ body: >-
83
+ After the suppression check, every event reaches a synchronizer selected by panel
84
+ mode. The handler never asks whether the position moved. The fix’s source comment
85
+ identifies the consequence: synchronizing a layout-only notification can push a
86
+ revealed code anchor out of view.
87
+ focus: before-guard
88
+ - id: ignore-layout
89
+ title: Redraw layout changes without moving the other panels
90
+ body: >-
91
+ The new condition asks whether either scroll position changed. If neither did, it
92
+ redraws the lines connecting matching code and returns before synchronization.
93
+ Existing event suppression also takes this early exit. Unsuppressed movement still
94
+ reaches the synchronizer, so fixing the resize case does not require disabling linked
95
+ scrolling.
96
+ focus: ignore-layout
97
+ - id: width-test
98
+ title: A wider scrollable area must not move the code
99
+ body: >-
100
+ The test changes the scrollable width while leaving both position flags false. It
101
+ expects only a connector redraw. Calling a synchronizer here would reopen the route by
102
+ which layout changes can disturb a code reveal.
103
+ focus: width-test
104
+ - id: real-scroll-tests
105
+ title: Real movement must still keep panels together
106
+ body: >-
107
+ Skipping synchronization for every scroll event would pass the previous check but break linked scrolling.
108
+ These assertions rule that out: vertical movement in two-panel mode and horizontal
109
+ movement in multi-panel mode each synchronize, then redraw. Panel mode selects the
110
+ synchronizer; the direction of movement does not. These tests check callback routing,
111
+ not on-screen marker visibility.
112
+ focus: real-scroll-tests
113
+ bullets: []
114
+ tags:
115
+ - scrolling
116
+ - bug-fix