@davmash/bygone 0.8.6 → 0.8.7

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.8.7
6
+
7
+ - Refined tour narration controls with clearer playback state, sentence-level skipping, and consolidated play/pause behavior
8
+ - Allowed narration skips to continue across adjacent tour steps and slides while preserving paused playback
9
+ - Improved tour and comparison toolbar controls, including clearer disabled word-wrap feedback
10
+
5
11
  ## 0.8.6
6
12
 
7
13
  - Added optional authored-tour `windowTitle` labels and context-aware desktop and VS Code window titles
package/README.md CHANGED
@@ -98,6 +98,12 @@ new comparison brings the central app window forward and replaces its current
98
98
  session after any unsaved-change confirmation. Tours reuse a dedicated window
99
99
  owned by that same app process.
100
100
 
101
+ When Bygone is quit or restarted for an upgrade, the desktop app remembers the
102
+ open Explore session and tour windows. A normal no-argument launch restores
103
+ them; an explicit file, directory, review, or presentation launch takes
104
+ precedence. Windows whose source files or Git targets no longer exist are
105
+ skipped or replaced with a blank Explore window.
106
+
101
107
  Shell completion is generated from the same command specification as `bygone --help`, including contextual file arguments and local Git refs for branch review. `npm run dev:sync`, the desktop app's command-line installer, and the Homebrew packages install completions automatically. To install one manually, choose the command for your shell:
102
108
 
103
109
  ```bash
package/cli/present.js CHANGED
@@ -46,6 +46,20 @@ async function startPresentation(args, cwd, packageRoot, options = {}) {
46
46
 
47
47
  const server = createServer((request, response) => {
48
48
  const requestUrl = new URL(request.url || '/', 'http://127.0.0.1');
49
+ if (requestUrl.pathname === '/narration/claim') {
50
+ if (request.method !== 'POST') {
51
+ respond(response, 405, 'Method not allowed');
52
+ return;
53
+ }
54
+ if (!isSameOriginLoopbackRequest(request)) {
55
+ respond(response, 403, 'Forbidden');
56
+ return;
57
+ }
58
+ options.onNarrationClaim?.();
59
+ response.writeHead(204, { 'Cache-Control': 'no-store' });
60
+ response.end();
61
+ return;
62
+ }
49
63
  if (requestUrl.pathname === '/tour.json') {
50
64
  response.writeHead(200, {
51
65
  'Content-Type': 'application/json; charset=utf-8',
@@ -180,6 +194,18 @@ function respond(response, statusCode, message) {
180
194
  response.end(message);
181
195
  }
182
196
 
197
+ function isSameOriginLoopbackRequest(request) {
198
+ const origin = request.headers.origin;
199
+ const host = request.headers.host;
200
+ if (typeof origin !== 'string' || typeof host !== 'string') return false;
201
+ try {
202
+ const parsed = new URL(origin);
203
+ return parsed.protocol === 'http:' && parsed.hostname === '127.0.0.1' && parsed.host === host;
204
+ } catch {
205
+ return false;
206
+ }
207
+ }
208
+
183
209
  function escapeHtml(text) {
184
210
  return text
185
211
  .replaceAll('&', '&')
package/docs/present.md CHANGED
@@ -14,6 +14,38 @@ The Files rail is independent of the narrative. Browsing another file keeps
14
14
  the active tour anchor visible and offers **Return to Tour** to restore the
15
15
  scene's intended focus.
16
16
 
17
+ ## Listen to a tour
18
+
19
+ Use **Listen** in the narrative header or **Present → Listen to Tour** in the
20
+ desktop app to read the tour aloud with a device voice. Narration works
21
+ offline and does not send tour text to a hosted speech service.
22
+
23
+ - **Pause/Resume** retains the current sentence; **Stop** clears playback. The
24
+ outer jump controls move one sentence backward or forward within the current
25
+ narration item.
26
+ - Existing Previous and Next controls move through the same scene/step order
27
+ used by continuous narration.
28
+ - Choose any device voice exposed by the browser and a speed from 0.75× to
29
+ 1.5×. Bygone stores those preferences locally and returns to the system
30
+ default if a selected voice disappears.
31
+ - The visible sentence is highlighted while it is spoken. Pausing retains a
32
+ distinct paused highlight without moving keyboard focus.
33
+ - Direct scene, file, or search navigation interrupts speech and leaves it
34
+ paused at the selected tour position. Resume continues from there.
35
+
36
+ Automatic narration reads chapter and scene framing, summaries, bullets,
37
+ step titles and bodies, connection labels, and takeaways. It does not
38
+ automatically read diff contents, code blocks, hashes, line numbers, or raw
39
+ URLs. Those remain visible and available to assistive technology normally.
40
+
41
+ Device voice names and quality depend on the operating system and browser.
42
+ If no device speech engine is exposed, Bygone disables Listen with a specific
43
+ unsupported-device message; lack of network access alone never disables it.
44
+
45
+ Future narration work may add opt-in treatment for code and raw URLs, plus
46
+ higher-quality hosted voices or routing through the agent that originated the
47
+ conversation. Those remain separate from the offline, device-first baseline.
48
+
17
49
  ## Read provenance correctly
18
50
 
19
51
  - Normal walkthrough scenes point to exact committed source evidence.
@@ -48,6 +48,7 @@ not packaged.
48
48
  | --- | --- | --- | --- | --- | --- |
49
49
  | Explain the current branch automatically | Present → Present Current Branch; `bygone present` | Committed merge-base-to-tip range | Read-only | Core | presentation launch and generated-tour tests |
50
50
  | Open an authored walkthrough | Present → Open Authored Tour; `bygone present --tour`; VS Code hand-off | Manifest range, scene, step, exact source anchor | Read-only | Core | reproducible example and tour validation tests |
51
+ | Listen to a generated or authored tour | Narrative Listen controls; Present → Listen to Tour | Existing manifest narrative segmented locally by scene/step and visible sentence | Read-only device TTS; voice/rate preferences remain local; continuous playback follows tour navigation and direct exploration pauses it | Core | narration model/controller and presenter-host tests |
51
52
  | Explain a real stack | `stacked-diff` scene | Exact real Git revisions per panel | Read-only | Advanced | `examples/stacked-diff.bygone` |
52
53
  | Explain a change in conceptual stages | `deconstructed-diff` scene | Explicitly labeled synthetic explanation stages backed by exact hunk IDs | Read-only | Advanced/experimental authoring | `examples/deconstructed-diff.bygone` |
53
54
  | Browse away from the narration | Files rail, change navigation | Browsed file versus active tour focus remain distinct | Read-only; Return to Tour restores narrative focus | Core | tour focus and persistent-anchor tests |