Repository navigation
Commit 3640966
PR 1: Correct open and watch behavior (v0.6) (#19)
* fix: generate standards-correct file URLs for <base href> (mdo-bs3.1.2)
Replace the hand-rolled path-to-URL string transform with
url::Url::from_directory_path, which percent-encodes reserved and
non-ASCII characters (spaces, #, %, ?, Unicode) and handles Windows
drive letters, UNC paths, and \\?\ extended-length prefixes. Paths
that cannot form a valid file:// URL now omit the <base href> tag
instead of emitting a broken one.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix: honest --open failures and rename-resilient watch mode (mdo-bs3.1.1, mdo-bs3.1.3)
--open now exits non-zero when the browser launch fails after a
successful render, printing the error and the surviving rendered path
to stderr. mdo-open propagates the child's exit status instead of
always reporting success (CREATE_NO_WINDOW preserved on Windows).
Watch mode now watches the parent directory and filters events to the
target file, so atomic temp-file-rename saves no longer kill the
watch. Trailing-edge debounce coalesces save bursts into one render
and cannot drop the final event; failed renders keep the loop alive.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* ci: run tests on Windows with registry-safe seams (mdo-bs3.1.4)
Windows CI now runs the full test suite instead of compile-only
checking. Registry install/uninstall is split into a pure plan builder
(unit-tested for key/value composition, wrapper branching, and
best-effort semantics) and a thin reg.exe executor, so no test touches
the real registry. New wrapper integration tests cover argument
forwarding and exit-status propagation; setup-launcher argument
construction gains metacharacter coverage.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix: address cross-review findings on open/watch correctness
Findings from an independent GPT-5.6 review plus orchestrator review:
- Gate Unix-rooted dir_to_file_url tests with cfg(unix); they panicked
under the new Windows CI test job because /home/... is not an
absolute Windows path.
- Debounce deadline is now extended only by events for the watched
file, so sibling-file churn cannot postpone rendering indefinitely.
- Register the directory watch before the initial render so a save
landing during that render is queued instead of lost (also removes
the readiness race in the watch tests).
- Treat an opener that spawns but exits nonzero within 2s as a launch
failure (xdg-open with no browser handler, macOS open with no
association) instead of reporting success on spawn alone.
- Document the symlinked-input watch limitation; strengthen the
sibling-change test with an mtime assertion and add coverage for the
failing-opener path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 5fc396c commit 3640966
10 files changed
Lines changed: 1174 additions & 123 deletions
File tree
- .github/workflows
- src
- bin
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
| |||
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
70 | 83 | | |
71 | | - | |
72 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
73 | 93 | | |
74 | 94 | | |
75 | 95 | | |
| |||
98 | 118 | | |
99 | 119 | | |
100 | 120 | | |
101 | | - | |
102 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
103 | 129 | | |
104 | 130 | | |
105 | 131 | | |
106 | 132 | | |
107 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
108 | 149 | | |
109 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
110 | 154 | | |
111 | 155 | | |
112 | 156 | | |
| |||
130 | 174 | | |
131 | 175 | | |
132 | 176 | | |
133 | | - | |
| 177 | + | |
134 | 178 | | |
135 | 179 | | |
136 | 180 | | |
137 | 181 | | |
138 | 182 | | |
139 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
140 | 187 | | |
141 | 188 | | |
142 | | - | |
| 189 | + | |
| 190 | + | |
143 | 191 | | |
0 commit comments