iterlab 2.0.0__tar.gz → 2.1.0__tar.gz

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 (133) hide show
  1. {iterlab-2.0.0 → iterlab-2.1.0}/CHANGELOG.md +1703 -1533
  2. {iterlab-2.0.0 → iterlab-2.1.0}/GUIDE.md +800 -750
  3. {iterlab-2.0.0 → iterlab-2.1.0}/PKG-INFO +5 -1
  4. {iterlab-2.0.0 → iterlab-2.1.0}/README.md +4 -0
  5. {iterlab-2.0.0 → iterlab-2.1.0}/VERIFICATION.md +253 -212
  6. iterlab-2.1.0/docs/intro.gif +0 -0
  7. {iterlab-2.0.0 → iterlab-2.1.0}/examples/showcase_layout.py +1 -1
  8. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/__init__.py +25 -25
  9. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/app.py +113 -101
  10. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/codegen/inject.py +169 -165
  11. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/codegen/templates.py +52 -6
  12. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/layout/schema.py +557 -534
  13. iterlab-2.1.0/src/iterlab/runtime/editors.py +423 -0
  14. iterlab-2.1.0/src/iterlab/runtime/loader.py +262 -0
  15. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/runtime/remembered.py +48 -22
  16. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/app.py +468 -462
  17. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/designer.py +738 -711
  18. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/elements.py +941 -873
  19. iterlab-2.1.0/src/iterlab/ui/handler_menu.py +154 -0
  20. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/icon.py +20 -0
  21. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/modetoggle.py +1 -1
  22. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/runner.py +2 -1
  23. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/versionguard.py +8 -8
  24. {iterlab-2.0.0 → iterlab-2.1.0}/tests/conftest.py +45 -71
  25. {iterlab-2.0.0 → iterlab-2.1.0}/tests/integration/test_layout_file.py +165 -210
  26. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_box_stubs.py +222 -251
  27. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_default_window_size.py +0 -15
  28. iterlab-2.1.0/tests/ui/test_handler_menu.py +306 -0
  29. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_icon.py +241 -138
  30. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_look.py +248 -267
  31. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_properties_panel.py +131 -156
  32. iterlab-2.1.0/tests/ui/test_real_launch.py +372 -0
  33. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_restart_app.py +55 -12
  34. iterlab-2.1.0/tests/ui/test_screenshot.py +239 -0
  35. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_toolbar.py +129 -0
  36. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_toolbar_collapse.py +200 -204
  37. iterlab-2.1.0/tests/unit/test_editors.py +215 -0
  38. iterlab-2.1.0/tests/unit/test_element_colours.py +71 -0
  39. iterlab-2.1.0/tests/unit/test_fresh_compile.py +151 -0
  40. iterlab-2.1.0/tests/unit/test_handler_stubs.py +101 -0
  41. iterlab-2.1.0/tests/unit/test_project_imports.py +186 -0
  42. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_remembered.py +6 -6
  43. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_runnable_file.py +222 -226
  44. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_style.py +197 -185
  45. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_versionguard.py +229 -228
  46. iterlab-2.1.0/tools/check_downgrade.py +95 -0
  47. iterlab-2.0.0/src/iterlab/runtime/loader.py +0 -147
  48. iterlab-2.0.0/tests/ui/test_screenshot.py +0 -133
  49. {iterlab-2.0.0 → iterlab-2.1.0}/.gitignore +0 -0
  50. {iterlab-2.0.0 → iterlab-2.1.0}/LICENSE +0 -0
  51. {iterlab-2.0.0 → iterlab-2.1.0}/NOTICE +0 -0
  52. {iterlab-2.0.0 → iterlab-2.1.0}/docs/iterlab.jpg +0 -0
  53. {iterlab-2.0.0 → iterlab-2.1.0}/docs/logo.png +0 -0
  54. {iterlab-2.0.0 → iterlab-2.1.0}/examples/showcase.py +0 -0
  55. {iterlab-2.0.0 → iterlab-2.1.0}/pyproject.toml +0 -0
  56. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/assets/iterlab.ico +0 -0
  57. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/assets/iterlab.png +0 -0
  58. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/cli.py +0 -0
  59. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/codegen/__init__.py +0 -0
  60. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/codegen/rename.py +0 -0
  61. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/errors.py +0 -0
  62. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/interface.py +0 -0
  63. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/layout/__init__.py +0 -0
  64. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/layout/store.py +0 -0
  65. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/py.typed +0 -0
  66. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/runtime/__init__.py +0 -0
  67. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/runtime/dispatch.py +0 -0
  68. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/runtime/environment.py +0 -0
  69. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/runtime/faults.py +0 -0
  70. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/runtime/startupcheck.py +0 -0
  71. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/types.py +0 -0
  72. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/__init__.py +0 -0
  73. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/dialogs.py +0 -0
  74. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/faultbanner.py +0 -0
  75. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/palette.py +0 -0
  76. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/properties.py +0 -0
  77. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/screenshot.py +0 -0
  78. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/scroll.py +0 -0
  79. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/session.py +0 -0
  80. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/startupnotice.py +0 -0
  81. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/theme.py +0 -0
  82. {iterlab-2.0.0 → iterlab-2.1.0}/src/iterlab/ui/tooltip.py +0 -0
  83. {iterlab-2.0.0 → iterlab-2.1.0}/tests/contract/test_layout_schema.py +0 -0
  84. {iterlab-2.0.0 → iterlab-2.1.0}/tests/contract/test_public_api.py +0 -0
  85. {iterlab-2.0.0 → iterlab-2.1.0}/tests/integration/test_additive.py +0 -0
  86. {iterlab-2.0.0 → iterlab-2.1.0}/tests/integration/test_create_and_run.py +0 -0
  87. {iterlab-2.0.0 → iterlab-2.1.0}/tests/integration/test_never_dies.py +0 -0
  88. {iterlab-2.0.0 → iterlab-2.1.0}/tests/integration/test_reload.py +0 -0
  89. {iterlab-2.0.0 → iterlab-2.1.0}/tests/integration/test_rename.py +0 -0
  90. {iterlab-2.0.0 → iterlab-2.1.0}/tests/integration/test_stub_annotations.py +0 -0
  91. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/_helpers.py +0 -0
  92. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/conftest.py +0 -0
  93. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_arming.py +0 -0
  94. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_axes_is_a_real_axes.py +0 -0
  95. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_direct_manipulation.py +0 -0
  96. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_empty_text.py +0 -0
  97. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_fault_banner.py +0 -0
  98. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_input_elements.py +0 -0
  99. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_label_appearance.py +0 -0
  100. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_mode_toggle.py +0 -0
  101. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_mouse_buttons.py +0 -0
  102. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_perf.py +0 -0
  103. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_plot_events.py +0 -0
  104. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_presentation_survives.py +0 -0
  105. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_properties_drawer.py +0 -0
  106. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_properties_editing.py +0 -0
  107. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_property_commit.py +0 -0
  108. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_resize.py +0 -0
  109. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_selectors.py +0 -0
  110. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_showcase_example.py +0 -0
  111. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_startup_notice.py +0 -0
  112. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_style_editing.py +0 -0
  113. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_switch_cost.py +0 -0
  114. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_tag_tooltip.py +0 -0
  115. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_verify_tool.py +0 -0
  116. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_window_launch.py +0 -0
  117. {iterlab-2.0.0 → iterlab-2.1.0}/tests/ui/test_window_size_memory.py +0 -0
  118. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_atomic_write.py +0 -0
  119. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_cli.py +0 -0
  120. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_environment.py +0 -0
  121. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_faults.py +0 -0
  122. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_import_boundary.py +0 -0
  123. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_label_type.py +0 -0
  124. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_preflight_gate.py +0 -0
  125. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_schema.py +0 -0
  126. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_start_mode.py +0 -0
  127. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_startupcheck.py +0 -0
  128. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_templates.py +0 -0
  129. {iterlab-2.0.0 → iterlab-2.1.0}/tests/unit/test_typing_surface.py +0 -0
  130. {iterlab-2.0.0 → iterlab-2.1.0}/tools/check_readme_links.py +0 -0
  131. {iterlab-2.0.0 → iterlab-2.1.0}/tools/make_icon.py +0 -0
  132. {iterlab-2.0.0 → iterlab-2.1.0}/tools/preflight.py +0 -0
  133. {iterlab-2.0.0 → iterlab-2.1.0}/tools/verify.py +0 -0
@@ -1,1533 +1,1703 @@
1
- # Changelog
2
-
3
- All notable changes to iterlab are recorded here. The project follows semantic
4
- versioning as defined in the project constitution's *Release And Versioning*
5
- section, where the public surface is larger than the Python API: the layout
6
- schema, the handler naming convention, the `ev` contract, the generated stub
7
- shape, and the command are all consumed directly by researcher-written code.
8
-
9
- ## [2.0.0] — 2026-09-14
10
-
11
- ### Changed
12
-
13
- - **An interface is two files again: `demo.py` and `demo_layout.py`.** The
14
- layout moved out of YAML and into a Python module, where it sits beside the
15
- `Ev` class your editor reads. One write produces both, so what you drew and
16
- what your editor offers cannot drift apart.
17
-
18
- ```python
19
- LAYOUT = {
20
- 'schema_version': 8,
21
- 'window': {'width': 960, 'height': 540},
22
- 'elements': {
23
- 'spectrum': {'type': 'axes', 'position': [0.05, 0.5, 0.9, 0.4]},
24
- },
25
- }
26
-
27
-
28
- class Ev:
29
- spectrum: "Axes"
30
- ```
31
-
32
- **iterlab never imports it.** The layout is lifted out of the parse tree and
33
- evaluated as literals only, so opening somebody else's interface is as safe
34
- as opening a data file — an `import` here would have made every shared
35
- project arbitrary code execution. A computed value in `LAYOUT` is refused
36
- rather than evaluated, which is the price of that guarantee and worth it.
37
-
38
- PyYAML is no longer a dependency.
39
-
40
- - **Files written by 1.x do not open, and there is no migration.** Deliberate:
41
- the library is new enough to have no users, so nobody has a layout to lose,
42
- and a migration written for files that do not exist is a cost with no payer.
43
- A `demo.yaml` left in the folder is not read, not deleted, and not ignored
44
- either — iterlab says what happened and opens a new interface beside it.
45
-
46
- Schema 8 is the first version of this format. The migration machinery stays
47
- for the next real change.
48
-
49
- ## [1.7.1] — never published
50
-
51
- Prepared and gated, then overtaken by 2.0.0 before it was uploaded. Everything
52
- below ships in 2.0.0; the section stays because the work and its reasoning did
53
- not change, only the number it went out under.
54
-
55
- ### Added
56
-
57
- - **Your editor can see what an element offers.** `ev.lbl_0.background` used to
58
- complete to nothing and read as an unknown attribute to anything strict
59
- enough to look: style properties are reached through `__setattr__` against a
60
- tuple of names, which works perfectly at run time and is invisible to a type
61
- checker. They are now declared as annotations without values, so an editor
62
- can offer them while the runtime path is untouched.
63
-
64
- `.text`, `.value`, `.path` and `.visible` gained return types, which turns
65
- them from `Any` into `str`, `float`, `str` and `bool`.
66
-
67
- The package also carries a `py.typed` marker now (PEP 561). Without it a
68
- checker ignores everything above.
69
-
70
- Checked with a real type checker against the built wheel rather than by
71
- reasoning about it:
72
-
73
- | expression | before | now |
74
- |---|---|---|
75
- | `label.background` | unknown attribute | `str \| None` |
76
- | `label.text` | `Any` | `str` |
77
- | `box.value` | `Any` | `float` |
78
- | `plot.plot` | matplotlib's signature | unchanged |
79
-
80
- This is the half that touches nothing you wrote. Completions on `ev.<tag>`
81
- itself need a type for `ev`, which is a separate change.
82
-
83
- - **Your editor can complete `ev.`** iterlab writes `demo_ev.py` beside your
84
- pair, declaring each element and what it is, and rewrites it whenever you
85
- draw, rename or delete one. Generated handlers say `ev: "Ev"`, so inside one
86
- your editor offers the elements you drew — and `ev.ax_0.` offers matplotlib's
87
- own methods and signatures, because an axes *is* an `Axes`.
88
-
89
- Ordinary typing rather than an editor plugin, so it works wherever you work.
90
- Verified by running a type checker over a project iterlab generated:
91
- `ev.spectrum.plot` resolves to matplotlib's signature, `.value` to `float`,
92
- `.text` to `str`, `.background` to `str | None`, and your own `ev.my_cache`
93
- to `Any` with no error.
94
-
95
- The generated module is read by type checkers and never at run time. Delete
96
- it and everything still works.
97
-
98
- **iterlab will not add the import to a file it did not write.** Everything it
99
- puts in your file is appended, leaving what you wrote as an exact prefix, and
100
- an import goes at the top - that guarantee is worth more than a completion.
101
- So a file without the import gets plain stubs, as before, and the guide has
102
- the two lines that opt in.
103
-
104
- ### Fixed
105
-
106
- - **The pan and zoom toolbar was missing under most plots.** It existed under
107
- every one of them and was visible under almost none: Tk hands out a frame's
108
- space in the order things are packed, and the canvas was packed first with
109
- `expand=True`, so it took the lot and the toolbar was never mapped. Whether
110
- one showed came down to whether that particular plot happened to be tall
111
- enough, which is why it looked like the *second* axes was special.
112
-
113
- Packed before the canvas now, which is the whole fix.
114
-
115
- The tests that covered this asked whether the toolbar widget existed. It did.
116
- They now ask whether it is on screen, for plots of three different heights and
117
- across a mode switch, and the old order fails all four.
118
-
119
- ## [1.7.0] — 2026-09-13
120
-
121
- ### Changed
122
-
123
- - **Renaming an element now follows it through your code.** It used to rename
124
- the element's handlers and nothing else, which left every `ev.old_tag` in the
125
- file pointing at an element that no longer existed — working code turned into
126
- a runtime error the next time that line ran.
127
-
128
- A rename now moves the handlers, attribute access (`ev.old`, and anything
129
- else on the left of the dot), whole-word mentions in comments, and whole-word
130
- mentions in strings. The last of those is how `ev.old` written inside an
131
- f-string is reached, which matters because the generated stub is exactly that
132
- shape. The properties panel reports what it rewrote, because editing someone
133
- else's file quietly is not a thing to do twice.
134
-
135
- **A name matches whole or not at all.** With `cmdRun` and `cmdRunAlgorithm`
136
- both on the canvas, renaming the first to `cmdRunData` leaves the second
137
- untouched everywhere — handler, attribute and prose — and leaves your own
138
- `ev.cmdRun_cache` alone as well. A text substitution rewrites all three and
139
- silently unwires an element you never touched; that is why the work is driven
140
- by the tokenizer rather than by `str.replace`, and why swapping in the naive
141
- version fails eight tests.
142
-
143
- Deliberately untouched: a bare local that happens to share the name. Nothing
144
- can distinguish it from a coincidence, so the dot is what a reference is
145
- recognized by.
146
-
147
- Unchanged: a file that will not parse is still refused outright, and line
148
- endings are still preserved to the byte.
149
-
150
- ## [1.6.0] — 2026-09-13
151
-
152
- ### Changed
153
-
154
- - **One window, and switching modes no longer moves it.** The editor and the
155
- running interface are now exactly the same size at all times. The toolbar
156
- takes its room from inside the window instead of being added beside it.
157
-
158
- That leaves the canvas a different *shape* from the interface, and positions
159
- are fractions — an element drawn on a canvas of the wrong shape comes out
160
- stretched when it runs. So the canvas keeps the interface's proportions and
161
- gives up size: the largest rectangle of that shape which fits beside the
162
- toolbar, centred, with the backdrop showing around it. The white rectangle is
163
- the window you will run in; the grey is the room the toolbar borrowed.
164
-
165
- What this replaces: the editor window was the interface *plus* the toolbar,
166
- which meant every mode switch resized the window — and every plot on screen
167
- re-rendered for it. Switching now resizes nothing, so that cost is gone for
168
- good rather than merely reduced.
169
-
170
- The editor's height floor is gone with it. A short window makes for a short
171
- toolbar, and the toolbar scrolls; it has been a scrolling column since 0.13.0
172
- for exactly this reason.
173
-
174
- - **Folding the toolbar grows the canvas** instead of narrowing the window. The
175
- window cannot move — it is the interface's size — so the room the toolbar
176
- gives up goes to the canvas, at the same proportions. Folding is now a way to
177
- see your layout bigger.
178
-
179
- - **A new project opens at half your screen**, rather than a fixed 800x450.
180
- That size is a dialog on an ordinary monitor and a postage stamp on a large
181
- one, and no fixed number can be right for both a laptop and a 4K display.
182
-
183
- Only at creation. An existing project opens at the size it was left at, and
184
- nothing re-decides that for you.
185
-
186
- - **The editor backdrop is a shade darker than the sidebar.** The canvas is a
187
- picture of the run window and its edge has to be findable; against the
188
- sidebar's own colour, a white canvas had almost no edge at all.
189
-
190
- ### Fixed
191
-
192
- - **Toggling modes filled the Tcl interpreter with images.** Each plot's
193
- pan/zoom toolbar holds fifteen Tk images, and destroying the widgets released
194
- none of them: the objects owning them sit in reference cycles, so they stayed
195
- until a full garbage collection happened to run. Ten round trips over three
196
- plots left 135 behind. Enough of them and Tk dies with an access violation
197
- while building something unrelated — which is how this was found, in a test
198
- suite that kept falling over in a file that had nothing to do with it.
199
-
200
- Released on teardown now, where the canvas's event connections were already
201
- being released for the same reason. Growth over ten round trips: 135 images
202
- before, 6 after.
203
-
204
- - **A property field below the fold could not be typed into.** Tk unmaps a
205
- canvas window that is scrolled out of view, and an unmapped widget takes no
206
- focus — so in a toolbar too short to show everything, the keys went nowhere
207
- and the value was silently never committed. Fields are now scrolled into view
208
- when they take focus, and opening the **More** drawer brings the drawer with
209
- it rather than opening it somewhere you cannot see.
210
-
211
- ## [1.5.1] — 2026-09-12
212
-
213
- ### Fixed
214
-
215
- - **Switching back to the interface got slower, and it was the plots redrawing
216
- twice.** Both modes come from one remembered size, so every switch now
217
- resizes the window by the toolbar's width. `geometry` only *asks* for a size —
218
- Tk applies it on a later pass — so the new mode was built at the old width and
219
- every plot on screen rendered again when the resize finally landed.
220
-
221
- Measured on three plots, per switch:
222
-
223
- | | canvas renders | in rendering | switch |
224
- |---|---|---|---|
225
- | before the toolbar change | 6 | 78 ms | 133 ms |
226
- | after it | 9 | 115 ms | 161 ms |
227
- | now | 6 | 70 ms | 114 ms |
228
-
229
- It is one extra render of every plot, so it costs whatever your plots cost:
230
- barely visible on two small ones, a wait on a screenful.
231
-
232
- The window is now sized and the resize allowed to land *before* the new mode
233
- is built. That means running the event loop mid-switch, so a click on the top
234
- bar can arrive between teardown and the new interface existing — `App.busy`
235
- refuses one while a switch is part-built, rather than letting a rebuild start
236
- inside a rebuild and tear down what the outer one is holding.
237
-
238
- Held by a test that counts renders rather than timing them, because a timing
239
- budget on a shared runner is a flake and the count is what changed.
240
-
241
- - **The shipped example announced a version crossing to everyone who opened
242
- it.** `examples/showcase.yaml` was stamped 1.4.0 and shipped in 1.5.0, so
243
- iterlab correctly decided the file came from another version, said so, and
244
- left two `.bak` files beside it. It now records the current version, and a
245
- test keeps it there — it goes stale on every release by nature.
246
-
247
- ## [1.5.0] — 2026-09-12
248
-
249
- ### Added
250
-
251
- - **A showcase project, in `examples/`.** Three plots — sines at several
252
- frequencies, a scatter cloud, a bar chart with error bars — plus two boxes,
253
- three buttons and the labels around them:
254
-
255
- ```console
256
- iterlab examples/showcase
257
- ```
258
-
259
- It is a sanity harness first: one command, and every element type that draws
260
- is on screen doing something. Its `on_startup` builds the data and every
261
- handler under it only draws, so editing the file and clicking **Redraw** shows
262
- the loop the project exists for.
263
-
264
- The suite opens it, runs its startup and uses its controls, because a curated
265
- project is code nobody runs until someone does — which is exactly how
266
- `tools/verify.py` came to spend several releases unable to start.
267
-
268
- `examples/` now ships in the source distribution alongside `docs/`.
269
-
270
- ### Changed
271
-
272
- - **The README shows the loop rather than describing it.** A screenshot of the
273
- showcase project in both modes, with the code between them, under the opening
274
- paragraph. It lives in `docs/` beside the logo, so it ships in the source
275
- distribution and not in every wheel.
276
-
277
- The description on PyPI is frozen into each release at upload time and is
278
- never re-read from the repository, so a README edit reaches that page only
279
- when a version is published. This is the release that carries it.
280
-
281
- ## [1.4.0] — 2026-09-11
282
-
283
- ### Changed
284
-
285
- - **One size describes both modes, and the canvas is the run window.** The
286
- editor canvas is now exactly the interface's pixels, and the editor window is
287
- that plus the toolbar beside it. Resize either and the other follows.
288
-
289
- The old model added the toolbar *and* applied a floor of its own (1080x760) to
290
- the editor, so the two modes were different **shapes**. Positions are
291
- fractions, so an element drawn square came out stretched when run. That, not
292
- the forgetting, was the confusing part — the sizes were never comparable in
293
- the first place.
294
-
295
- The editor keeps a floor, but it no longer reaches the interface. The window
296
- stays tall enough for the toolbar's own controls; below that height the canvas
297
- holds its own size and the leftover shows as blank space under it. Tk does not
298
- clip a column that does not fit - it silently leaves the bottom controls
299
- unmapped - so without the floor the properties panel loses its lower half and
300
- still looks complete. The interface itself now has the only floor that
301
- constrains it (320x240).
302
-
303
- - **Editor resizes are now saved**, reversing 1.4.0's earlier rule. That rule
304
- existed because the editor window was not the interface's size; now it is,
305
- minus a known allowance, so it can be read straight back out.
306
-
307
- ### Added
308
-
309
- - **The toolbar folds to a strip.** Click **Toolbar** to fold it away and again
310
- to bring it back. The window narrows by the difference, so the canvas keeps
311
- exactly the pixels it had — folding tidies the desk without resizing the
312
- interface. Called "Toolbar" rather than left as a bare chevron, because a
313
- chevron on an empty strip does not say what expanding would get you.
314
-
315
- Kept in the layout, so it travels with the project. Selecting an element while
316
- folded does not open it: nothing moves unless the researcher moves it.
317
-
318
- - **Layout schema 6 → 7** for the folded state, no-op migration; absent means
319
- expanded, which is what every older file means.
320
-
321
- - A test holds the two window allowances in step with the two panel widths they
322
- stand for. They live in different modules, and if they drift the canvas
323
- silently stops being the run window — which would go unnoticed, because
324
- nothing would look broken.
325
-
326
- - **A project records which iterlab last edited it, and is backed up when that
327
- changes.** The layout carries an `iterlab_version` stamp; opening it with a
328
- different version — newer *or* older — copies both files aside first, as
329
- `demo.yaml.v1.3.0.bak` and `demo.py.v1.3.0.bak`. The version in the name is
330
- the one that wrote them, since that is what the copy preserves.
331
-
332
- Either direction, deliberately. The downgrade is the dangerous one: an older
333
- build meets a key or an element type it has never heard of. An upgrade is
334
- safer, because migrations run forward and are tested, but a migration is still
335
- a rewrite of the researcher's layout.
336
-
337
- The `.py` is copied and never otherwise touched. If a version change ever went
338
- wrong across stub injection or a rename, that is the copy that would matter
339
- most — a layout can be redrawn, an algorithm cannot.
340
-
341
- An existing backup is not overwritten: the one already on disk is the older
342
- and more original of the two. A folder that cannot be written to does not stop
343
- the interface opening, since a folder iterlab cannot write is one it cannot
344
- damage either — but it says so rather than failing silently.
345
-
346
- A project made before this has no stamp, and that is the commonest crossing of
347
- all, so its copies are named `.vunknown.bak` and it is announced like any
348
- other. An early return on "no recorded version" made exactly that case silent,
349
- which a test now prevents.
350
-
351
- - **Layout schema 5 → 6** for the new key, with a no-op migration. An older file
352
- simply has no stamp, which already means what it needs to mean.
353
-
354
- ### Fixed
355
-
356
- - **The Gate 2 setup tool could not be started.** `tools/verify.py` called
357
- `create_element(..., name=...)` several releases after that argument became
358
- `tag`, so the manual pass raised `TypeError` before it drew anything. Both its
359
- buttons also read "Click here!" once buttons gained a default label, while the
360
- checklist says to click **Redraw** and **Break it**. Nothing noticed either,
361
- because the only thing that runs this tool is a person about to do a pass —
362
- and the results table records that none happened. The tool is now exercised by
363
- the suite, including that its button labels are words the checklist actually
364
- names.
365
-
366
- - **The release gate could be satisfied by prose.** Gate 2 is the recorded
367
- manual pass, and the check that asks whether it happened looked for the
368
- version string anywhere in `VERIFICATION.md`. 1.4.0 passed it on the strength
369
- of a checklist item reading "open a project made before 1.4.0" — so the one
370
- automated question standing between an unverified build and an upload that
371
- cannot be withdrawn was answered by a sentence about something else. It now
372
- reads the *Recorded results* table, and a near miss such as `1.3.10` does not
373
- answer for `1.3.1`.
374
-
375
- - **An interface reopened at the default size instead of the size it was left
376
- at.** The layout has always carried a `window` size and nothing ever wrote to
377
- it, so it stayed at 800x450 forever and every launch opened there.
378
-
379
- The editor appeared to remember, which is what made this easy to miss for so
380
- long. It does not: it is forced up to a minimum that makes the palette and
381
- properties panel fit, and that minimum happened to resemble the size people
382
- were working at. Nothing was being remembered anywhere.
383
-
384
- A resize in GUI mode is now written to the layout, debounced by 400 ms —
385
- dragging a window edge fires `<Configure>` continuously, and saving per pixel
386
- would rewrite the file hundreds of times for one drag. An unchanged size
387
- writes nothing, and a minimised window (Tk reports 1x1) is not a size anyone
388
- chose.
389
-
390
- **Editor resizes are deliberately not saved.** That window holds the sidebar
391
- and has a floor, so it is not the interface's size — saving it would enlarge a
392
- deliberately small interface the first time somebody opened the editor on it.
393
- There is a test for exactly that.
394
-
395
- Closing also cancels any pending save. One firing into a destroyed root is
396
- what printed `invalid command name` on the way out, which I found while
397
- testing this rather than after shipping it.
398
-
399
- ### Changed
400
-
401
- - **A label looks like text rather than a card.** On the editor canvas it is
402
- drawn in the canvas's own colour with a black edge; in the running interface
403
- it takes the background behind it and has no edge.
404
-
405
- Its editor tint used to be `#e7f2e9` against the file selector's `#e6f0ea` —
406
- near enough that a glance could not tell them apart, which is what prompted
407
- this. And in the interface a caption sat in a white box, which is exactly what
408
- a caption should not look like.
409
-
410
- Drawn in the canvas colour rather than with `fill=""`. Truly unfilled would
411
- have been the obvious way to say "transparent", and it would have stopped the
412
- label being selectable: an unfilled canvas rectangle is only hit on its
413
- outline, so it would have been clickable on the border and dead in the middle.
414
- Same colour as the canvas is indistinguishable and stays clickable, and two
415
- tests hold that line.
416
-
417
- Tk has no real transparency, so "transparent" in the interface means painting
418
- the parent's own colour. A background or edge set by researcher code still
419
- wins — this is only the default.
420
-
421
- - **Buttons and both selectors now default to the label's height.** All four are
422
- one line of text, so a row of them lines up without anyone resizing anything.
423
- Widths still differ, because caption length is what actually varies:
424
- "Select a Folder" needs more room than "Click here!". Named `LINE_HEIGHT` and
425
- shared, with a test pinning it so the four cannot drift apart again.
426
-
427
- The text boxes are deliberately left taller: a field someone types into wants
428
- more room than a caption they only read.
429
-
430
- **One consequence, measured rather than assumed.** At the default 800x450
431
- window a caption needs 16 px and 0.03 of the content area gives 12, so a
432
- button's text clips there. From roughly 800x720 upward it fits comfortably
433
- (20 px and rising). The old 0.04 gave exactly 16 px at the default size, which
434
- is why this did not show before. A label has always been 0.03 and has always
435
- clipped at that size; this makes buttons match it in both respects.
436
-
437
- - **Adding an element is now a deliberate two-step act: pick a type, then place
438
- it.** The palette starts with nothing armed and returns to that after each
439
- placement, so one pick puts down one element and the highlight clears.
440
-
441
- A type used to be armed permanently, defaulting to the first in the list, so
442
- *any* click on the canvas background produced an element — including the click
443
- a researcher meant as "get out of what I was doing". They then had to find the
444
- stray element and delete it, and the most likely place for it to land was
445
- underneath something else.
446
-
447
- With nothing armed, a background click does what a background click normally
448
- does: commits whatever was being typed, drops the selection, and takes the
449
- focus. Existing elements are still selectable, movable and deletable — the
450
- canvas is not inert, it just does not manufacture things.
451
-
452
- ### Added
453
-
454
- - **Hovering an element in the editor names its tag.** A button reading "Click
455
- here!" gives no clue whether it is `cmd_0` or `run_fit`, and that name is what
456
- the researcher's code uses — so the tooltip answers where the question is
457
- asked, rather than making them select the element and read the properties
458
- panel.
459
-
460
- Shown for everything that displays text, including the two selectors. An axes
461
- is left out on purpose: it already has its tag drawn on it, so a tooltip would
462
- only repeat what is there.
463
-
464
- Faster than the top-bar tooltips (200 ms against 450 ms), because the pointer
465
- is already on the thing being asked about and the answer is one word. Not
466
- instant: zero delay would flicker across the canvas on any movement. It holds
467
- still once shown rather than following the pointer, and gets out of the way on
468
- a press or a drag.
469
-
470
- Canvas items cannot carry `<Enter>` and `<Leave>` the way widgets can, so this
471
- is driven from the motion handler that already reports what a press would do.
472
-
473
- ### Fixed
474
-
475
- - **An element with no text showed its tag instead of nothing.** Clearing a
476
- label's text gave a label reading `lbl_0`; the same applied to a button and to
477
- the two selectors.
478
-
479
- It was deliberate once. In the first implementation a newly drawn element had
480
- no text at all, so without the fallback it was an invisible rectangle. Every
481
- type has carried a real default since 1.1.0 — "Information:", "Click here!" —
482
- which means the fallback could only fire when somebody had *deliberately*
483
- cleared the text, and that is the one moment it is certainly not what they
484
- meant. A blank status line that fills in later is an ordinary thing to want.
485
-
486
- **The editor still shows the tag** on an element with no text, and that is not
487
- an oversight: there you are working on the elements themselves, and one with
488
- nothing in it still has to be findable and clickable on the canvas. The editor
489
- labels what you are editing; the interface shows what you wrote.
490
-
491
- Nothing changes about what a new element says.
492
-
493
- ## [1.3.1] — 2026-09-09
494
-
495
- Repository only. Nothing here changes the installed package, so 1.3.0 on PyPI is
496
- not defective and needs no replacement.
497
-
498
- ### Fixed
499
-
500
- - **CI had been red on Linux since 1.2.0, and 1.3.0 was published anyway.**
501
-
502
- The failure was in a test, not in iterlab: it typed a filename by generating
503
- key events with the raw character as the keysym, and X11 wants keysym *names*
504
- — `.` is `period` there. Windows Tk accepts the character, so the local suite
505
- passed on Windows every time while the Linux job failed. Characters now map to
506
- the names Tk knows on every platform.
507
-
508
- This is the second defect of exactly this shape. The first was `size_nw_se`,
509
- a cursor name Windows accepts and X11 does not, which CI also caught and which
510
- is guarded by a test asserting every cursor name is valid on the running
511
- platform. There is now a matching test for keysyms, next to it.
512
-
513
- The 1.2.0 run failed for an unrelated reason — `apt-get update` could not
514
- fetch its indexes on the runner. Infrastructure, not code, but it meant the
515
- first red run was easy to wave away, and the next two were not looked at.
516
-
517
- ### Added
518
-
519
- - **`tools/preflight.py`**, which asks every question that must be answered
520
- before publishing: clean tree, commit pushed, **CI green for this exact
521
- commit**, artifacts present and matching the declared version with no stale
522
- ones beside them, `twine check`, README links resolving anonymously, and a
523
- recorded Gate 2 pass. Non-zero exit means do not upload.
524
-
525
- The constitution already said this gate is "absolute rather than advisory".
526
- It was advisory in practice because nothing enforced it — the local suite was
527
- green each time, and nobody opened the run that tests the platform the
528
- developer is not using. A check that depends on someone remembering to look is
529
- not a gate.
530
-
531
- Gate 2 is warned about rather than enforced: only a person can perform it, so
532
- a tool can ask whether it happened but cannot honestly refuse on its behalf.
533
-
534
- ## [1.3.0] — 2026-09-09
535
-
536
- ### Changed
537
-
538
- - **Text and number boxes fire on a committed value, not on every keystroke.**
539
- Enter always runs the handler; leaving the box runs it only if the value
540
- actually changed, so clicking past a box on the way somewhere else does
541
- nothing. The generated stub is now `on_changed_<tag>`.
542
-
543
- Per keystroke redraws once for `1`, again for `10`, again for `100` — two of
544
- those plots are of a number nobody meant, and each one costs whatever the
545
- researcher's handler costs.
546
-
547
- **This was already decided, and I missed it.** The spec has carried a note
548
- since before boxes existed: a text box "commits its value on Enter or on
549
- leaving the field, never on every keystroke ... recorded here so the
550
- convention is not re-litigated when text boxes are built". 1.2.0 re-litigated
551
- it by accident, because nobody re-read the note when the element was finally
552
- built. The note now records that too — a written-down decision only helps if
553
- it is consulted at the moment the thing it describes gets made.
554
-
555
- ### Added
556
-
557
- - **A `changed` interaction**, joining click, hover, move and key. Universal in
558
- the same sense as the others: any element may have a handler written for it,
559
- and one whose value never changes simply never fires — indistinguishable from
560
- an element nobody wrote a handler for. It exists because "the researcher
561
- finished entering a value" is not the same question as "a key went down", and
562
- cannot be built out of `key` without every researcher reimplementing the same
563
- debounce. FR-017a is amended accordingly.
564
-
565
- Renaming an element carries its `on_changed_` handler, like every other.
566
-
567
- - `on_key_<tag>` is untouched and still fires per keystroke for anyone who wants
568
- it, so nothing written against 1.2.0 stops working.
569
-
570
- ## [1.2.0] — 2026-09-09
571
-
572
- *Reached GitHub but not PyPI; superseded by 1.3.0.*
573
-
574
- ### Added
575
-
576
- - **Text and number boxes now generate an `on_key_<tag>` handler**, firing on
577
- every keystroke, and the generated one prints what was typed — `.text` for a
578
- text box, `.value` for a number box.
579
-
580
- This reverses the call made in 1.1.0, where boxes got no stub on the reasoning
581
- that a box is read when something *else* happens. That covers one use and
582
- misses the better one: a plot that follows a value as it is typed, with no
583
- button to press. A researcher who wants the click-then-read pattern deletes
584
- the handler; one who wants live updating would otherwise have had to know that
585
- `on_key_<tag>` exists at all.
586
-
587
- A half-typed number is safe to read: `""`, `"-"` and `"0."` all report `0`
588
- rather than raising, so a handler firing mid-keystroke cannot fault the
589
- session.
590
-
591
- - **The generated file is runnable.** Every new `demo.py` ends with:
592
-
593
- ```python
594
- if __name__ == "__main__":
595
- import iterlab
596
-
597
- iterlab.run(__file__)
598
- ```
599
-
600
- so an IDE's run button opens the interface, with no terminal and nothing to
601
- remember. It passes `__file__` rather than a name, so it works from any
602
- working directory and survives renaming the pair. It cannot loop: iterlab
603
- executes the researcher's module under a name of its own, so `__name__` is
604
- only `"__main__"` for the copy they launched — proven by a test that loads the
605
- file the way the loader does.
606
-
607
- Interfaces created before this do not get it retrofitted. iterlab adds
608
- handlers to a researcher's file and nothing else, and that rule is worth more
609
- than the convenience.
610
-
611
- ### Fixed
612
-
613
- - **A typed property could still be silently discarded**, and 1.1.1's fix for
614
- that is what made it reachable.
615
-
616
- Rebuilding the properties panel destroys its fields, and Tk fires `<FocusOut>`
617
- at a focused widget as it goes. That event is *queued*: it arrives after the
618
- rebuild has finished and the panel's busy flag is clear, so the handler
619
- commits into whichever element is now selected. 1.1.1 added commit points on
620
- selection and on canvas press, which multiplied the rebuilds and turned a
621
- latent race into one that fired often. The old fields are now unbound before
622
- they are destroyed, so a stale event has nothing to run.
623
-
624
- Found by a test that failed roughly one run in five and could not be
625
- reproduced by running its own file — it needed another file to have run first.
626
- Confirmed as mine by running the same loop against 1.1.0 in a worktree: twenty
627
- clean runs there, three failures in fifteen on the current tree.
628
-
629
- ### Changed
630
-
631
- - **New handler stubs are inserted above the `if __name__` block** rather than
632
- appended after it. That block reads as the end of the file, and appending
633
- below it would push it further from the bottom with every element drawn. The
634
- guard is matched structurally, so `'__main__'`, extra spaces or a reversed
635
- comparison all count; only a *trailing* guard qualifies, since one mid-file is
636
- not a launcher and inserting above it would drop a stub into the middle of the
637
- researcher's code. Any comment directly above it travels with it. A file
638
- without a guard is appended to exactly as before.
639
-
640
- ## [1.1.1] — 2026-09-09
641
-
642
- ### Fixed
643
-
644
- - **A typed property was lost unless focus went to another property field.**
645
- Editing a value and then clicking an element, the canvas, or a palette card
646
- silently discarded it. Tabbing to the next field worked, which is what made it
647
- look intermittent rather than broken.
648
-
649
- `<FocusOut>` cannot carry this on its own. Tk fires it when another *widget*
650
- takes keyboard focus, and most of what a researcher clicks next does not take
651
- it — a Canvas, an element drawn on it and a palette card are all unfocusable.
652
- Even when focus does move, Tk delivers the event on the next pass through the
653
- event loop, by which time the panel has been rebuilt for the new selection and
654
- the entry holding the edit no longer exists. The canvas already called
655
- `focus_set()` first thing on a press, which looked like it should have covered
656
- this and could not.
657
-
658
- Committing is now explicit and synchronous on the events where focus really
659
- leaves: a press on the canvas, a palette choice, opening the **More** drawer.
660
-
661
- - **The reported extension filter was this same bug.** Typing `pdf` into
662
- **Types** and clicking away never saved it, so the chooser had nothing to
663
- filter by and offered everything. It works once the value is committed.
664
-
665
- - **An editor change to `extensions` lost to a value set from code.** Found
666
- while checking the above. Session state is deliberately preserved across a
667
- mode switch, and an explicit edit in the editor is supposed to beat it — the
668
- rule already covered `label` and `style`, and `extensions` was simply missed
669
- when it was added a version ago.
670
-
671
- ### Notes
672
-
673
- - The first attempt at the commit fix also committed inside `select`, which is
674
- the refresh path that a drag, a resize and an apply all end on. That wrote the
675
- panel's now-stale position back over the change that had just happened, and a
676
- dragged element snapped home — 15 tests caught it, and the suite time went from
677
- 63s to 161s from the churn. There is now a test for that specific regression,
678
- and one asserting that clicking about without typing does not rewrite the
679
- layout file at all.
680
-
681
- ## [1.1.0] — 2026-09-09
682
-
683
- *Reached GitHub but not PyPI; published as part of 1.1.1.*
684
-
685
- ### Added
686
-
687
- - **Two new element types: `file_select` and `folder_select`.** Each is a button
688
- that opens the operating system's own chooser — the one a researcher already
689
- knows, with their places and network drives in it.
690
-
691
- The first of each takes the bare tag, `fileselect` and `folderselect`, with no
692
- `_0`: an interface almost always has exactly one, and a number on the only one
693
- of something is noise that then appears in every handler mentioning it. A
694
- second becomes `fileselect_1`.
695
-
696
- `.path` is the choice. It is `""` before anything is picked **and** when what
697
- was picked has since been deleted or moved — a path that no longer resolves is
698
- worse than none, because `if ev.fileselect.path:` would pass and the open
699
- would fail on something that looks perfectly valid. The chooser still reopens
700
- where the file used to be, since a renamed file is usually still beside it.
701
-
702
- The handler fires **after** a choice, so `.path` is set when researcher code
703
- runs. Cancelling does nothing at all: no handler, no change.
704
-
705
- The caption stays "Select a File"; showing the selection is one line in the
706
- researcher's handler, and the generated stub shows it. How the interface looks
707
- stays theirs to decide.
708
-
709
- - **`extensions` on the file selector**, in the editor as **Types** and in code
710
- as `ev.fileselect.extensions`. Comma-separated, forgiving about `.TXT`,
711
- `*.csv` and stray spaces, blank meaning every file. "All files" is always
712
- offered alongside, because a filter nobody can escape is a trap the moment one
713
- file was saved with the wrong suffix.
714
-
715
- - **Selections persist across a hard reset and across the process.** Stored in
716
- the user's own state directory keyed by the interface's path, never in the
717
- layout file: `demo.yaml` describes the interface, and writing a runtime choice
718
- into it would make it a log of what happened and a spurious diff in everyone's
719
- repository. The project folder stays the two files it has always been. The
720
- accepted cost is that moving or copying a project starts fresh, which behaves
721
- exactly like a first run.
722
-
723
- Nothing there can raise on the researcher's account: a missing file, unreadable
724
- JSON, a read-only profile all mean "nothing remembered", which is a state every
725
- caller already handles because it is what a first run looks like.
726
-
727
- - `ui/dialogs.py`, one seam for the only modal dialogs iterlab opens. The test
728
- suite's ban on `tkinter.filedialog` stays exactly as it was, so a path that
729
- reaches a real chooser without being replaced fails loudly instead of hanging.
730
- It also normalises Tk's mix of `""`, `()` and `None` for a cancelled dialog
731
- into one shape.
732
-
733
- - `Event.path`, carrying what was just chosen.
734
-
735
- ### Changed
736
-
737
- - **Layout schema 4 → 5**, no-op migration. Nothing in an existing file changes;
738
- the version moves so a version-4 build refuses a file containing a type it has
739
- never heard of rather than reporting it as a defect in the layout.
740
-
741
- ## [1.0.0] — 2026-09-08
742
-
743
- **First public release.** `pip install iterlab`.
744
-
745
- Numbered 1.0.0 rather than continuing the 0.x line because this is the first
746
- version anyone else can install: a 0.21 would read as accumulated churn, where
747
- what it actually marks is the point the tool became available.
748
-
749
- Everything in the entries below shipped in this one release. They were written
750
- as the work happened and are kept as the development record; nothing before this
751
- had ever been published.
752
-
753
- ### What this version commits to
754
-
755
- 1.0.0 is a promise under semantic versioning, so the following are the public
756
- surface and will not change without a major bump:
757
-
758
- - the `on_<interaction>_<tag>` handler naming convention, and `ev` as the first
759
- argument to every handler
760
- - `ev.<tag>` reaching an element, and `.text` on every element that shows text
761
- - an axes element being a real `matplotlib.axes.Axes`
762
- - the `iterlab <name>` command and `iterlab.run(name)`
763
- - the layout schema, which carries its own version and migrates forward
764
-
765
- The layout schema is versioned separately and independently: a file written by
766
- an older build is migrated on open, and one written by a newer build is refused
767
- rather than half-understood.
768
-
769
- ### Changed
770
-
771
- - **Ordinary semantic versioning resumes.** Below 1.0.0 the constitution
772
- suspended the MINOR/PATCH distinction and bumped MINOR on *every* change, so
773
- that the version answered "is the thing in front of me the thing I just
774
- changed?" during hand testing. From here PATCH means a fix, MINOR means an
775
- addition, MAJOR means a break — which is what a version has to mean once other
776
- people depend on it.
777
- - `Development Status` classifier moves from `3 - Alpha` to `4 - Beta`. Claiming
778
- 1.0.0 while advertising alpha would contradict itself. The README's "early,
779
- and honest about it" stands: this is a first public release, not a mature one.
780
-
781
- ## [0.21.1] — not published
782
-
783
- Renumbered to 1.0.0 before publishing.
784
-
785
- Everything in the entries below shipped in this one release; they were written as
786
- the work happened and are kept as the development record. Nothing before this had
787
- ever been published.
788
-
789
- ### Fixed
790
-
791
- - **The README logo was a broken image.** The repository is private, and
792
- `raw.githubusercontent.com` returns 404 for a private repository without a
793
- token — so the image failed for every viewer, including on GitHub. The file
794
- was present and pushed the whole time; the URL simply could not be fetched.
795
-
796
- This is invisible to whoever owns the repository if they only ever check while
797
- signed in, and it is the same failure the README's `GUIDE.md`, `LICENSE` and
798
- `NOTICE` links have. All four resolve once the repository is public, which is
799
- also what the PyPI page needs, since PyPI renders the README anonymously.
800
-
801
- ### Added
802
-
803
- - `tools/check_readme_links.py`, which fetches every external README link with
804
- no credentials at all — the way a stranger's browser does. It reports 4 of 4
805
- dead against a private repository and should report all clear before
806
- publishing. A broken logo on the page people arrive at first is not worth
807
- discovering after an upload that cannot be undone.
808
-
809
- ## [0.21.0] — 2026-09-08
810
-
811
- *Published to PyPI, then superseded fourteen minutes later by 1.0.0.
812
- It is the earliest version installable from PyPI; 1.0.0 is the one to use.*
813
-
814
- Everything in the entries below shipped in this one release; they were written
815
- as the work happened and are kept as the development record. Their "unreleased"
816
- labels are accurate for what they were at the time — nothing before this had
817
- ever been published.
818
-
819
- ### Changed
820
-
821
- - Install instructions in `README.md` and `GUIDE.md` now say `pip install
822
- iterlab`, since that is true from this release onward. The guide keeps the
823
- source install for anyone who wants to change iterlab itself.
824
- - `README.md` links and the logo are absolute URLs. PyPI renders this README on
825
- its own page, where a repository-relative path resolves to nothing — the logo
826
- would have been a broken image and every link a 404, visible to everyone
827
- arriving at the project for the first time.
828
- - Added `Documentation`, `Repository`, `Changelog` and `Issues` project URLs, a
829
- 3.13 classifier, and operating-system and environment classifiers.
830
-
831
- ## [0.20.2] — unreleased
832
-
833
- ### Documentation
834
-
835
- - **The logo now heads `README.md` and `GUIDE.md`**, from `docs/logo.png`.
836
-
837
- - **Both documents brought back in line with the code.** Everything below was
838
- wrong, not merely dated:
839
-
840
- - `README.md` said `pip install iterlab`. It is not on PyPI, and the guide
841
- said so two paragraphs later in a different file. Now both give the
842
- repository install.
843
- - `README.md` claimed "two element types" with "text boxes, labels ... next".
844
- There are five, and text boxes and labels are two of them.
845
- - `GUIDE.md` told the reader to draw `ax_0` and `cmd_0` and then showed an
846
- example using `ev.spectrum` and `on_clicked_run_fit` — tags it had never
847
- asked anyone to create. The worked example now uses the tags it just named,
848
- and says renaming is available.
849
- - Two leftovers from a careless find-and-replace: "use **Restart reset**" and
850
- "press **Restart app**", for a button now called **Hard reset**.
851
- - "Buttons and labels carry these" under Styling, written before boxes
852
- existed and never revisited.
853
- - Stubs were described as generated for "buttons and plot areas", with
854
- "plot areas" long since renamed and boxes never mentioned.
855
- - The styling note said code-set style is lost when you "close and reopen".
856
- True, but it now survives a mode switch, which is the case a researcher
857
- actually meets.
858
-
859
- - Every code example in the guide was executed against this build — startup,
860
- the click handler, all eleven style properties, `.text` on each type, and
861
- `.value` on a number box — rather than read over. No fault was raised by any
862
- of them.
863
-
864
- ## [0.20.1] — unreleased
865
-
866
- ### Fixed
867
-
868
- - **A mode switch reset every element to its layout value.** Text typed into a
869
- box, and a caption, colour or enabled-state set from code, all reverted on the
870
- way back from the editor. Reported as "gui objects get reset when going to
871
- editor".
872
-
873
- The session introduced in 0.12.0 kept `ev` and the contents of each plot, but
874
- not the widgets' own state — and a switch destroys every widget and builds new
875
- ones from the layout file, so anything the *running* interface had done was
876
- lost. The layout is where an element starts, not where it currently is.
877
-
878
- Each handle can now report its presentation and have it restored; the session
879
- holds it across the switch. Programmatic style was reverting too, which was
880
- not in the report but is the same defect.
881
-
882
- **An edit in the editor still wins.** The remembered value is recorded
883
- alongside the layout value it was based on, so if the researcher has since
884
- changed the caption or the colour themselves, the remembered one is dropped —
885
- editing a button's caption and having the old one come straight back would be
886
- its own bug report. Position is not presentation, so moving an element does
887
- not discard what it was showing.
888
-
889
- A **hard reset** still clears everything, which is the difference between
890
- restarting and toggling.
891
-
892
- 14 tests; 10 of them fail against the unfixed code.
893
-
894
- ## [0.20.0] — unreleased
895
-
896
- ### Added
897
-
898
- - **Two new element types: `text_box` and `number_box`.** A text box holds a
899
- line someone types; a number box refuses anything that is not a number.
900
-
901
- The number box validates the *proposed* contents on each keystroke rather than
902
- correcting afterwards, so a rejected character never appears at all — no
903
- flicker, and the box is never momentarily holding something that is not a
904
- number. It deliberately accepts the half-written states a person passes
905
- through: `""`, `"-"`, `"."` and `"-."` are all on the way to a number, and
906
- refusing them would make a negative or a decimal impossible to type.
907
-
908
- `.value` gives the number — `int` when it is a whole one, so
909
- `range(ev.val_0.value)` works without casting — and an empty box reads as `0`
910
- rather than raising, since someone who cleared it to retype is mid-edit, not
911
- mistaken. `.text` gives the same thing as a string.
912
-
913
- Neither gets a generated stub, for the reason a label does not: a box is
914
- normally read when something *else* happens rather than reacted to keystroke
915
- by keystroke. Every interaction remains available to a hand-written handler.
916
-
917
- - **`.text` on every element that shows text**, whatever kind it is. A button
918
- and a label keep their string in Tk's `-text` option and a box keeps it in a
919
- variable; `.text` hides that, so `ev.<tag>.text` works without first
920
- remembering what `<tag>` is.
921
-
922
- ### Changed
923
-
924
- - **Default tags are now short and typed**: `cmd_0` for a button, `lbl_0` for a
925
- label, `edt_0` for a text box, `val_0` for a number box (`ax_0` unchanged).
926
- These are the shorthands a person would use themselves, so `ev.cmd_0` reads
927
- the way the code around it already does.
928
-
929
- - **New elements come with working text**: a button says "Click here!" and a
930
- label says "Information:", rather than repeating their own tag. A button
931
- reading `cmd_0` is a placeholder the researcher has to fix before showing
932
- anyone; one reading "Click here!" is a control. The default button is slightly
933
- wider to fit its caption — a default that clips its own text is worse than one
934
- that is a little roomy.
935
-
936
- - **Layout schema 3 → 4.** Nothing in an existing file changes and the migration
937
- is a no-op, but the version has to move: a file written now may contain a type
938
- a version-3 build has never heard of, and the version gate is what makes that
939
- build refuse the file cleanly rather than report an unknown element type as a
940
- defect in the researcher's layout.
941
-
942
- ## [0.19.1] — unreleased
943
-
944
- ### Fixed
945
-
946
- - **The window icon did not appear.** Tk offers two mechanisms — `iconbitmap`
947
- with an `.ico` and `iconphoto` with a `PhotoImage` — and 0.18.0 applied both
948
- "for coverage". They do not layer: applied together to one window the title
949
- bar shows a blank grey square, which is worse than either alone and worse than
950
- doing nothing. Each works perfectly on its own.
951
-
952
- Exactly one is applied now, chosen by platform: `iconbitmap` on Windows, so
953
- each size gets the frame drawn for it and the title bar shows the 16 px
954
- artwork rather than Tk squeezing down the 256; `iconphoto` elsewhere, which is
955
- what X11 and macOS honour. The other is tried only when the first *fails*, as
956
- a fallback rather than a supplement.
957
-
958
- The test that existed asserted `apply()` returned True — which it happily did
959
- while producing an empty box. It is the same shape of defect as every wiring
960
- bug in this project: the mechanism was tested and the outcome was not. The
961
- test now counts which Tk calls are actually made and fails if both are, and
962
- Gate 2 gained an item to look at the title bar, since only a person can tell a
963
- drawn icon from a blank one.
964
-
965
- ## [0.19.0] — unreleased
966
-
967
- ### Changed
968
-
969
- - **The icon is redrawn from a supplied logo**: a waveform ringed by two arcs
970
- chasing each other. The wave is the researcher's data, the ring is the loop
971
- they work inside, which is a better statement of the tool than the previous
972
- drawing managed.
973
-
974
- Two things carry it. The ring takes an **angular** gradient whose colour run
975
- is mapped onto each arc's own sweep, so a tail is fully dark and an arrow head
976
- fully bright — spread over a half-turn instead, both ends land mid-blue and
977
- the heads lose their punch. The wave takes a **linear** gradient, because it
978
- travels where the ring turns.
979
-
980
- The detail thresholds moved after looking at the frames magnified rather than
981
- guessing: at 64 px the dotted arcs had already collapsed into a grey fuzz that
982
- made the whole mark look dirty, so the full drawing now starts at 128.
983
-
984
- **The 16 and 24 px frames invert** — a white wave on solid brand blue. A dark
985
- line on a near-white tile has almost no ink left to work with at that size and
986
- goes faint in a taskbar, where the light tile's own edge is lost too. It
987
- trades a little consistency between sizes for a mark that can be seen, and
988
- nobody views the 16 and the 256 side by side.
989
-
990
- ## [0.18.0] — unreleased
991
-
992
- ### Added
993
-
994
- - **An application icon**, replacing Tk's default feather — which tells a
995
- researcher nothing and makes the window look like a stray interpreter in a
996
- taskbar full of real applications.
997
-
998
- A plot with a loop: the rising curve is every plotting library's icon, and the
999
- circular arrow is what makes it this one, since iterating inside the interface
1000
- rather than re-running a script is the whole product.
1001
-
1002
- - `tools/make_icon.py`, which *is* the icon — checked in as the source rather
1003
- than a binary somebody would have to open an image editor to change.
1004
-
1005
- It draws at 8x and downsamples, and brushes strokes as overlapping discs
1006
- rather than using `draw.line`, which leaves notches exactly where this curve
1007
- turns. The `.ico` carries **three detail levels across seven sizes**: below
1008
- 48 px the axes are dropped and the brush fattens, and at 16 px only the curve
1009
- survives. An icon is not one drawing scaled — the thin marks close into mud —
1010
- and a test asserts the 16 px frame is not merely the 256 resampled.
1011
-
1012
- Applied through both `iconphoto` (portable, honoured by X11 and macOS) and
1013
- `iconbitmap` (what Windows uses for the title bar and taskbar, and crisper
1014
- there). Neither can raise: an icon is decoration, and decoration must not be
1015
- able to end a session. The `PhotoImage` is held for the life of the process,
1016
- since Tk silently reverts to the feather when one is collected.
1017
-
1018
- ## [0.17.0] — unreleased
1019
-
1020
- ### Added
1021
-
1022
- - **Hover text on the top-bar buttons.** Two of them differ only in how much
1023
- they throw away, and a two-word label cannot carry that. `Tooltip` is drawn as
1024
- a borderless toplevel that never takes focus.
1025
- - **A "Screenshot" button**, writing a PNG beside the interface's own files as
1026
- `demo-<date>-<time>.png`. It captures the **content area only** — the top bar
1027
- is iterlab's furniture and has no business in a figure someone pastes into a
1028
- report. No file dialog: a modal blocks the test suite outright, the same
1029
- reason element creation does not ask for a name. Pillow already ships with
1030
- matplotlib, so this adds no dependency. A machine that cannot grab the screen
1031
- (headless Linux) reports it through the fault banner rather than taking the
1032
- window down.
1033
- - **A "More" drawer in the properties panel.** Only the tag, and the text for a
1034
- button or label, are shown by default; position, size, colour, font and state
1035
- are behind it. The set is declared per element type in
1036
- `schema.BASIC_PROPERTIES`, so a future slider declares its range and starting
1037
- position the same way a button declares its caption.
1038
-
1039
- The advanced widgets are *built* either way and only packed or not, so
1040
- committing an edit never depends on which fields the researcher happened to
1041
- reveal. The drawer stays open across selections — someone adjusting colours
1042
- across several elements should not have to reopen it each time.
1043
-
1044
- ### Changed
1045
-
1046
- - **"Restart app" is now "Hard reset"**, in the top bar and in the startup
1047
- notice.
1048
- - **Positions and sizes are rounded to two decimals on construction**, not only
1049
- when saved. Hundredths of the window is finer than anyone can place by hand or
1050
- see, and finer than that turns the layout file into digits whose diffs mean
1051
- nothing. Rounding at construction means what is in memory is what is on disk,
1052
- so a value never changes under a researcher between drawing it and reopening
1053
- it.
1054
-
1055
- Validation still runs first, so a genuinely invalid rectangle is rejected
1056
- rather than quietly rounded into an acceptable one. Only rounding's own
1057
- artefacts are corrected: a sliver that would round away to nothing becomes the
1058
- smallest real element, and an edge rounded past the window is given its
1059
- position back rather than being shrunk.
1060
-
1061
- `DEFAULT_SIZE["button"]` moves from `0.035` to `0.04` high, since a default
1062
- ought to be expressible on the grid it will be snapped to.
1063
-
1064
- ## [0.16.0] — unreleased
1065
-
1066
- ### Fixed
1067
-
1068
- - **An edited `on_startup` was often not noticed at all.** Reported as "nothing
1069
- happens", and there were two independent reasons, either of which was enough
1070
- on its own:
1071
-
1072
- 1. The check hung off the dispatcher's after-invoke hook, which fires only
1073
- when a handler actually ran. Clicking an element you have not written code
1074
- for — normal, and silent by design — never looked at the file. So the
1075
- notice appeared only if you happened to click something that already had a
1076
- handler.
1077
- 2. Nothing checked without an interaction at all. Saving the file and looking
1078
- at the window did nothing, which is exactly when a researcher expects
1079
- something to happen.
1080
-
1081
- The check now runs before *every* interaction whatever it goes on to do, and
1082
- a 700 ms poll notices a save on its own. It reads the file rather than the
1083
- loaded module — deliberately, since reloading on a timer would re-run
1084
- module-level code uninvited, and since the module is only reloaded when an
1085
- interaction reaches a handler that exists.
1086
-
1087
- ### Added
1088
-
1089
- - **A "Re-run startup" button in the top bar**, as requested. Enabled only when
1090
- startup has actually been edited, so the button is its own indicator: save the
1091
- file, look up, and it has come alive. It runs the new startup over the session
1092
- already in memory, so the data survives.
1093
-
1094
- ### Changed
1095
-
1096
- - The notice's second action is now **Restart app**, the same restart the top
1097
- bar offers, rather than a separate session-only restart. One restart concept
1098
- in the interface rather than two whose difference is invisible.
1099
- - `ModuleLoader.generation`, added in 0.13.0, is gone. The staleness check is
1100
- keyed to the file's own (mtime, size) instead, which is what let it work
1101
- without loading anything — and an API with one caller that no longer needs it
1102
- is better deleted than kept.
1103
-
1104
- ## [0.15.0] — unreleased
1105
-
1106
- ### Changed
1107
-
1108
- - **`ev.<tag>` for a plot is now a real matplotlib `Axes`**, not an object that
1109
- forwards to one. `AxesHandle` subclasses `Axes` and is registered as a
1110
- matplotlib projection, which is the supported way to have a figure build a
1111
- particular Axes subclass.
1112
-
1113
- The difference is invisible for `ev.ax_0.plot(...)`, which worked either way,
1114
- and decisive everywhere else. `isinstance(ev.ax_0, Axes)` is now true, so any
1115
- library that takes an `ax=` argument accepts it, and matplotlib's own
1116
- machinery does too. A forwarding wrapper fails all of that — and fails it
1117
- inside whatever library the researcher passed it to, a long way from anything
1118
- iterlab wrote.
1119
-
1120
- - **The element type `plot_area` is renamed `axes`**, and new ones are tagged
1121
- `ax_0`, `ax_1`, … rather than `plot_0`. `ax` is what the variable is called in
1122
- everyone's matplotlib code, so `ev.ax_0` reads the way a researcher's own code
1123
- already does. What the layout calls the thing is now what the thing is.
1124
-
1125
- - **Layout schema 2 → 3**, with a migration that rewrites `type: plot_area` to
1126
- `type: axes`. Tags, positions and styles are untouched, so an interface drawn
1127
- before this keeps working and keeps its names.
1128
-
1129
- ### Notes
1130
-
1131
- - Everything iterlab adds to the Axes subclass is prefixed `_iterlab_`, except
1132
- the deliberate public surface (`tag`, `visible`, `canvas`, `widget`,
1133
- `element`, `disconnect`). A test asserts that nothing added shadows a
1134
- matplotlib attribute, so a future matplotlib release cannot quietly collide
1135
- with us.
1136
- - `visible` keeps its element-level meaning — is this on screen — uniform with
1137
- buttons and labels, and hides the toolbar with it. matplotlib's own
1138
- `set_visible` is left alone and still does matplotlib's thing.
1139
-
1140
- ## [0.14.0] — unreleased
1141
-
1142
- ### Added
1143
-
1144
- - **A "Restart app" button in the top bar**, beside the mode toggle. A cold
1145
- restart: the layout is re-read from disk, the researcher's module is dropped
1146
- from the import cache, and a new session begins. It is the answer to anything
1147
- a warm reload deliberately does not cover — an edited helper module, a
1148
- hand-edited layout file, or simply wanting a clean slate.
1149
-
1150
- It stays in the mode it was pressed in. Restarting is not a request to be
1151
- moved to a different screen, and the window is not resized either: that would
1152
- rearrange the researcher's desktop, which is not what was asked for.
1153
-
1154
- Replaces the narrower "Restart session" button in the top bar. That behaviour
1155
- still exists and is still offered by the startup notice, where re-running
1156
- startup over a live session is the point; as a top-bar control, one button
1157
- with one meaning beats two whose difference is invisible until it bites.
1158
-
1159
- ### Fixed
1160
-
1161
- - A layout file edited by hand into something unparsable took the window down on
1162
- restart, which is precisely what Principle III forbids. The last good layout
1163
- is kept, the interface carries on, and the error is reported through the
1164
- banner rather than swallowed. Found by a test written to check something else,
1165
- which crashed instead of failing.
1166
-
1167
- ## [0.13.0] — unreleased
1168
-
1169
- ### Added
1170
-
1171
- - **An edited `on_startup` is now noticed and offered back.** Every other
1172
- handler takes effect on the next click because the next click runs it;
1173
- startup already ran, so editing it did nothing at all and nothing said so.
1174
- Nothing raises, so no fault appeared — the code simply never ran, which is
1175
- the most expensive silence this tool can produce.
1176
-
1177
- A strip now appears offering **Re-run startup** (keeps `ev` and everything on
1178
- it) and **Restart session** (discards it). Both are offered rather than one
1179
- chosen, because whether re-running is safe depends on the researcher's code:
1180
- `ev.x = load(...)` rebinds and is safe, `ev.log.append(...)` is not. Dismissing
1181
- hides the strip without marking the edit accepted, so a further edit raises it
1182
- again — ignoring one edit must not make the next one silent.
1183
-
1184
- - `runtime/startupcheck.py`. What counts as "startup changed" is narrower than
1185
- "the file changed" — otherwise every handler edit would cry wolf — and wider
1186
- than "the text of `on_startup` changed", because startup's behaviour lives
1187
- partly in the module-level helpers it calls. The fingerprint covers
1188
- `on_startup` plus every module-level function transitively reachable from it,
1189
- compared as parsed structure so reformatting and comments cost nothing. A
1190
- file mid-edit that will not parse fingerprints as `None` and raises no alarm.
1191
-
1192
- - `ModuleLoader.generation`, so a caller can ask "has this reloaded since I last
1193
- looked?" without re-reading the file. The staleness check is therefore
1194
- proportional to edits, not to clicks.
1195
-
1196
- ### Notes
1197
-
1198
- - **New imports already worked** and needed no change: the loader executes the
1199
- module fresh rather than calling `importlib.reload`, so an `import` line added
1200
- to a live file runs on the next reload. Verified rather than assumed.
1201
- - **Imported modules are assumed not to change during a session.** If `demo.py`
1202
- does `import fitting` and `fitting.py` is then edited, the change is not
1203
- picked up: `fitting` is already in `sys.modules`, so the import statement
1204
- binds the cached module. This is a deliberate scope boundary, not an
1205
- oversight - cascading reloads through a module graph brings the stale-instance
1206
- problem with it (objects already built keep their old class), and the cost of
1207
- getting that subtly wrong is higher than the cost of restarting. **Restart
1208
- app** covers it when it matters.
1209
-
1210
- ## [0.12.0] — unreleased
1211
-
1212
- ### Changed
1213
-
1214
- - **A session now survives a mode switch.** It belongs to the interface, not to
1215
- GUI mode. Toggling into the editor to nudge a button and back no longer
1216
- discards `ev`, no longer blanks a plot, and no longer re-runs `on_startup`.
1217
-
1218
- This reverses FR-015d, which said a switch ends the session. That behaviour
1219
- did not remove the cost of reloading data so much as move it: from "every
1220
- code edit", which the reload loop already solved, to "every layout edit",
1221
- which is the other half of the same loop. A researcher with a slow load was
1222
- still paying it, just for a different reason.
1223
-
1224
- ### Added
1225
-
1226
- - **A "Restart session" control** beside the mode toggle. Because toggling now
1227
- preserves everything deliberately, there has to be one explicit way to say
1228
- start over — and it is how a change to `on_startup` takes effect. Chrome
1229
- under FR-015c, and disabled in editor mode, where there is no live session to
1230
- discard (FR-015e).
1231
- - `Session`, owning what outlives a mode: `ev`, one matplotlib `Figure` per plot
1232
- area, and whether startup has run. A `Figure` can be attached to a new canvas,
1233
- which is what makes a drawn plot survive at all.
1234
- - `Session.reconcile` and `Session.retag`, so state belonging to an element
1235
- deleted in the editor is dropped and state belonging to a renamed one follows
1236
- the new tag (FR-015f).
1237
-
1238
- ### Fixed
1239
-
1240
- - A figure's callback registry is shared with **every canvas it is ever attached
1241
- to**. Reusing the figure across a switch therefore left the dead canvas's
1242
- connections live, so a single click fired the handler once per switch ever
1243
- made — three toggles, four handler calls. `PlotHandle.disconnect()` releases
1244
- them on teardown. Found by prototyping before designing, and now covered by a
1245
- test that fails with `assert 4 == 1` without the fix.
1246
-
1247
- ### Tests
1248
-
1249
- - Three tests driving real matplotlib events through the canvas: a drawn curve
1250
- survives a switch, a click fires exactly once after three switches, and a
1251
- renamed plot keeps its curve. Each was confirmed to fail against the
1252
- unfixed code.
1253
-
1254
- ## [0.11.1] — unreleased
1255
-
1256
- ### Fixed
1257
-
1258
- - A UI test asserted real OS focus, which the window manager can withhold and
1259
- which other tests disturb by mapping and unmapping the shared Tk root. It
1260
- passed alone and failed in the full suite. Now asks Tk which widget is last
1261
- focused *for that toplevel*, which is the same question without depending on
1262
- the desktop.
1263
-
1264
- ## [0.11.0] — unreleased
1265
-
1266
- ### Added
1267
-
1268
- - **`GUIDE.md`** — a user guide: install, first interface, the handler and `ev`
1269
- model, every element type with its code API, the full styling table, tagging,
1270
- deleting, and the known limits. It will grow as element types are added.
1271
-
1272
- ### Fixed
1273
-
1274
- - A plot area's `visible` could be set but not read. `PlotHandle` delegates
1275
- unknown attributes to its matplotlib `Axes`, which knows nothing about
1276
- `visible`, so reading it raised `AttributeError` while writing it worked. Any
1277
- style property a handle can set is now also readable — found while checking
1278
- the guide's claims rather than by writing them down and hoping.
1279
-
1280
- ## [0.10.0] — unreleased
1281
-
1282
- ### Fixed
1283
-
1284
- - Clicking, hovering or typing on a **plot area** raised `NameError: name
1285
- 'name' is not defined`. The v0.8.0 tag rename missed the closure inside
1286
- `build_plot_area`, which still referred to `name` and still passed
1287
- `element=` to an `Event` whose field had become `tag`. Plot areas were the
1288
- only element type affected.
1289
-
1290
- ### Added
1291
-
1292
- - `tests/ui/test_plot_events.py` drives matplotlib's own callback machinery —
1293
- the closures in `build_plot_area` — rather than calling the dispatcher
1294
- directly. Every other plot test went straight to the dispatcher, so the
1295
- closures were never executed and a NameError in them survived a 291-test
1296
- suite. Seven of the eight new tests fail against the bug.
1297
-
1298
- ## [0.9.0] — unreleased
1299
-
1300
- ### Added
1301
-
1302
- - **Style properties on buttons and labels**: fill colour, text colour, border
1303
- colour and width, font family, font size, bold, italic, alignment, enabled
1304
- and visible. A plot area takes only `visible` — matplotlib owns the rest of
1305
- how it looks, and offering a fill colour that did nothing would be a lie.
1306
- - **Every style property is settable from code**, and doing so changes the live
1307
- widget without ever writing back to the layout file. The layout holds the
1308
- *starting* appearance; research code overrides it for the session:
1309
-
1310
- ev.title.background = "#ffe0e0"
1311
- ev.title.font_size = 20
1312
- ev.run_fit.enabled = False
1313
-
1314
- - Editors for all of it in the properties panel: hex fields with a swatch that
1315
- opens the system colour picker, a font dropdown listing only families
1316
- actually installed, and checkboxes and radio buttons for the rest.
1317
- - The editor canvas now previews an element's real colours, font and weight, so
1318
- a styling choice can be judged without toggling to GUI mode.
1319
-
1320
- ### Changed
1321
-
1322
- - **Layout schema version 2.** The `style` block is new, and an older build
1323
- would reject it as an unrecognized key, so the version had to move — and with
1324
- it comes the first real migration (FR-036c said to write one when it was
1325
- actually needed rather than in advance). A version 1 layout opens unchanged,
1326
- is migrated in memory, and is only rewritten when something is saved.
1327
- - Only non-default style values are written, so an unstyled element is still a
1328
- three-line entry.
1329
-
1330
- ## [0.8.0] — unreleased
1331
-
1332
- ### Changed
1333
-
1334
- - An element's unique identifier is now called its **tag**, everywhere. It was
1335
- "name", which collided with the interface's own name and with the handler
1336
- *function* names it appears in. The legacy 2024 spike called it a tag too.
1337
-
1338
- Researcher-facing: `event.element` becomes `event.tag`; the properties panel
1339
- field is "Tag". Unchanged: `ev.<tag>`, `on_clicked_<tag>` and the layout file
1340
- format — the tag has always been the mapping key there, so **no existing
1341
- layout or research code needs editing**.
1342
-
1343
- Internally `Element.name` becomes `Element.tag`, `Layout.names()` becomes
1344
- `Layout.tags()`, `Layout.rename()` becomes `Layout.retag()`, and
1345
- `validate_name` becomes `validate_tag`. Deliberately *not* renamed:
1346
- `Interface.name`, which is the interface's own name, and `handler_name`,
1347
- which really is a function's name.
1348
-
1349
- ## [0.7.0] — unreleased
1350
-
1351
- ### Fixed
1352
-
1353
- - Resize cursors did nothing on Linux. `size_nw_se` and `size_ne_sw` are Tk's
1354
- Windows-only names; X11 has no such cursors, so every diagonal handle showed
1355
- no pointer change at all. The guard in `_set_cursor` caught the error and
1356
- said nothing. Replaced with X11 corner names, which all three platforms
1357
- accept — and which give each corner its own cursor rather than sharing one
1358
- across a diagonal. Found by CI on Linux.
1359
-
1360
- ### Added
1361
-
1362
- - `tools/verify.py` builds a throwaway interface for the manual verification
1363
- pass: a plot, a label and two buttons, with research code that loads slowly,
1364
- plots, and fails on demand. It removes the setup from Gate 2, which was the
1365
- real reason the pass had never been done.
1366
- - A test asserting every cursor name is valid on the running platform. Tk
1367
- silently ignores an unknown one, so nothing else would report it.
1368
-
1369
- ## [0.6.0] — unreleased
1370
-
1371
- ### Added
1372
-
1373
- - A **label** element: text placed in the layout and set from code with
1374
- `ev.status.text = "..."`. It is the first type with **no generated handler** —
1375
- a label displays text rather than being clicked, and a stub for every one
1376
- would leave a pile of dead functions in the researcher's file. Every
1377
- interaction is still available if the handler is written by hand (FR-017a);
1378
- only the automatic stub is withheld.
1379
-
1380
- ### Changed
1381
-
1382
- - The editor opens at 1080x760 rather than the interface's own size. That size
1383
- describes the *interface*, and is advisory; editor mode adds a sidebar the
1384
- interface knows nothing about. Switching to the editor grows a window that is
1385
- too small but never shrinks one — a size chosen deliberately stays.
1386
- - The default button is smaller: roughly 134x38 px on a maximised 1920x1080
1387
- window, down from 230x65, which read as unusually large.
1388
- - Palette entries are single compact rows of icon and name, about 33 px each,
1389
- rather than cards with descriptions. The vocabulary is going to grow, and a
1390
- card tall enough for a description does not survive a dozen types in a
1391
- sidebar.
1392
- - The text field in the properties panel now serves any text-bearing type, not
1393
- just buttons. `label` holds a button's caption and a label's text — the same
1394
- idea, so it stays one schema field rather than two.
1395
-
1396
- ## [0.5.0] — unreleased
1397
-
1398
- ### Added
1399
-
1400
- - Generated starter files import numpy as np. No research happens without it.
1401
- - A delete control in the properties panel, pinned to the bottom of the sidebar
1402
- so a destructive action is never the thing pushed off the screen. The
1403
- element's handler stays in the code file, as it always has.
1404
- - The editor sidebar scrolls when its contents are taller than the window.
1405
-
1406
- ### Changed
1407
-
1408
- - The editor has a modern look: the `clam` ttk theme restyled with a flat
1409
- palette, the element types shown as icon cards rather than radio buttons, and
1410
- the geometry fields laid out as a 2x2 grid instead of four stacked rows.
1411
- Icons are drawn as vectors rather than loaded from image files or set as text
1412
- glyphs — no assets to ship, and no bet on the platform font having a
1413
- character.
1414
- - Property edits commit on Enter or when the field loses focus. The Apply
1415
- button is gone: a value typed and tabbed away from is a value you meant.
1416
- - Removed the dashed "mode toggle" hint from the canvas. The toggle lives in
1417
- its own chrome bar above the layout, so nothing is ever underneath it and the
1418
- hint was misleading.
1419
-
1420
- ### Fixed
1421
-
1422
- - The sidebar's contents disappeared at small window sizes. Tk stops *mapping*
1423
- children that no longer fit rather than clipping them, so the geometry fields
1424
- were absent rather than scrolled out of view — with no error, no scrollbar,
1425
- and the only symptom being that typing into them did nothing. At the 800x450
1426
- default this affected every position field.
1427
-
1428
- ## [0.4.0] — unreleased
1429
-
1430
- ### Fixed
1431
-
1432
- - A button responded only to the left mouse button. Middle and right clicks did
1433
- not reach the handler at all — Tk's `command` option fires for button 1 only,
1434
- and nothing else was bound. The event also reported `"left"` unconditionally,
1435
- since the value was hardcoded rather than read from the click. All three
1436
- buttons now fire the handler and `event.button` says which one.
1437
- - Removed `_bind_tk_events`, which was written but never called.
1438
-
1439
- ### Changed
1440
-
1441
- - The generated stub for a plot area now prints which mouse button was used
1442
- alongside the coordinates, and its comment lists the possible values. The
1443
- button was always available on the event; nothing advertised it.
1444
-
1445
- ## [0.3.0] — unreleased
1446
-
1447
- ### Changed
1448
-
1449
- - Placing an element no longer opens a modal asking for its name. The element
1450
- is created with its default name, selected, and the properties panel's name
1451
- field is focused with the text selected — so accepting the default needs no
1452
- typing and replacing it needs no extra click. This still satisfies FR-005a,
1453
- and it removes a dialog that stopped the researcher on every placement.
1454
-
1455
- ### Fixed
1456
-
1457
- - The test suite could stop and wait for a human. One code path opened a modal
1458
- that no test stubbed, which made the suite unrunnable unattended and so
1459
- disqualified it as a release gate (Principle VII, Gate 1). The dialog is
1460
- gone, and `tests/conftest.py` now makes any modal — dialog, message box or
1461
- file chooser — raise instead of block, so a future one fails loudly rather
1462
- than appearing to hang.
1463
-
1464
- ## [0.2.0] — unreleased
1465
-
1466
- Everything found by the first hands-on session with the application. Each of the
1467
- four defects below was a component that was fully implemented and never
1468
- connected to anything, and each was invisible to the automated suite because the
1469
- tests exercised the mechanism directly rather than going through the assembled
1470
- app.
1471
-
1472
- ### Fixed
1473
-
1474
- - The mode toggle did nothing. `ModeToggle` was written but never instantiated,
1475
- so the chrome frame held no control at all.
1476
- - `ev.some_plot.plot(...)` drew nothing after the first interaction. An embedded
1477
- figure gets no automatic repaint — pyplot installs that hook and pyplot has no
1478
- place here, since `plt.show()` would start a second event loop against Tk's.
1479
- Handlers now repaint whatever they drew.
1480
- - A launch-time fault in startup was reported twice, because the deferred-startup
1481
- hook re-entered itself.
1482
- - Adding an element to a `.py` written with CRLF line endings rewrote every line
1483
- in the file.
1484
-
1485
- ### Added
1486
-
1487
- - Drag an element to move it; drag an edge to resize one dimension or a corner
1488
- to resize both. Pointer feedback says what a press will do before you commit.
1489
- - Click empty canvas to place an element at a sensible default size for its
1490
- type, centred on the click. Escape deselects, since clicking now creates.
1491
- - `iterlab.run(name)` — the library entry point that contracts/commands.md and
1492
- the README had documented while `__init__.py` was empty.
1493
- - The version has a single source of truth in `__init__.py`, which
1494
- `pyproject.toml` reads.
1495
-
1496
- ## [0.1.0] — unreleased
1497
-
1498
- The initial implementation of feature 001. Never published; superseded by 0.2.0
1499
- before it left the working tree.
1500
-
1501
- ### Added
1502
-
1503
- - `iterlab <name>` opens an interface. One command; editing and using it are two
1504
- modes of one program, switched with the toggle in the top-left corner.
1505
- - **Editor mode**: a canvas, a palette of element types, and a properties panel.
1506
- Draw by dragging; every property is editable, including the name.
1507
- - **GUI mode**: the interface as drawn, with handlers wired and the standard
1508
- matplotlib navigation toolbar on every plot area.
1509
- - Two element types: plot areas and buttons.
1510
- - Handlers bind by naming convention (`on_<interaction>_<element>`), with the
1511
- universal interaction set click / hover / motion / key. Every handler is
1512
- optional; exactly one stub is generated per element.
1513
- - Code changes take effect on the next interaction with no restart, and nothing
1514
- in the session is discarded — loaded data, computed results and drawn plots
1515
- all survive.
1516
- - A fault in researcher code never ends the session. It is reported to stderr
1517
- in full and signalled in the window, and the report clears when corrected code
1518
- runs. An element with no handler is silent, which is a different thing.
1519
- - Renaming an element rewrites its handlers and nothing else in the file.
1520
- - Layout files record `schema_version: 1`. A layout written by a newer iterlab
1521
- is reported and left untouched rather than partially understood.
1522
-
1523
- ### Known limits
1524
-
1525
- - A mode switch ends the session; switching back runs startup again. Applying
1526
- layout edits to a live session is the aim, not a promise.
1527
- - Changing `on_startup` takes effect by starting a fresh session — toggling out
1528
- and back is enough.
1529
- - Handlers run to completion while the interface waits. Long computations block
1530
- the window.
1531
- - Reloading a module re-executes its top level, so data loaded at module level
1532
- rather than in `on_startup` will reload on every edit. The generated starter
1533
- file says so.
1
+ # Changelog
2
+
3
+ All notable changes to iterlab are recorded here. The project follows semantic
4
+ versioning as defined in the project constitution's *Release And Versioning*
5
+ section, where the public surface is larger than the Python API: the layout
6
+ schema, the handler naming convention, the `ev` contract, the generated stub
7
+ shape, and the command are all consumed directly by researcher-written code.
8
+
9
+ ## [2.1.0] — 2026-09-26
10
+
11
+ ### Added
12
+
13
+ - **Right-click an element in the editor to go to its code.** The menu lists
14
+ the element's handlers, its main one first. A handler you have written opens
15
+ in your editor at its line; one you have not is added to the end of your file
16
+ and then opened, so the menu is also where you find out what else an element
17
+ can do. Only the interactions an element can fire are offered: `changed`
18
+ only for the two boxes, `key` only for those and a plot.
19
+
20
+ The heading names the editor. iterlab recognises VS Code and PyCharm when you
21
+ launched it from one, by what they set in the environment or by finding them
22
+ among its parent processes, and says `<select IDE>` when it cannot tell.
23
+ Point at the heading to pick VS Code, PyCharm, Sublime Text, Notepad++ or
24
+ your default text editor. The pick is remembered outside the project, beside
25
+ what the file selectors remember, and wins over detection from then on.
26
+
27
+ No IDE extension is involved. Each of these editors opens a file at a line
28
+ from its own command line, and sends that to the window you have open.
29
+
30
+ ### Changed
31
+
32
+ - **The first switch to your interface no longer pauses.** The editor never
33
+ draws a plot, so matplotlib - about a third of a second to import, and
34
+ seventy-odd modules - used to load the first time you pressed the toggle,
35
+ and read as iterlab being slow to run what you drew. It now loads while the
36
+ window is opening, before anything is on screen. Opening takes that much
37
+ longer; the first switch takes as long as every later one.
38
+
39
+ - **`on_key_` is gone from buttons, selectors and labels.** It could not fire
40
+ from a click: none of them takes the keyboard when clicked, and a label
41
+ cannot take it at all, so a key pressed after clicking one went to whatever
42
+ had focus before - a number box, in the case that found this. It was
43
+ documented as working on every element, and only ever did after a Tab, which
44
+ nobody does in an interface like this. They no longer listen for keys, so a
45
+ hand-written one cannot half-work. `on_key_` stays on plots and the two boxes,
46
+ which do take the keyboard.
47
+
48
+ ### Fixed
49
+
50
+ - **An edit could silently fail to take effect.** The guide's own first example
51
+ is "change `2` to `5`, save, click". Saved within a second of the last load,
52
+ that edit did nothing and reported nothing: the loader noticed the change,
53
+ reloaded, and Python handed back the old compiled code, because it judges its
54
+ `__pycache__` fresh by whole-second modification time and file size, and `2`
55
+ and `5` are the same size. A second, separate gap sat underneath it: Windows
56
+ records file times in ticks of up to about 15 ms, so two same-size saves in
57
+ one tick were not even noticed.
58
+
59
+ People rarely save twice in a second. An editor that formats on save does it
60
+ routinely, and so does an assistant editing the file. Your code is now
61
+ compiled from its source on every load, never from a cache, and a change is
62
+ detected by content as well as by time and size. This is Principle IV - a
63
+ code change takes effect without a restart - holding when it had quietly not.
64
+
65
+ - **A helper module beside your code could not be imported under the `iterlab`
66
+ command.** `import helper` next to `demo.py` worked when launched from an
67
+ IDE, where Python puts the script's folder on the path, and failed with
68
+ `ModuleNotFoundError` under `iterlab demo`, where nothing did. The project
69
+ folder now goes first on the path, exactly as `python demo.py` puts it.
70
+
71
+ - **Hard reset did not pick up an edited helper module**, though the guide said
72
+ it did. It forgot your own module, and the helper stayed cached. It now
73
+ forgets every module loaded from your project folder, and its compiled cache,
74
+ while never touching installed packages - a project's `.venv` usually sits
75
+ inside the folder, and re-importing numpy over its running C extensions would
76
+ crash rather than restart. An upgraded installed library still needs iterlab
77
+ closed and reopened, which the guide now says.
78
+
79
+ - **A plot's toolbar misbehaved after a trip to the editor.** With the zoom or
80
+ pan tool pressed, the old toolbar stayed connected to the plot and went on
81
+ answering drags, raising `invalid command name ...canvas` on each one, while
82
+ the new toolbar showed no tool pressed. And Home and Back did nothing, because
83
+ the history of views was rebuilt empty, so a zoomed plot had no way back to
84
+ the full view. The old toolbar is now disconnected, and the pressed tool and
85
+ the view history both stay with the plot.
86
+
87
+ - **The Screenshot button's hover text mentioned `.yaml` files**, a format 2.0.0
88
+ retired.
89
+
90
+ ### Documentation
91
+
92
+ - **The guide, the manual checklist, the contracts and the constitution now
93
+ match the released product.** The guide's footer claimed it was verified
94
+ against 1.4.0; its cross-version section described migrations 2.0.0 removed;
95
+ its event table missed `"changed"` and `event.path`. Five checklist rows
96
+ tested behaviour 1.6.0 replaced. The layout-schema contract still described
97
+ schema 4 in YAML, and the handler contract said `event.kind` was `"click"`.
98
+
99
+ The constitution is amended to 4.0.0. It had described YAML layouts and
100
+ handler-only renames for four releases after they stopped being true. The
101
+ 2.0.0 break, taken with no migration while iterlab had no users, is recorded
102
+ as a dated exception rather than made legal: the compatibility obligations
103
+ bind every release after it in full.
104
+
105
+ The feature 001 spec, plan, tasks and research are left as written, as the
106
+ design record they are, with a banner pointing to what is current.
107
+
108
+ ### Testing
109
+
110
+ - **The manual checklist shrinks from 59 items to 37**, before one is added for
111
+ the right-click menu. Twenty-two came out:
112
+ seven that the suite already asserted, three merged into items that judge the
113
+ same thing, eleven now automated, and one open question (does a zoom survive
114
+ a trip to the editor?) decided and tested. The rule was always that Gate 2 holds
115
+ only what cannot be automated. Several items claimed that and were wrong.
116
+ Retired numbers are listed in `VERIFICATION.md` with the test that replaced
117
+ each one, and are never reused.
118
+
119
+ - **Real launches.** A new process runs `python demo.py`, the way an IDE's
120
+ run button does, from another directory. It closes, relaunches, and checks
121
+ that the window size and a file selector's memory came back. That covers
122
+ a resize in either mode, a remembered file that was since deleted, and a
123
+ project folder that was moved.
124
+ - **Real screenshots.** The Screenshot button is pressed against a real
125
+ screen and the PNG is read back. The tests check its size, where an element
126
+ is to the pixel, and that a zoomed plot is captured zoomed.
127
+ - **The title bar icon** is grabbed from the screen and searched for the
128
+ mark's colour. Tk reports success for an icon that renders as the feather,
129
+ a grey box, or the 256 px artwork squeezed to a thin outline, and this
130
+ catches each of them.
131
+ - **Telling element types apart** is measured as perceptual colour distance
132
+ between every pair. The threshold is checked against the label and file
133
+ selector colours that once shipped looking identical.
134
+ - **A real downgrade** runs in CI. A project made by this version is opened
135
+ by the previous release, installed from PyPI, and both backups are checked.
136
+
137
+ - **The display suite could crash Windows Tk partway through.** Every interface
138
+ opened set the window icon again, and on Windows each time loads the `.ico`
139
+ afresh and never frees the last one: 21 GDI objects, against a limit of
140
+ 10,000 per process. A launch does it once, so no researcher met it, but the
141
+ suite opens hundreds of interfaces on one shared window, and reached about
142
+ 9,900 by the end. The next few tests added crashed it with an access
143
+ violation. The icon is now set once per window, and a full run peaks at a
144
+ few hundred.
145
+
146
+ - **Seventeen tests removed**: thirteen that repeated another test's check the
147
+ same way, three that could not fail, and one diagnostic left over from a
148
+ debugging session.
149
+
150
+ - **Five tests that could no longer fail now test what they say.** They wrote
151
+ 1.x YAML into what is now a Python layout file, so they passed at parsing and
152
+ never reached the validation they were named for. One passed only because its
153
+ search text happened to match the `Ev` class.
154
+
155
+ - **A layout with no version stamp no longer calls itself "a build older than
156
+ 1.4.0".** Every iterlab since then stamps what it writes, so an unstamped
157
+ file was written by hand. The message now says the file does not record which
158
+ iterlab wrote it. It is still backed up and announced.
159
+
160
+ ## [2.0.1] — 2026-09-14
161
+
162
+ ### Changed
163
+
164
+ - **A new code file separates what you never edit from what you do.** The
165
+ `TYPE_CHECKING` import that lets your editor complete `ev.` now sits at the
166
+ very top, inside a frame of `#` characters that says it is boilerplate you
167
+ do not need to touch, followed by what it is for. Your own imports start
168
+ below the frame, so the section you will add to is no longer interleaved
169
+ with the one you can ignore.
170
+
171
+ The docstring also loses its line about the top-left toggle: it describes
172
+ the window, not the code.
173
+
174
+ Checked with pycodestyle, which PyCharm's PEP 8 inspection uses, and with
175
+ ruff: neither flags the imports below the frame as not being at the top of
176
+ the file. Only new files are affected; iterlab never rewrites a file you
177
+ already have.
178
+
179
+ ## [2.0.0] — 2026-09-14
180
+
181
+ ### Changed
182
+
183
+ - **An interface is two files again: `demo.py` and `demo_layout.py`.** The
184
+ layout moved out of YAML and into a Python module, where it sits beside the
185
+ `Ev` class your editor reads. One write produces both, so what you drew and
186
+ what your editor offers cannot drift apart.
187
+
188
+ ```python
189
+ LAYOUT = {
190
+ 'schema_version': 8,
191
+ 'window': {'width': 960, 'height': 540},
192
+ 'elements': {
193
+ 'spectrum': {'type': 'axes', 'position': [0.05, 0.5, 0.9, 0.4]},
194
+ },
195
+ }
196
+
197
+
198
+ class Ev:
199
+ spectrum: "Axes"
200
+ ```
201
+
202
+ **iterlab never imports it.** The layout is lifted out of the parse tree and
203
+ evaluated as literals only, so opening somebody else's interface is as safe
204
+ as opening a data file — an `import` here would have made every shared
205
+ project arbitrary code execution. A computed value in `LAYOUT` is refused
206
+ rather than evaluated, which is the price of that guarantee and worth it.
207
+
208
+ PyYAML is no longer a dependency.
209
+
210
+ - **Files written by 1.x do not open, and there is no migration.** Deliberate:
211
+ the library is new enough to have no users, so nobody has a layout to lose,
212
+ and a migration written for files that do not exist is a cost with no payer.
213
+ A `demo.yaml` left in the folder is not read, not deleted, and not ignored
214
+ either — iterlab says what happened and opens a new interface beside it.
215
+
216
+ Schema 8 is the first version of this format. The migration machinery stays
217
+ for the next real change.
218
+
219
+ ## [1.7.1] — never published
220
+
221
+ Prepared and gated, then overtaken by 2.0.0 before it was uploaded. Everything
222
+ below ships in 2.0.0; the section stays because the work and its reasoning did
223
+ not change, only the number it went out under.
224
+
225
+ ### Added
226
+
227
+ - **Your editor can see what an element offers.** `ev.lbl_0.background` used to
228
+ complete to nothing and read as an unknown attribute to anything strict
229
+ enough to look: style properties are reached through `__setattr__` against a
230
+ tuple of names, which works perfectly at run time and is invisible to a type
231
+ checker. They are now declared as annotations without values, so an editor
232
+ can offer them while the runtime path is untouched.
233
+
234
+ `.text`, `.value`, `.path` and `.visible` gained return types, which turns
235
+ them from `Any` into `str`, `float`, `str` and `bool`.
236
+
237
+ The package also carries a `py.typed` marker now (PEP 561). Without it a
238
+ checker ignores everything above.
239
+
240
+ Checked with a real type checker against the built wheel rather than by
241
+ reasoning about it:
242
+
243
+ | expression | before | now |
244
+ |---|---|---|
245
+ | `label.background` | unknown attribute | `str \| None` |
246
+ | `label.text` | `Any` | `str` |
247
+ | `box.value` | `Any` | `float` |
248
+ | `plot.plot` | matplotlib's signature | unchanged |
249
+
250
+ This is the half that touches nothing you wrote. Completions on `ev.<tag>`
251
+ itself need a type for `ev`, which is a separate change.
252
+
253
+ - **Your editor can complete `ev.`** iterlab writes `demo_ev.py` beside your
254
+ pair, declaring each element and what it is, and rewrites it whenever you
255
+ draw, rename or delete one. Generated handlers say `ev: "Ev"`, so inside one
256
+ your editor offers the elements you drew — and `ev.ax_0.` offers matplotlib's
257
+ own methods and signatures, because an axes *is* an `Axes`.
258
+
259
+ Ordinary typing rather than an editor plugin, so it works wherever you work.
260
+ Verified by running a type checker over a project iterlab generated:
261
+ `ev.spectrum.plot` resolves to matplotlib's signature, `.value` to `float`,
262
+ `.text` to `str`, `.background` to `str | None`, and your own `ev.my_cache`
263
+ to `Any` with no error.
264
+
265
+ The generated module is read by type checkers and never at run time. Delete
266
+ it and everything still works.
267
+
268
+ **iterlab will not add the import to a file it did not write.** Everything it
269
+ puts in your file is appended, leaving what you wrote as an exact prefix, and
270
+ an import goes at the top - that guarantee is worth more than a completion.
271
+ So a file without the import gets plain stubs, as before, and the guide has
272
+ the two lines that opt in.
273
+
274
+ ### Fixed
275
+
276
+ - **The pan and zoom toolbar was missing under most plots.** It existed under
277
+ every one of them and was visible under almost none: Tk hands out a frame's
278
+ space in the order things are packed, and the canvas was packed first with
279
+ `expand=True`, so it took the lot and the toolbar was never mapped. Whether
280
+ one showed came down to whether that particular plot happened to be tall
281
+ enough, which is why it looked like the *second* axes was special.
282
+
283
+ Packed before the canvas now, which is the whole fix.
284
+
285
+ The tests that covered this asked whether the toolbar widget existed. It did.
286
+ They now ask whether it is on screen, for plots of three different heights and
287
+ across a mode switch, and the old order fails all four.
288
+
289
+ ## [1.7.0] — 2026-09-13
290
+
291
+ ### Changed
292
+
293
+ - **Renaming an element now follows it through your code.** It used to rename
294
+ the element's handlers and nothing else, which left every `ev.old_tag` in the
295
+ file pointing at an element that no longer existed — working code turned into
296
+ a runtime error the next time that line ran.
297
+
298
+ A rename now moves the handlers, attribute access (`ev.old`, and anything
299
+ else on the left of the dot), whole-word mentions in comments, and whole-word
300
+ mentions in strings. The last of those is how `ev.old` written inside an
301
+ f-string is reached, which matters because the generated stub is exactly that
302
+ shape. The properties panel reports what it rewrote, because editing someone
303
+ else's file quietly is not a thing to do twice.
304
+
305
+ **A name matches whole or not at all.** With `cmdRun` and `cmdRunAlgorithm`
306
+ both on the canvas, renaming the first to `cmdRunData` leaves the second
307
+ untouched everywhere — handler, attribute and prose — and leaves your own
308
+ `ev.cmdRun_cache` alone as well. A text substitution rewrites all three and
309
+ silently unwires an element you never touched; that is why the work is driven
310
+ by the tokenizer rather than by `str.replace`, and why swapping in the naive
311
+ version fails eight tests.
312
+
313
+ Deliberately untouched: a bare local that happens to share the name. Nothing
314
+ can distinguish it from a coincidence, so the dot is what a reference is
315
+ recognized by.
316
+
317
+ Unchanged: a file that will not parse is still refused outright, and line
318
+ endings are still preserved to the byte.
319
+
320
+ ## [1.6.0] — 2026-09-13
321
+
322
+ ### Changed
323
+
324
+ - **One window, and switching modes no longer moves it.** The editor and the
325
+ running interface are now exactly the same size at all times. The toolbar
326
+ takes its room from inside the window instead of being added beside it.
327
+
328
+ That leaves the canvas a different *shape* from the interface, and positions
329
+ are fractions — an element drawn on a canvas of the wrong shape comes out
330
+ stretched when it runs. So the canvas keeps the interface's proportions and
331
+ gives up size: the largest rectangle of that shape which fits beside the
332
+ toolbar, centred, with the backdrop showing around it. The white rectangle is
333
+ the window you will run in; the grey is the room the toolbar borrowed.
334
+
335
+ What this replaces: the editor window was the interface *plus* the toolbar,
336
+ which meant every mode switch resized the window — and every plot on screen
337
+ re-rendered for it. Switching now resizes nothing, so that cost is gone for
338
+ good rather than merely reduced.
339
+
340
+ The editor's height floor is gone with it. A short window makes for a short
341
+ toolbar, and the toolbar scrolls; it has been a scrolling column since 0.13.0
342
+ for exactly this reason.
343
+
344
+ - **Folding the toolbar grows the canvas** instead of narrowing the window. The
345
+ window cannot move — it is the interface's size — so the room the toolbar
346
+ gives up goes to the canvas, at the same proportions. Folding is now a way to
347
+ see your layout bigger.
348
+
349
+ - **A new project opens at half your screen**, rather than a fixed 800x450.
350
+ That size is a dialog on an ordinary monitor and a postage stamp on a large
351
+ one, and no fixed number can be right for both a laptop and a 4K display.
352
+
353
+ Only at creation. An existing project opens at the size it was left at, and
354
+ nothing re-decides that for you.
355
+
356
+ - **The editor backdrop is a shade darker than the sidebar.** The canvas is a
357
+ picture of the run window and its edge has to be findable; against the
358
+ sidebar's own colour, a white canvas had almost no edge at all.
359
+
360
+ ### Fixed
361
+
362
+ - **Toggling modes filled the Tcl interpreter with images.** Each plot's
363
+ pan/zoom toolbar holds fifteen Tk images, and destroying the widgets released
364
+ none of them: the objects owning them sit in reference cycles, so they stayed
365
+ until a full garbage collection happened to run. Ten round trips over three
366
+ plots left 135 behind. Enough of them and Tk dies with an access violation
367
+ while building something unrelated — which is how this was found, in a test
368
+ suite that kept falling over in a file that had nothing to do with it.
369
+
370
+ Released on teardown now, where the canvas's event connections were already
371
+ being released for the same reason. Growth over ten round trips: 135 images
372
+ before, 6 after.
373
+
374
+ - **A property field below the fold could not be typed into.** Tk unmaps a
375
+ canvas window that is scrolled out of view, and an unmapped widget takes no
376
+ focus — so in a toolbar too short to show everything, the keys went nowhere
377
+ and the value was silently never committed. Fields are now scrolled into view
378
+ when they take focus, and opening the **More** drawer brings the drawer with
379
+ it rather than opening it somewhere you cannot see.
380
+
381
+ ## [1.5.1] — 2026-09-12
382
+
383
+ ### Fixed
384
+
385
+ - **Switching back to the interface got slower, and it was the plots redrawing
386
+ twice.** Both modes come from one remembered size, so every switch now
387
+ resizes the window by the toolbar's width. `geometry` only *asks* for a size —
388
+ Tk applies it on a later pass — so the new mode was built at the old width and
389
+ every plot on screen rendered again when the resize finally landed.
390
+
391
+ Measured on three plots, per switch:
392
+
393
+ | | canvas renders | in rendering | switch |
394
+ |---|---|---|---|
395
+ | before the toolbar change | 6 | 78 ms | 133 ms |
396
+ | after it | 9 | 115 ms | 161 ms |
397
+ | now | 6 | 70 ms | 114 ms |
398
+
399
+ It is one extra render of every plot, so it costs whatever your plots cost:
400
+ barely visible on two small ones, a wait on a screenful.
401
+
402
+ The window is now sized and the resize allowed to land *before* the new mode
403
+ is built. That means running the event loop mid-switch, so a click on the top
404
+ bar can arrive between teardown and the new interface existing — `App.busy`
405
+ refuses one while a switch is part-built, rather than letting a rebuild start
406
+ inside a rebuild and tear down what the outer one is holding.
407
+
408
+ Held by a test that counts renders rather than timing them, because a timing
409
+ budget on a shared runner is a flake and the count is what changed.
410
+
411
+ - **The shipped example announced a version crossing to everyone who opened
412
+ it.** `examples/showcase.yaml` was stamped 1.4.0 and shipped in 1.5.0, so
413
+ iterlab correctly decided the file came from another version, said so, and
414
+ left two `.bak` files beside it. It now records the current version, and a
415
+ test keeps it there — it goes stale on every release by nature.
416
+
417
+ ## [1.5.0] — 2026-09-12
418
+
419
+ ### Added
420
+
421
+ - **A showcase project, in `examples/`.** Three plots — sines at several
422
+ frequencies, a scatter cloud, a bar chart with error bars — plus two boxes,
423
+ three buttons and the labels around them:
424
+
425
+ ```console
426
+ iterlab examples/showcase
427
+ ```
428
+
429
+ It is a sanity harness first: one command, and every element type that draws
430
+ is on screen doing something. Its `on_startup` builds the data and every
431
+ handler under it only draws, so editing the file and clicking **Redraw** shows
432
+ the loop the project exists for.
433
+
434
+ The suite opens it, runs its startup and uses its controls, because a curated
435
+ project is code nobody runs until someone does — which is exactly how
436
+ `tools/verify.py` came to spend several releases unable to start.
437
+
438
+ `examples/` now ships in the source distribution alongside `docs/`.
439
+
440
+ ### Changed
441
+
442
+ - **The README shows the loop rather than describing it.** A screenshot of the
443
+ showcase project in both modes, with the code between them, under the opening
444
+ paragraph. It lives in `docs/` beside the logo, so it ships in the source
445
+ distribution and not in every wheel.
446
+
447
+ The description on PyPI is frozen into each release at upload time and is
448
+ never re-read from the repository, so a README edit reaches that page only
449
+ when a version is published. This is the release that carries it.
450
+
451
+ ## [1.4.0] — 2026-09-11
452
+
453
+ ### Changed
454
+
455
+ - **One size describes both modes, and the canvas is the run window.** The
456
+ editor canvas is now exactly the interface's pixels, and the editor window is
457
+ that plus the toolbar beside it. Resize either and the other follows.
458
+
459
+ The old model added the toolbar *and* applied a floor of its own (1080x760) to
460
+ the editor, so the two modes were different **shapes**. Positions are
461
+ fractions, so an element drawn square came out stretched when run. That, not
462
+ the forgetting, was the confusing part — the sizes were never comparable in
463
+ the first place.
464
+
465
+ The editor keeps a floor, but it no longer reaches the interface. The window
466
+ stays tall enough for the toolbar's own controls; below that height the canvas
467
+ holds its own size and the leftover shows as blank space under it. Tk does not
468
+ clip a column that does not fit - it silently leaves the bottom controls
469
+ unmapped - so without the floor the properties panel loses its lower half and
470
+ still looks complete. The interface itself now has the only floor that
471
+ constrains it (320x240).
472
+
473
+ - **Editor resizes are now saved**, reversing 1.4.0's earlier rule. That rule
474
+ existed because the editor window was not the interface's size; now it is,
475
+ minus a known allowance, so it can be read straight back out.
476
+
477
+ ### Added
478
+
479
+ - **The toolbar folds to a strip.** Click **Toolbar** to fold it away and again
480
+ to bring it back. The window narrows by the difference, so the canvas keeps
481
+ exactly the pixels it had — folding tidies the desk without resizing the
482
+ interface. Called "Toolbar" rather than left as a bare chevron, because a
483
+ chevron on an empty strip does not say what expanding would get you.
484
+
485
+ Kept in the layout, so it travels with the project. Selecting an element while
486
+ folded does not open it: nothing moves unless the researcher moves it.
487
+
488
+ - **Layout schema 6 → 7** for the folded state, no-op migration; absent means
489
+ expanded, which is what every older file means.
490
+
491
+ - A test holds the two window allowances in step with the two panel widths they
492
+ stand for. They live in different modules, and if they drift the canvas
493
+ silently stops being the run window — which would go unnoticed, because
494
+ nothing would look broken.
495
+
496
+ - **A project records which iterlab last edited it, and is backed up when that
497
+ changes.** The layout carries an `iterlab_version` stamp; opening it with a
498
+ different version — newer *or* older — copies both files aside first, as
499
+ `demo.yaml.v1.3.0.bak` and `demo.py.v1.3.0.bak`. The version in the name is
500
+ the one that wrote them, since that is what the copy preserves.
501
+
502
+ Either direction, deliberately. The downgrade is the dangerous one: an older
503
+ build meets a key or an element type it has never heard of. An upgrade is
504
+ safer, because migrations run forward and are tested, but a migration is still
505
+ a rewrite of the researcher's layout.
506
+
507
+ The `.py` is copied and never otherwise touched. If a version change ever went
508
+ wrong across stub injection or a rename, that is the copy that would matter
509
+ most — a layout can be redrawn, an algorithm cannot.
510
+
511
+ An existing backup is not overwritten: the one already on disk is the older
512
+ and more original of the two. A folder that cannot be written to does not stop
513
+ the interface opening, since a folder iterlab cannot write is one it cannot
514
+ damage either — but it says so rather than failing silently.
515
+
516
+ A project made before this has no stamp, and that is the commonest crossing of
517
+ all, so its copies are named `.vunknown.bak` and it is announced like any
518
+ other. An early return on "no recorded version" made exactly that case silent,
519
+ which a test now prevents.
520
+
521
+ - **Layout schema 5 → 6** for the new key, with a no-op migration. An older file
522
+ simply has no stamp, which already means what it needs to mean.
523
+
524
+ ### Fixed
525
+
526
+ - **The Gate 2 setup tool could not be started.** `tools/verify.py` called
527
+ `create_element(..., name=...)` several releases after that argument became
528
+ `tag`, so the manual pass raised `TypeError` before it drew anything. Both its
529
+ buttons also read "Click here!" once buttons gained a default label, while the
530
+ checklist says to click **Redraw** and **Break it**. Nothing noticed either,
531
+ because the only thing that runs this tool is a person about to do a pass —
532
+ and the results table records that none happened. The tool is now exercised by
533
+ the suite, including that its button labels are words the checklist actually
534
+ names.
535
+
536
+ - **The release gate could be satisfied by prose.** Gate 2 is the recorded
537
+ manual pass, and the check that asks whether it happened looked for the
538
+ version string anywhere in `VERIFICATION.md`. 1.4.0 passed it on the strength
539
+ of a checklist item reading "open a project made before 1.4.0" — so the one
540
+ automated question standing between an unverified build and an upload that
541
+ cannot be withdrawn was answered by a sentence about something else. It now
542
+ reads the *Recorded results* table, and a near miss such as `1.3.10` does not
543
+ answer for `1.3.1`.
544
+
545
+ - **An interface reopened at the default size instead of the size it was left
546
+ at.** The layout has always carried a `window` size and nothing ever wrote to
547
+ it, so it stayed at 800x450 forever and every launch opened there.
548
+
549
+ The editor appeared to remember, which is what made this easy to miss for so
550
+ long. It does not: it is forced up to a minimum that makes the palette and
551
+ properties panel fit, and that minimum happened to resemble the size people
552
+ were working at. Nothing was being remembered anywhere.
553
+
554
+ A resize in GUI mode is now written to the layout, debounced by 400 ms —
555
+ dragging a window edge fires `<Configure>` continuously, and saving per pixel
556
+ would rewrite the file hundreds of times for one drag. An unchanged size
557
+ writes nothing, and a minimised window (Tk reports 1x1) is not a size anyone
558
+ chose.
559
+
560
+ **Editor resizes are deliberately not saved.** That window holds the sidebar
561
+ and has a floor, so it is not the interface's size — saving it would enlarge a
562
+ deliberately small interface the first time somebody opened the editor on it.
563
+ There is a test for exactly that.
564
+
565
+ Closing also cancels any pending save. One firing into a destroyed root is
566
+ what printed `invalid command name` on the way out, which I found while
567
+ testing this rather than after shipping it.
568
+
569
+ ### Changed
570
+
571
+ - **A label looks like text rather than a card.** On the editor canvas it is
572
+ drawn in the canvas's own colour with a black edge; in the running interface
573
+ it takes the background behind it and has no edge.
574
+
575
+ Its editor tint used to be `#e7f2e9` against the file selector's `#e6f0ea` —
576
+ near enough that a glance could not tell them apart, which is what prompted
577
+ this. And in the interface a caption sat in a white box, which is exactly what
578
+ a caption should not look like.
579
+
580
+ Drawn in the canvas colour rather than with `fill=""`. Truly unfilled would
581
+ have been the obvious way to say "transparent", and it would have stopped the
582
+ label being selectable: an unfilled canvas rectangle is only hit on its
583
+ outline, so it would have been clickable on the border and dead in the middle.
584
+ Same colour as the canvas is indistinguishable and stays clickable, and two
585
+ tests hold that line.
586
+
587
+ Tk has no real transparency, so "transparent" in the interface means painting
588
+ the parent's own colour. A background or edge set by researcher code still
589
+ wins — this is only the default.
590
+
591
+ - **Buttons and both selectors now default to the label's height.** All four are
592
+ one line of text, so a row of them lines up without anyone resizing anything.
593
+ Widths still differ, because caption length is what actually varies:
594
+ "Select a Folder" needs more room than "Click here!". Named `LINE_HEIGHT` and
595
+ shared, with a test pinning it so the four cannot drift apart again.
596
+
597
+ The text boxes are deliberately left taller: a field someone types into wants
598
+ more room than a caption they only read.
599
+
600
+ **One consequence, measured rather than assumed.** At the default 800x450
601
+ window a caption needs 16 px and 0.03 of the content area gives 12, so a
602
+ button's text clips there. From roughly 800x720 upward it fits comfortably
603
+ (20 px and rising). The old 0.04 gave exactly 16 px at the default size, which
604
+ is why this did not show before. A label has always been 0.03 and has always
605
+ clipped at that size; this makes buttons match it in both respects.
606
+
607
+ - **Adding an element is now a deliberate two-step act: pick a type, then place
608
+ it.** The palette starts with nothing armed and returns to that after each
609
+ placement, so one pick puts down one element and the highlight clears.
610
+
611
+ A type used to be armed permanently, defaulting to the first in the list, so
612
+ *any* click on the canvas background produced an element — including the click
613
+ a researcher meant as "get out of what I was doing". They then had to find the
614
+ stray element and delete it, and the most likely place for it to land was
615
+ underneath something else.
616
+
617
+ With nothing armed, a background click does what a background click normally
618
+ does: commits whatever was being typed, drops the selection, and takes the
619
+ focus. Existing elements are still selectable, movable and deletable — the
620
+ canvas is not inert, it just does not manufacture things.
621
+
622
+ ### Added
623
+
624
+ - **Hovering an element in the editor names its tag.** A button reading "Click
625
+ here!" gives no clue whether it is `cmd_0` or `run_fit`, and that name is what
626
+ the researcher's code uses — so the tooltip answers where the question is
627
+ asked, rather than making them select the element and read the properties
628
+ panel.
629
+
630
+ Shown for everything that displays text, including the two selectors. An axes
631
+ is left out on purpose: it already has its tag drawn on it, so a tooltip would
632
+ only repeat what is there.
633
+
634
+ Faster than the top-bar tooltips (200 ms against 450 ms), because the pointer
635
+ is already on the thing being asked about and the answer is one word. Not
636
+ instant: zero delay would flicker across the canvas on any movement. It holds
637
+ still once shown rather than following the pointer, and gets out of the way on
638
+ a press or a drag.
639
+
640
+ Canvas items cannot carry `<Enter>` and `<Leave>` the way widgets can, so this
641
+ is driven from the motion handler that already reports what a press would do.
642
+
643
+ ### Fixed
644
+
645
+ - **An element with no text showed its tag instead of nothing.** Clearing a
646
+ label's text gave a label reading `lbl_0`; the same applied to a button and to
647
+ the two selectors.
648
+
649
+ It was deliberate once. In the first implementation a newly drawn element had
650
+ no text at all, so without the fallback it was an invisible rectangle. Every
651
+ type has carried a real default since 1.1.0 — "Information:", "Click here!" —
652
+ which means the fallback could only fire when somebody had *deliberately*
653
+ cleared the text, and that is the one moment it is certainly not what they
654
+ meant. A blank status line that fills in later is an ordinary thing to want.
655
+
656
+ **The editor still shows the tag** on an element with no text, and that is not
657
+ an oversight: there you are working on the elements themselves, and one with
658
+ nothing in it still has to be findable and clickable on the canvas. The editor
659
+ labels what you are editing; the interface shows what you wrote.
660
+
661
+ Nothing changes about what a new element says.
662
+
663
+ ## [1.3.1] — 2026-09-09
664
+
665
+ Repository only. Nothing here changes the installed package, so 1.3.0 on PyPI is
666
+ not defective and needs no replacement.
667
+
668
+ ### Fixed
669
+
670
+ - **CI had been red on Linux since 1.2.0, and 1.3.0 was published anyway.**
671
+
672
+ The failure was in a test, not in iterlab: it typed a filename by generating
673
+ key events with the raw character as the keysym, and X11 wants keysym *names*
674
+ — `.` is `period` there. Windows Tk accepts the character, so the local suite
675
+ passed on Windows every time while the Linux job failed. Characters now map to
676
+ the names Tk knows on every platform.
677
+
678
+ This is the second defect of exactly this shape. The first was `size_nw_se`,
679
+ a cursor name Windows accepts and X11 does not, which CI also caught and which
680
+ is guarded by a test asserting every cursor name is valid on the running
681
+ platform. There is now a matching test for keysyms, next to it.
682
+
683
+ The 1.2.0 run failed for an unrelated reason — `apt-get update` could not
684
+ fetch its indexes on the runner. Infrastructure, not code, but it meant the
685
+ first red run was easy to wave away, and the next two were not looked at.
686
+
687
+ ### Added
688
+
689
+ - **`tools/preflight.py`**, which asks every question that must be answered
690
+ before publishing: clean tree, commit pushed, **CI green for this exact
691
+ commit**, artifacts present and matching the declared version with no stale
692
+ ones beside them, `twine check`, README links resolving anonymously, and a
693
+ recorded Gate 2 pass. Non-zero exit means do not upload.
694
+
695
+ The constitution already said this gate is "absolute rather than advisory".
696
+ It was advisory in practice because nothing enforced it — the local suite was
697
+ green each time, and nobody opened the run that tests the platform the
698
+ developer is not using. A check that depends on someone remembering to look is
699
+ not a gate.
700
+
701
+ Gate 2 is warned about rather than enforced: only a person can perform it, so
702
+ a tool can ask whether it happened but cannot honestly refuse on its behalf.
703
+
704
+ ## [1.3.0] — 2026-09-09
705
+
706
+ ### Changed
707
+
708
+ - **Text and number boxes fire on a committed value, not on every keystroke.**
709
+ Enter always runs the handler; leaving the box runs it only if the value
710
+ actually changed, so clicking past a box on the way somewhere else does
711
+ nothing. The generated stub is now `on_changed_<tag>`.
712
+
713
+ Per keystroke redraws once for `1`, again for `10`, again for `100` — two of
714
+ those plots are of a number nobody meant, and each one costs whatever the
715
+ researcher's handler costs.
716
+
717
+ **This was already decided, and I missed it.** The spec has carried a note
718
+ since before boxes existed: a text box "commits its value on Enter or on
719
+ leaving the field, never on every keystroke ... recorded here so the
720
+ convention is not re-litigated when text boxes are built". 1.2.0 re-litigated
721
+ it by accident, because nobody re-read the note when the element was finally
722
+ built. The note now records that too — a written-down decision only helps if
723
+ it is consulted at the moment the thing it describes gets made.
724
+
725
+ ### Added
726
+
727
+ - **A `changed` interaction**, joining click, hover, move and key. Universal in
728
+ the same sense as the others: any element may have a handler written for it,
729
+ and one whose value never changes simply never fires — indistinguishable from
730
+ an element nobody wrote a handler for. It exists because "the researcher
731
+ finished entering a value" is not the same question as "a key went down", and
732
+ cannot be built out of `key` without every researcher reimplementing the same
733
+ debounce. FR-017a is amended accordingly.
734
+
735
+ Renaming an element carries its `on_changed_` handler, like every other.
736
+
737
+ - `on_key_<tag>` is untouched and still fires per keystroke for anyone who wants
738
+ it, so nothing written against 1.2.0 stops working.
739
+
740
+ ## [1.2.0] — 2026-09-09
741
+
742
+ *Reached GitHub but not PyPI; superseded by 1.3.0.*
743
+
744
+ ### Added
745
+
746
+ - **Text and number boxes now generate an `on_key_<tag>` handler**, firing on
747
+ every keystroke, and the generated one prints what was typed — `.text` for a
748
+ text box, `.value` for a number box.
749
+
750
+ This reverses the call made in 1.1.0, where boxes got no stub on the reasoning
751
+ that a box is read when something *else* happens. That covers one use and
752
+ misses the better one: a plot that follows a value as it is typed, with no
753
+ button to press. A researcher who wants the click-then-read pattern deletes
754
+ the handler; one who wants live updating would otherwise have had to know that
755
+ `on_key_<tag>` exists at all.
756
+
757
+ A half-typed number is safe to read: `""`, `"-"` and `"0."` all report `0`
758
+ rather than raising, so a handler firing mid-keystroke cannot fault the
759
+ session.
760
+
761
+ - **The generated file is runnable.** Every new `demo.py` ends with:
762
+
763
+ ```python
764
+ if __name__ == "__main__":
765
+ import iterlab
766
+
767
+ iterlab.run(__file__)
768
+ ```
769
+
770
+ so an IDE's run button opens the interface, with no terminal and nothing to
771
+ remember. It passes `__file__` rather than a name, so it works from any
772
+ working directory and survives renaming the pair. It cannot loop: iterlab
773
+ executes the researcher's module under a name of its own, so `__name__` is
774
+ only `"__main__"` for the copy they launched — proven by a test that loads the
775
+ file the way the loader does.
776
+
777
+ Interfaces created before this do not get it retrofitted. iterlab adds
778
+ handlers to a researcher's file and nothing else, and that rule is worth more
779
+ than the convenience.
780
+
781
+ ### Fixed
782
+
783
+ - **A typed property could still be silently discarded**, and 1.1.1's fix for
784
+ that is what made it reachable.
785
+
786
+ Rebuilding the properties panel destroys its fields, and Tk fires `<FocusOut>`
787
+ at a focused widget as it goes. That event is *queued*: it arrives after the
788
+ rebuild has finished and the panel's busy flag is clear, so the handler
789
+ commits into whichever element is now selected. 1.1.1 added commit points on
790
+ selection and on canvas press, which multiplied the rebuilds and turned a
791
+ latent race into one that fired often. The old fields are now unbound before
792
+ they are destroyed, so a stale event has nothing to run.
793
+
794
+ Found by a test that failed roughly one run in five and could not be
795
+ reproduced by running its own file — it needed another file to have run first.
796
+ Confirmed as mine by running the same loop against 1.1.0 in a worktree: twenty
797
+ clean runs there, three failures in fifteen on the current tree.
798
+
799
+ ### Changed
800
+
801
+ - **New handler stubs are inserted above the `if __name__` block** rather than
802
+ appended after it. That block reads as the end of the file, and appending
803
+ below it would push it further from the bottom with every element drawn. The
804
+ guard is matched structurally, so `'__main__'`, extra spaces or a reversed
805
+ comparison all count; only a *trailing* guard qualifies, since one mid-file is
806
+ not a launcher and inserting above it would drop a stub into the middle of the
807
+ researcher's code. Any comment directly above it travels with it. A file
808
+ without a guard is appended to exactly as before.
809
+
810
+ ## [1.1.1] — 2026-09-09
811
+
812
+ ### Fixed
813
+
814
+ - **A typed property was lost unless focus went to another property field.**
815
+ Editing a value and then clicking an element, the canvas, or a palette card
816
+ silently discarded it. Tabbing to the next field worked, which is what made it
817
+ look intermittent rather than broken.
818
+
819
+ `<FocusOut>` cannot carry this on its own. Tk fires it when another *widget*
820
+ takes keyboard focus, and most of what a researcher clicks next does not take
821
+ it — a Canvas, an element drawn on it and a palette card are all unfocusable.
822
+ Even when focus does move, Tk delivers the event on the next pass through the
823
+ event loop, by which time the panel has been rebuilt for the new selection and
824
+ the entry holding the edit no longer exists. The canvas already called
825
+ `focus_set()` first thing on a press, which looked like it should have covered
826
+ this and could not.
827
+
828
+ Committing is now explicit and synchronous on the events where focus really
829
+ leaves: a press on the canvas, a palette choice, opening the **More** drawer.
830
+
831
+ - **The reported extension filter was this same bug.** Typing `pdf` into
832
+ **Types** and clicking away never saved it, so the chooser had nothing to
833
+ filter by and offered everything. It works once the value is committed.
834
+
835
+ - **An editor change to `extensions` lost to a value set from code.** Found
836
+ while checking the above. Session state is deliberately preserved across a
837
+ mode switch, and an explicit edit in the editor is supposed to beat it — the
838
+ rule already covered `label` and `style`, and `extensions` was simply missed
839
+ when it was added a version ago.
840
+
841
+ ### Notes
842
+
843
+ - The first attempt at the commit fix also committed inside `select`, which is
844
+ the refresh path that a drag, a resize and an apply all end on. That wrote the
845
+ panel's now-stale position back over the change that had just happened, and a
846
+ dragged element snapped home — 15 tests caught it, and the suite time went from
847
+ 63s to 161s from the churn. There is now a test for that specific regression,
848
+ and one asserting that clicking about without typing does not rewrite the
849
+ layout file at all.
850
+
851
+ ## [1.1.0] — 2026-09-09
852
+
853
+ *Reached GitHub but not PyPI; published as part of 1.1.1.*
854
+
855
+ ### Added
856
+
857
+ - **Two new element types: `file_select` and `folder_select`.** Each is a button
858
+ that opens the operating system's own chooser — the one a researcher already
859
+ knows, with their places and network drives in it.
860
+
861
+ The first of each takes the bare tag, `fileselect` and `folderselect`, with no
862
+ `_0`: an interface almost always has exactly one, and a number on the only one
863
+ of something is noise that then appears in every handler mentioning it. A
864
+ second becomes `fileselect_1`.
865
+
866
+ `.path` is the choice. It is `""` before anything is picked **and** when what
867
+ was picked has since been deleted or moved — a path that no longer resolves is
868
+ worse than none, because `if ev.fileselect.path:` would pass and the open
869
+ would fail on something that looks perfectly valid. The chooser still reopens
870
+ where the file used to be, since a renamed file is usually still beside it.
871
+
872
+ The handler fires **after** a choice, so `.path` is set when researcher code
873
+ runs. Cancelling does nothing at all: no handler, no change.
874
+
875
+ The caption stays "Select a File"; showing the selection is one line in the
876
+ researcher's handler, and the generated stub shows it. How the interface looks
877
+ stays theirs to decide.
878
+
879
+ - **`extensions` on the file selector**, in the editor as **Types** and in code
880
+ as `ev.fileselect.extensions`. Comma-separated, forgiving about `.TXT`,
881
+ `*.csv` and stray spaces, blank meaning every file. "All files" is always
882
+ offered alongside, because a filter nobody can escape is a trap the moment one
883
+ file was saved with the wrong suffix.
884
+
885
+ - **Selections persist across a hard reset and across the process.** Stored in
886
+ the user's own state directory keyed by the interface's path, never in the
887
+ layout file: `demo.yaml` describes the interface, and writing a runtime choice
888
+ into it would make it a log of what happened and a spurious diff in everyone's
889
+ repository. The project folder stays the two files it has always been. The
890
+ accepted cost is that moving or copying a project starts fresh, which behaves
891
+ exactly like a first run.
892
+
893
+ Nothing there can raise on the researcher's account: a missing file, unreadable
894
+ JSON, a read-only profile all mean "nothing remembered", which is a state every
895
+ caller already handles because it is what a first run looks like.
896
+
897
+ - `ui/dialogs.py`, one seam for the only modal dialogs iterlab opens. The test
898
+ suite's ban on `tkinter.filedialog` stays exactly as it was, so a path that
899
+ reaches a real chooser without being replaced fails loudly instead of hanging.
900
+ It also normalises Tk's mix of `""`, `()` and `None` for a cancelled dialog
901
+ into one shape.
902
+
903
+ - `Event.path`, carrying what was just chosen.
904
+
905
+ ### Changed
906
+
907
+ - **Layout schema 4 → 5**, no-op migration. Nothing in an existing file changes;
908
+ the version moves so a version-4 build refuses a file containing a type it has
909
+ never heard of rather than reporting it as a defect in the layout.
910
+
911
+ ## [1.0.0] — 2026-09-08
912
+
913
+ **First public release.** `pip install iterlab`.
914
+
915
+ Numbered 1.0.0 rather than continuing the 0.x line because this is the first
916
+ version anyone else can install: a 0.21 would read as accumulated churn, where
917
+ what it actually marks is the point the tool became available.
918
+
919
+ Everything in the entries below shipped in this one release. They were written
920
+ as the work happened and are kept as the development record; nothing before this
921
+ had ever been published.
922
+
923
+ ### What this version commits to
924
+
925
+ 1.0.0 is a promise under semantic versioning, so the following are the public
926
+ surface and will not change without a major bump:
927
+
928
+ - the `on_<interaction>_<tag>` handler naming convention, and `ev` as the first
929
+ argument to every handler
930
+ - `ev.<tag>` reaching an element, and `.text` on every element that shows text
931
+ - an axes element being a real `matplotlib.axes.Axes`
932
+ - the `iterlab <name>` command and `iterlab.run(name)`
933
+ - the layout schema, which carries its own version and migrates forward
934
+
935
+ The layout schema is versioned separately and independently: a file written by
936
+ an older build is migrated on open, and one written by a newer build is refused
937
+ rather than half-understood.
938
+
939
+ ### Changed
940
+
941
+ - **Ordinary semantic versioning resumes.** Below 1.0.0 the constitution
942
+ suspended the MINOR/PATCH distinction and bumped MINOR on *every* change, so
943
+ that the version answered "is the thing in front of me the thing I just
944
+ changed?" during hand testing. From here PATCH means a fix, MINOR means an
945
+ addition, MAJOR means a break — which is what a version has to mean once other
946
+ people depend on it.
947
+ - `Development Status` classifier moves from `3 - Alpha` to `4 - Beta`. Claiming
948
+ 1.0.0 while advertising alpha would contradict itself. The README's "early,
949
+ and honest about it" stands: this is a first public release, not a mature one.
950
+
951
+ ## [0.21.1] — not published
952
+
953
+ Renumbered to 1.0.0 before publishing.
954
+
955
+ Everything in the entries below shipped in this one release; they were written as
956
+ the work happened and are kept as the development record. Nothing before this had
957
+ ever been published.
958
+
959
+ ### Fixed
960
+
961
+ - **The README logo was a broken image.** The repository is private, and
962
+ `raw.githubusercontent.com` returns 404 for a private repository without a
963
+ token — so the image failed for every viewer, including on GitHub. The file
964
+ was present and pushed the whole time; the URL simply could not be fetched.
965
+
966
+ This is invisible to whoever owns the repository if they only ever check while
967
+ signed in, and it is the same failure the README's `GUIDE.md`, `LICENSE` and
968
+ `NOTICE` links have. All four resolve once the repository is public, which is
969
+ also what the PyPI page needs, since PyPI renders the README anonymously.
970
+
971
+ ### Added
972
+
973
+ - `tools/check_readme_links.py`, which fetches every external README link with
974
+ no credentials at all — the way a stranger's browser does. It reports 4 of 4
975
+ dead against a private repository and should report all clear before
976
+ publishing. A broken logo on the page people arrive at first is not worth
977
+ discovering after an upload that cannot be undone.
978
+
979
+ ## [0.21.0] — 2026-09-08
980
+
981
+ *Published to PyPI, then superseded fourteen minutes later by 1.0.0.
982
+ It is the earliest version installable from PyPI; 1.0.0 is the one to use.*
983
+
984
+ Everything in the entries below shipped in this one release; they were written
985
+ as the work happened and are kept as the development record. Their "unreleased"
986
+ labels are accurate for what they were at the time — nothing before this had
987
+ ever been published.
988
+
989
+ ### Changed
990
+
991
+ - Install instructions in `README.md` and `GUIDE.md` now say `pip install
992
+ iterlab`, since that is true from this release onward. The guide keeps the
993
+ source install for anyone who wants to change iterlab itself.
994
+ - `README.md` links and the logo are absolute URLs. PyPI renders this README on
995
+ its own page, where a repository-relative path resolves to nothing — the logo
996
+ would have been a broken image and every link a 404, visible to everyone
997
+ arriving at the project for the first time.
998
+ - Added `Documentation`, `Repository`, `Changelog` and `Issues` project URLs, a
999
+ 3.13 classifier, and operating-system and environment classifiers.
1000
+
1001
+ ## [0.20.2] — unreleased
1002
+
1003
+ ### Documentation
1004
+
1005
+ - **The logo now heads `README.md` and `GUIDE.md`**, from `docs/logo.png`.
1006
+
1007
+ - **Both documents brought back in line with the code.** Everything below was
1008
+ wrong, not merely dated:
1009
+
1010
+ - `README.md` said `pip install iterlab`. It is not on PyPI, and the guide
1011
+ said so two paragraphs later in a different file. Now both give the
1012
+ repository install.
1013
+ - `README.md` claimed "two element types" with "text boxes, labels ... next".
1014
+ There are five, and text boxes and labels are two of them.
1015
+ - `GUIDE.md` told the reader to draw `ax_0` and `cmd_0` and then showed an
1016
+ example using `ev.spectrum` and `on_clicked_run_fit` — tags it had never
1017
+ asked anyone to create. The worked example now uses the tags it just named,
1018
+ and says renaming is available.
1019
+ - Two leftovers from a careless find-and-replace: "use **Restart reset**" and
1020
+ "press **Restart app**", for a button now called **Hard reset**.
1021
+ - "Buttons and labels carry these" under Styling, written before boxes
1022
+ existed and never revisited.
1023
+ - Stubs were described as generated for "buttons and plot areas", with
1024
+ "plot areas" long since renamed and boxes never mentioned.
1025
+ - The styling note said code-set style is lost when you "close and reopen".
1026
+ True, but it now survives a mode switch, which is the case a researcher
1027
+ actually meets.
1028
+
1029
+ - Every code example in the guide was executed against this build — startup,
1030
+ the click handler, all eleven style properties, `.text` on each type, and
1031
+ `.value` on a number box — rather than read over. No fault was raised by any
1032
+ of them.
1033
+
1034
+ ## [0.20.1] — unreleased
1035
+
1036
+ ### Fixed
1037
+
1038
+ - **A mode switch reset every element to its layout value.** Text typed into a
1039
+ box, and a caption, colour or enabled-state set from code, all reverted on the
1040
+ way back from the editor. Reported as "gui objects get reset when going to
1041
+ editor".
1042
+
1043
+ The session introduced in 0.12.0 kept `ev` and the contents of each plot, but
1044
+ not the widgets' own state — and a switch destroys every widget and builds new
1045
+ ones from the layout file, so anything the *running* interface had done was
1046
+ lost. The layout is where an element starts, not where it currently is.
1047
+
1048
+ Each handle can now report its presentation and have it restored; the session
1049
+ holds it across the switch. Programmatic style was reverting too, which was
1050
+ not in the report but is the same defect.
1051
+
1052
+ **An edit in the editor still wins.** The remembered value is recorded
1053
+ alongside the layout value it was based on, so if the researcher has since
1054
+ changed the caption or the colour themselves, the remembered one is dropped —
1055
+ editing a button's caption and having the old one come straight back would be
1056
+ its own bug report. Position is not presentation, so moving an element does
1057
+ not discard what it was showing.
1058
+
1059
+ A **hard reset** still clears everything, which is the difference between
1060
+ restarting and toggling.
1061
+
1062
+ 14 tests; 10 of them fail against the unfixed code.
1063
+
1064
+ ## [0.20.0] — unreleased
1065
+
1066
+ ### Added
1067
+
1068
+ - **Two new element types: `text_box` and `number_box`.** A text box holds a
1069
+ line someone types; a number box refuses anything that is not a number.
1070
+
1071
+ The number box validates the *proposed* contents on each keystroke rather than
1072
+ correcting afterwards, so a rejected character never appears at all — no
1073
+ flicker, and the box is never momentarily holding something that is not a
1074
+ number. It deliberately accepts the half-written states a person passes
1075
+ through: `""`, `"-"`, `"."` and `"-."` are all on the way to a number, and
1076
+ refusing them would make a negative or a decimal impossible to type.
1077
+
1078
+ `.value` gives the number — `int` when it is a whole one, so
1079
+ `range(ev.val_0.value)` works without casting — and an empty box reads as `0`
1080
+ rather than raising, since someone who cleared it to retype is mid-edit, not
1081
+ mistaken. `.text` gives the same thing as a string.
1082
+
1083
+ Neither gets a generated stub, for the reason a label does not: a box is
1084
+ normally read when something *else* happens rather than reacted to keystroke
1085
+ by keystroke. Every interaction remains available to a hand-written handler.
1086
+
1087
+ - **`.text` on every element that shows text**, whatever kind it is. A button
1088
+ and a label keep their string in Tk's `-text` option and a box keeps it in a
1089
+ variable; `.text` hides that, so `ev.<tag>.text` works without first
1090
+ remembering what `<tag>` is.
1091
+
1092
+ ### Changed
1093
+
1094
+ - **Default tags are now short and typed**: `cmd_0` for a button, `lbl_0` for a
1095
+ label, `edt_0` for a text box, `val_0` for a number box (`ax_0` unchanged).
1096
+ These are the shorthands a person would use themselves, so `ev.cmd_0` reads
1097
+ the way the code around it already does.
1098
+
1099
+ - **New elements come with working text**: a button says "Click here!" and a
1100
+ label says "Information:", rather than repeating their own tag. A button
1101
+ reading `cmd_0` is a placeholder the researcher has to fix before showing
1102
+ anyone; one reading "Click here!" is a control. The default button is slightly
1103
+ wider to fit its caption — a default that clips its own text is worse than one
1104
+ that is a little roomy.
1105
+
1106
+ - **Layout schema 3 → 4.** Nothing in an existing file changes and the migration
1107
+ is a no-op, but the version has to move: a file written now may contain a type
1108
+ a version-3 build has never heard of, and the version gate is what makes that
1109
+ build refuse the file cleanly rather than report an unknown element type as a
1110
+ defect in the researcher's layout.
1111
+
1112
+ ## [0.19.1] — unreleased
1113
+
1114
+ ### Fixed
1115
+
1116
+ - **The window icon did not appear.** Tk offers two mechanisms — `iconbitmap`
1117
+ with an `.ico` and `iconphoto` with a `PhotoImage` — and 0.18.0 applied both
1118
+ "for coverage". They do not layer: applied together to one window the title
1119
+ bar shows a blank grey square, which is worse than either alone and worse than
1120
+ doing nothing. Each works perfectly on its own.
1121
+
1122
+ Exactly one is applied now, chosen by platform: `iconbitmap` on Windows, so
1123
+ each size gets the frame drawn for it and the title bar shows the 16 px
1124
+ artwork rather than Tk squeezing down the 256; `iconphoto` elsewhere, which is
1125
+ what X11 and macOS honour. The other is tried only when the first *fails*, as
1126
+ a fallback rather than a supplement.
1127
+
1128
+ The test that existed asserted `apply()` returned True — which it happily did
1129
+ while producing an empty box. It is the same shape of defect as every wiring
1130
+ bug in this project: the mechanism was tested and the outcome was not. The
1131
+ test now counts which Tk calls are actually made and fails if both are, and
1132
+ Gate 2 gained an item to look at the title bar, since only a person can tell a
1133
+ drawn icon from a blank one.
1134
+
1135
+ ## [0.19.0] — unreleased
1136
+
1137
+ ### Changed
1138
+
1139
+ - **The icon is redrawn from a supplied logo**: a waveform ringed by two arcs
1140
+ chasing each other. The wave is the researcher's data, the ring is the loop
1141
+ they work inside, which is a better statement of the tool than the previous
1142
+ drawing managed.
1143
+
1144
+ Two things carry it. The ring takes an **angular** gradient whose colour run
1145
+ is mapped onto each arc's own sweep, so a tail is fully dark and an arrow head
1146
+ fully bright — spread over a half-turn instead, both ends land mid-blue and
1147
+ the heads lose their punch. The wave takes a **linear** gradient, because it
1148
+ travels where the ring turns.
1149
+
1150
+ The detail thresholds moved after looking at the frames magnified rather than
1151
+ guessing: at 64 px the dotted arcs had already collapsed into a grey fuzz that
1152
+ made the whole mark look dirty, so the full drawing now starts at 128.
1153
+
1154
+ **The 16 and 24 px frames invert** — a white wave on solid brand blue. A dark
1155
+ line on a near-white tile has almost no ink left to work with at that size and
1156
+ goes faint in a taskbar, where the light tile's own edge is lost too. It
1157
+ trades a little consistency between sizes for a mark that can be seen, and
1158
+ nobody views the 16 and the 256 side by side.
1159
+
1160
+ ## [0.18.0] — unreleased
1161
+
1162
+ ### Added
1163
+
1164
+ - **An application icon**, replacing Tk's default feather — which tells a
1165
+ researcher nothing and makes the window look like a stray interpreter in a
1166
+ taskbar full of real applications.
1167
+
1168
+ A plot with a loop: the rising curve is every plotting library's icon, and the
1169
+ circular arrow is what makes it this one, since iterating inside the interface
1170
+ rather than re-running a script is the whole product.
1171
+
1172
+ - `tools/make_icon.py`, which *is* the icon — checked in as the source rather
1173
+ than a binary somebody would have to open an image editor to change.
1174
+
1175
+ It draws at 8x and downsamples, and brushes strokes as overlapping discs
1176
+ rather than using `draw.line`, which leaves notches exactly where this curve
1177
+ turns. The `.ico` carries **three detail levels across seven sizes**: below
1178
+ 48 px the axes are dropped and the brush fattens, and at 16 px only the curve
1179
+ survives. An icon is not one drawing scaled — the thin marks close into mud —
1180
+ and a test asserts the 16 px frame is not merely the 256 resampled.
1181
+
1182
+ Applied through both `iconphoto` (portable, honoured by X11 and macOS) and
1183
+ `iconbitmap` (what Windows uses for the title bar and taskbar, and crisper
1184
+ there). Neither can raise: an icon is decoration, and decoration must not be
1185
+ able to end a session. The `PhotoImage` is held for the life of the process,
1186
+ since Tk silently reverts to the feather when one is collected.
1187
+
1188
+ ## [0.17.0] — unreleased
1189
+
1190
+ ### Added
1191
+
1192
+ - **Hover text on the top-bar buttons.** Two of them differ only in how much
1193
+ they throw away, and a two-word label cannot carry that. `Tooltip` is drawn as
1194
+ a borderless toplevel that never takes focus.
1195
+ - **A "Screenshot" button**, writing a PNG beside the interface's own files as
1196
+ `demo-<date>-<time>.png`. It captures the **content area only** — the top bar
1197
+ is iterlab's furniture and has no business in a figure someone pastes into a
1198
+ report. No file dialog: a modal blocks the test suite outright, the same
1199
+ reason element creation does not ask for a name. Pillow already ships with
1200
+ matplotlib, so this adds no dependency. A machine that cannot grab the screen
1201
+ (headless Linux) reports it through the fault banner rather than taking the
1202
+ window down.
1203
+ - **A "More" drawer in the properties panel.** Only the tag, and the text for a
1204
+ button or label, are shown by default; position, size, colour, font and state
1205
+ are behind it. The set is declared per element type in
1206
+ `schema.BASIC_PROPERTIES`, so a future slider declares its range and starting
1207
+ position the same way a button declares its caption.
1208
+
1209
+ The advanced widgets are *built* either way and only packed or not, so
1210
+ committing an edit never depends on which fields the researcher happened to
1211
+ reveal. The drawer stays open across selections — someone adjusting colours
1212
+ across several elements should not have to reopen it each time.
1213
+
1214
+ ### Changed
1215
+
1216
+ - **"Restart app" is now "Hard reset"**, in the top bar and in the startup
1217
+ notice.
1218
+ - **Positions and sizes are rounded to two decimals on construction**, not only
1219
+ when saved. Hundredths of the window is finer than anyone can place by hand or
1220
+ see, and finer than that turns the layout file into digits whose diffs mean
1221
+ nothing. Rounding at construction means what is in memory is what is on disk,
1222
+ so a value never changes under a researcher between drawing it and reopening
1223
+ it.
1224
+
1225
+ Validation still runs first, so a genuinely invalid rectangle is rejected
1226
+ rather than quietly rounded into an acceptable one. Only rounding's own
1227
+ artefacts are corrected: a sliver that would round away to nothing becomes the
1228
+ smallest real element, and an edge rounded past the window is given its
1229
+ position back rather than being shrunk.
1230
+
1231
+ `DEFAULT_SIZE["button"]` moves from `0.035` to `0.04` high, since a default
1232
+ ought to be expressible on the grid it will be snapped to.
1233
+
1234
+ ## [0.16.0] — unreleased
1235
+
1236
+ ### Fixed
1237
+
1238
+ - **An edited `on_startup` was often not noticed at all.** Reported as "nothing
1239
+ happens", and there were two independent reasons, either of which was enough
1240
+ on its own:
1241
+
1242
+ 1. The check hung off the dispatcher's after-invoke hook, which fires only
1243
+ when a handler actually ran. Clicking an element you have not written code
1244
+ for — normal, and silent by design — never looked at the file. So the
1245
+ notice appeared only if you happened to click something that already had a
1246
+ handler.
1247
+ 2. Nothing checked without an interaction at all. Saving the file and looking
1248
+ at the window did nothing, which is exactly when a researcher expects
1249
+ something to happen.
1250
+
1251
+ The check now runs before *every* interaction whatever it goes on to do, and
1252
+ a 700 ms poll notices a save on its own. It reads the file rather than the
1253
+ loaded module — deliberately, since reloading on a timer would re-run
1254
+ module-level code uninvited, and since the module is only reloaded when an
1255
+ interaction reaches a handler that exists.
1256
+
1257
+ ### Added
1258
+
1259
+ - **A "Re-run startup" button in the top bar**, as requested. Enabled only when
1260
+ startup has actually been edited, so the button is its own indicator: save the
1261
+ file, look up, and it has come alive. It runs the new startup over the session
1262
+ already in memory, so the data survives.
1263
+
1264
+ ### Changed
1265
+
1266
+ - The notice's second action is now **Restart app**, the same restart the top
1267
+ bar offers, rather than a separate session-only restart. One restart concept
1268
+ in the interface rather than two whose difference is invisible.
1269
+ - `ModuleLoader.generation`, added in 0.13.0, is gone. The staleness check is
1270
+ keyed to the file's own (mtime, size) instead, which is what let it work
1271
+ without loading anything — and an API with one caller that no longer needs it
1272
+ is better deleted than kept.
1273
+
1274
+ ## [0.15.0] — unreleased
1275
+
1276
+ ### Changed
1277
+
1278
+ - **`ev.<tag>` for a plot is now a real matplotlib `Axes`**, not an object that
1279
+ forwards to one. `AxesHandle` subclasses `Axes` and is registered as a
1280
+ matplotlib projection, which is the supported way to have a figure build a
1281
+ particular Axes subclass.
1282
+
1283
+ The difference is invisible for `ev.ax_0.plot(...)`, which worked either way,
1284
+ and decisive everywhere else. `isinstance(ev.ax_0, Axes)` is now true, so any
1285
+ library that takes an `ax=` argument accepts it, and matplotlib's own
1286
+ machinery does too. A forwarding wrapper fails all of that — and fails it
1287
+ inside whatever library the researcher passed it to, a long way from anything
1288
+ iterlab wrote.
1289
+
1290
+ - **The element type `plot_area` is renamed `axes`**, and new ones are tagged
1291
+ `ax_0`, `ax_1`, … rather than `plot_0`. `ax` is what the variable is called in
1292
+ everyone's matplotlib code, so `ev.ax_0` reads the way a researcher's own code
1293
+ already does. What the layout calls the thing is now what the thing is.
1294
+
1295
+ - **Layout schema 2 → 3**, with a migration that rewrites `type: plot_area` to
1296
+ `type: axes`. Tags, positions and styles are untouched, so an interface drawn
1297
+ before this keeps working and keeps its names.
1298
+
1299
+ ### Notes
1300
+
1301
+ - Everything iterlab adds to the Axes subclass is prefixed `_iterlab_`, except
1302
+ the deliberate public surface (`tag`, `visible`, `canvas`, `widget`,
1303
+ `element`, `disconnect`). A test asserts that nothing added shadows a
1304
+ matplotlib attribute, so a future matplotlib release cannot quietly collide
1305
+ with us.
1306
+ - `visible` keeps its element-level meaning — is this on screen — uniform with
1307
+ buttons and labels, and hides the toolbar with it. matplotlib's own
1308
+ `set_visible` is left alone and still does matplotlib's thing.
1309
+
1310
+ ## [0.14.0] — unreleased
1311
+
1312
+ ### Added
1313
+
1314
+ - **A "Restart app" button in the top bar**, beside the mode toggle. A cold
1315
+ restart: the layout is re-read from disk, the researcher's module is dropped
1316
+ from the import cache, and a new session begins. It is the answer to anything
1317
+ a warm reload deliberately does not cover — an edited helper module, a
1318
+ hand-edited layout file, or simply wanting a clean slate.
1319
+
1320
+ It stays in the mode it was pressed in. Restarting is not a request to be
1321
+ moved to a different screen, and the window is not resized either: that would
1322
+ rearrange the researcher's desktop, which is not what was asked for.
1323
+
1324
+ Replaces the narrower "Restart session" button in the top bar. That behaviour
1325
+ still exists and is still offered by the startup notice, where re-running
1326
+ startup over a live session is the point; as a top-bar control, one button
1327
+ with one meaning beats two whose difference is invisible until it bites.
1328
+
1329
+ ### Fixed
1330
+
1331
+ - A layout file edited by hand into something unparsable took the window down on
1332
+ restart, which is precisely what Principle III forbids. The last good layout
1333
+ is kept, the interface carries on, and the error is reported through the
1334
+ banner rather than swallowed. Found by a test written to check something else,
1335
+ which crashed instead of failing.
1336
+
1337
+ ## [0.13.0] — unreleased
1338
+
1339
+ ### Added
1340
+
1341
+ - **An edited `on_startup` is now noticed and offered back.** Every other
1342
+ handler takes effect on the next click because the next click runs it;
1343
+ startup already ran, so editing it did nothing at all and nothing said so.
1344
+ Nothing raises, so no fault appeared — the code simply never ran, which is
1345
+ the most expensive silence this tool can produce.
1346
+
1347
+ A strip now appears offering **Re-run startup** (keeps `ev` and everything on
1348
+ it) and **Restart session** (discards it). Both are offered rather than one
1349
+ chosen, because whether re-running is safe depends on the researcher's code:
1350
+ `ev.x = load(...)` rebinds and is safe, `ev.log.append(...)` is not. Dismissing
1351
+ hides the strip without marking the edit accepted, so a further edit raises it
1352
+ again — ignoring one edit must not make the next one silent.
1353
+
1354
+ - `runtime/startupcheck.py`. What counts as "startup changed" is narrower than
1355
+ "the file changed" — otherwise every handler edit would cry wolf — and wider
1356
+ than "the text of `on_startup` changed", because startup's behaviour lives
1357
+ partly in the module-level helpers it calls. The fingerprint covers
1358
+ `on_startup` plus every module-level function transitively reachable from it,
1359
+ compared as parsed structure so reformatting and comments cost nothing. A
1360
+ file mid-edit that will not parse fingerprints as `None` and raises no alarm.
1361
+
1362
+ - `ModuleLoader.generation`, so a caller can ask "has this reloaded since I last
1363
+ looked?" without re-reading the file. The staleness check is therefore
1364
+ proportional to edits, not to clicks.
1365
+
1366
+ ### Notes
1367
+
1368
+ - **New imports already worked** and needed no change: the loader executes the
1369
+ module fresh rather than calling `importlib.reload`, so an `import` line added
1370
+ to a live file runs on the next reload. Verified rather than assumed.
1371
+ - **Imported modules are assumed not to change during a session.** If `demo.py`
1372
+ does `import fitting` and `fitting.py` is then edited, the change is not
1373
+ picked up: `fitting` is already in `sys.modules`, so the import statement
1374
+ binds the cached module. This is a deliberate scope boundary, not an
1375
+ oversight - cascading reloads through a module graph brings the stale-instance
1376
+ problem with it (objects already built keep their old class), and the cost of
1377
+ getting that subtly wrong is higher than the cost of restarting. **Restart
1378
+ app** covers it when it matters.
1379
+
1380
+ ## [0.12.0] — unreleased
1381
+
1382
+ ### Changed
1383
+
1384
+ - **A session now survives a mode switch.** It belongs to the interface, not to
1385
+ GUI mode. Toggling into the editor to nudge a button and back no longer
1386
+ discards `ev`, no longer blanks a plot, and no longer re-runs `on_startup`.
1387
+
1388
+ This reverses FR-015d, which said a switch ends the session. That behaviour
1389
+ did not remove the cost of reloading data so much as move it: from "every
1390
+ code edit", which the reload loop already solved, to "every layout edit",
1391
+ which is the other half of the same loop. A researcher with a slow load was
1392
+ still paying it, just for a different reason.
1393
+
1394
+ ### Added
1395
+
1396
+ - **A "Restart session" control** beside the mode toggle. Because toggling now
1397
+ preserves everything deliberately, there has to be one explicit way to say
1398
+ start over — and it is how a change to `on_startup` takes effect. Chrome
1399
+ under FR-015c, and disabled in editor mode, where there is no live session to
1400
+ discard (FR-015e).
1401
+ - `Session`, owning what outlives a mode: `ev`, one matplotlib `Figure` per plot
1402
+ area, and whether startup has run. A `Figure` can be attached to a new canvas,
1403
+ which is what makes a drawn plot survive at all.
1404
+ - `Session.reconcile` and `Session.retag`, so state belonging to an element
1405
+ deleted in the editor is dropped and state belonging to a renamed one follows
1406
+ the new tag (FR-015f).
1407
+
1408
+ ### Fixed
1409
+
1410
+ - A figure's callback registry is shared with **every canvas it is ever attached
1411
+ to**. Reusing the figure across a switch therefore left the dead canvas's
1412
+ connections live, so a single click fired the handler once per switch ever
1413
+ made — three toggles, four handler calls. `PlotHandle.disconnect()` releases
1414
+ them on teardown. Found by prototyping before designing, and now covered by a
1415
+ test that fails with `assert 4 == 1` without the fix.
1416
+
1417
+ ### Tests
1418
+
1419
+ - Three tests driving real matplotlib events through the canvas: a drawn curve
1420
+ survives a switch, a click fires exactly once after three switches, and a
1421
+ renamed plot keeps its curve. Each was confirmed to fail against the
1422
+ unfixed code.
1423
+
1424
+ ## [0.11.1] — unreleased
1425
+
1426
+ ### Fixed
1427
+
1428
+ - A UI test asserted real OS focus, which the window manager can withhold and
1429
+ which other tests disturb by mapping and unmapping the shared Tk root. It
1430
+ passed alone and failed in the full suite. Now asks Tk which widget is last
1431
+ focused *for that toplevel*, which is the same question without depending on
1432
+ the desktop.
1433
+
1434
+ ## [0.11.0] — unreleased
1435
+
1436
+ ### Added
1437
+
1438
+ - **`GUIDE.md`** — a user guide: install, first interface, the handler and `ev`
1439
+ model, every element type with its code API, the full styling table, tagging,
1440
+ deleting, and the known limits. It will grow as element types are added.
1441
+
1442
+ ### Fixed
1443
+
1444
+ - A plot area's `visible` could be set but not read. `PlotHandle` delegates
1445
+ unknown attributes to its matplotlib `Axes`, which knows nothing about
1446
+ `visible`, so reading it raised `AttributeError` while writing it worked. Any
1447
+ style property a handle can set is now also readable — found while checking
1448
+ the guide's claims rather than by writing them down and hoping.
1449
+
1450
+ ## [0.10.0] — unreleased
1451
+
1452
+ ### Fixed
1453
+
1454
+ - Clicking, hovering or typing on a **plot area** raised `NameError: name
1455
+ 'name' is not defined`. The v0.8.0 tag rename missed the closure inside
1456
+ `build_plot_area`, which still referred to `name` and still passed
1457
+ `element=` to an `Event` whose field had become `tag`. Plot areas were the
1458
+ only element type affected.
1459
+
1460
+ ### Added
1461
+
1462
+ - `tests/ui/test_plot_events.py` drives matplotlib's own callback machinery —
1463
+ the closures in `build_plot_area` — rather than calling the dispatcher
1464
+ directly. Every other plot test went straight to the dispatcher, so the
1465
+ closures were never executed and a NameError in them survived a 291-test
1466
+ suite. Seven of the eight new tests fail against the bug.
1467
+
1468
+ ## [0.9.0] — unreleased
1469
+
1470
+ ### Added
1471
+
1472
+ - **Style properties on buttons and labels**: fill colour, text colour, border
1473
+ colour and width, font family, font size, bold, italic, alignment, enabled
1474
+ and visible. A plot area takes only `visible` — matplotlib owns the rest of
1475
+ how it looks, and offering a fill colour that did nothing would be a lie.
1476
+ - **Every style property is settable from code**, and doing so changes the live
1477
+ widget without ever writing back to the layout file. The layout holds the
1478
+ *starting* appearance; research code overrides it for the session:
1479
+
1480
+ ev.title.background = "#ffe0e0"
1481
+ ev.title.font_size = 20
1482
+ ev.run_fit.enabled = False
1483
+
1484
+ - Editors for all of it in the properties panel: hex fields with a swatch that
1485
+ opens the system colour picker, a font dropdown listing only families
1486
+ actually installed, and checkboxes and radio buttons for the rest.
1487
+ - The editor canvas now previews an element's real colours, font and weight, so
1488
+ a styling choice can be judged without toggling to GUI mode.
1489
+
1490
+ ### Changed
1491
+
1492
+ - **Layout schema version 2.** The `style` block is new, and an older build
1493
+ would reject it as an unrecognized key, so the version had to move — and with
1494
+ it comes the first real migration (FR-036c said to write one when it was
1495
+ actually needed rather than in advance). A version 1 layout opens unchanged,
1496
+ is migrated in memory, and is only rewritten when something is saved.
1497
+ - Only non-default style values are written, so an unstyled element is still a
1498
+ three-line entry.
1499
+
1500
+ ## [0.8.0] — unreleased
1501
+
1502
+ ### Changed
1503
+
1504
+ - An element's unique identifier is now called its **tag**, everywhere. It was
1505
+ "name", which collided with the interface's own name and with the handler
1506
+ *function* names it appears in. The legacy 2024 spike called it a tag too.
1507
+
1508
+ Researcher-facing: `event.element` becomes `event.tag`; the properties panel
1509
+ field is "Tag". Unchanged: `ev.<tag>`, `on_clicked_<tag>` and the layout file
1510
+ format — the tag has always been the mapping key there, so **no existing
1511
+ layout or research code needs editing**.
1512
+
1513
+ Internally `Element.name` becomes `Element.tag`, `Layout.names()` becomes
1514
+ `Layout.tags()`, `Layout.rename()` becomes `Layout.retag()`, and
1515
+ `validate_name` becomes `validate_tag`. Deliberately *not* renamed:
1516
+ `Interface.name`, which is the interface's own name, and `handler_name`,
1517
+ which really is a function's name.
1518
+
1519
+ ## [0.7.0] — unreleased
1520
+
1521
+ ### Fixed
1522
+
1523
+ - Resize cursors did nothing on Linux. `size_nw_se` and `size_ne_sw` are Tk's
1524
+ Windows-only names; X11 has no such cursors, so every diagonal handle showed
1525
+ no pointer change at all. The guard in `_set_cursor` caught the error and
1526
+ said nothing. Replaced with X11 corner names, which all three platforms
1527
+ accept — and which give each corner its own cursor rather than sharing one
1528
+ across a diagonal. Found by CI on Linux.
1529
+
1530
+ ### Added
1531
+
1532
+ - `tools/verify.py` builds a throwaway interface for the manual verification
1533
+ pass: a plot, a label and two buttons, with research code that loads slowly,
1534
+ plots, and fails on demand. It removes the setup from Gate 2, which was the
1535
+ real reason the pass had never been done.
1536
+ - A test asserting every cursor name is valid on the running platform. Tk
1537
+ silently ignores an unknown one, so nothing else would report it.
1538
+
1539
+ ## [0.6.0] — unreleased
1540
+
1541
+ ### Added
1542
+
1543
+ - A **label** element: text placed in the layout and set from code with
1544
+ `ev.status.text = "..."`. It is the first type with **no generated handler** —
1545
+ a label displays text rather than being clicked, and a stub for every one
1546
+ would leave a pile of dead functions in the researcher's file. Every
1547
+ interaction is still available if the handler is written by hand (FR-017a);
1548
+ only the automatic stub is withheld.
1549
+
1550
+ ### Changed
1551
+
1552
+ - The editor opens at 1080x760 rather than the interface's own size. That size
1553
+ describes the *interface*, and is advisory; editor mode adds a sidebar the
1554
+ interface knows nothing about. Switching to the editor grows a window that is
1555
+ too small but never shrinks one — a size chosen deliberately stays.
1556
+ - The default button is smaller: roughly 134x38 px on a maximised 1920x1080
1557
+ window, down from 230x65, which read as unusually large.
1558
+ - Palette entries are single compact rows of icon and name, about 33 px each,
1559
+ rather than cards with descriptions. The vocabulary is going to grow, and a
1560
+ card tall enough for a description does not survive a dozen types in a
1561
+ sidebar.
1562
+ - The text field in the properties panel now serves any text-bearing type, not
1563
+ just buttons. `label` holds a button's caption and a label's text — the same
1564
+ idea, so it stays one schema field rather than two.
1565
+
1566
+ ## [0.5.0] — unreleased
1567
+
1568
+ ### Added
1569
+
1570
+ - Generated starter files import numpy as np. No research happens without it.
1571
+ - A delete control in the properties panel, pinned to the bottom of the sidebar
1572
+ so a destructive action is never the thing pushed off the screen. The
1573
+ element's handler stays in the code file, as it always has.
1574
+ - The editor sidebar scrolls when its contents are taller than the window.
1575
+
1576
+ ### Changed
1577
+
1578
+ - The editor has a modern look: the `clam` ttk theme restyled with a flat
1579
+ palette, the element types shown as icon cards rather than radio buttons, and
1580
+ the geometry fields laid out as a 2x2 grid instead of four stacked rows.
1581
+ Icons are drawn as vectors rather than loaded from image files or set as text
1582
+ glyphs — no assets to ship, and no bet on the platform font having a
1583
+ character.
1584
+ - Property edits commit on Enter or when the field loses focus. The Apply
1585
+ button is gone: a value typed and tabbed away from is a value you meant.
1586
+ - Removed the dashed "mode toggle" hint from the canvas. The toggle lives in
1587
+ its own chrome bar above the layout, so nothing is ever underneath it and the
1588
+ hint was misleading.
1589
+
1590
+ ### Fixed
1591
+
1592
+ - The sidebar's contents disappeared at small window sizes. Tk stops *mapping*
1593
+ children that no longer fit rather than clipping them, so the geometry fields
1594
+ were absent rather than scrolled out of view — with no error, no scrollbar,
1595
+ and the only symptom being that typing into them did nothing. At the 800x450
1596
+ default this affected every position field.
1597
+
1598
+ ## [0.4.0] — unreleased
1599
+
1600
+ ### Fixed
1601
+
1602
+ - A button responded only to the left mouse button. Middle and right clicks did
1603
+ not reach the handler at all — Tk's `command` option fires for button 1 only,
1604
+ and nothing else was bound. The event also reported `"left"` unconditionally,
1605
+ since the value was hardcoded rather than read from the click. All three
1606
+ buttons now fire the handler and `event.button` says which one.
1607
+ - Removed `_bind_tk_events`, which was written but never called.
1608
+
1609
+ ### Changed
1610
+
1611
+ - The generated stub for a plot area now prints which mouse button was used
1612
+ alongside the coordinates, and its comment lists the possible values. The
1613
+ button was always available on the event; nothing advertised it.
1614
+
1615
+ ## [0.3.0] — unreleased
1616
+
1617
+ ### Changed
1618
+
1619
+ - Placing an element no longer opens a modal asking for its name. The element
1620
+ is created with its default name, selected, and the properties panel's name
1621
+ field is focused with the text selected — so accepting the default needs no
1622
+ typing and replacing it needs no extra click. This still satisfies FR-005a,
1623
+ and it removes a dialog that stopped the researcher on every placement.
1624
+
1625
+ ### Fixed
1626
+
1627
+ - The test suite could stop and wait for a human. One code path opened a modal
1628
+ that no test stubbed, which made the suite unrunnable unattended and so
1629
+ disqualified it as a release gate (Principle VII, Gate 1). The dialog is
1630
+ gone, and `tests/conftest.py` now makes any modal — dialog, message box or
1631
+ file chooser — raise instead of block, so a future one fails loudly rather
1632
+ than appearing to hang.
1633
+
1634
+ ## [0.2.0] — unreleased
1635
+
1636
+ Everything found by the first hands-on session with the application. Each of the
1637
+ four defects below was a component that was fully implemented and never
1638
+ connected to anything, and each was invisible to the automated suite because the
1639
+ tests exercised the mechanism directly rather than going through the assembled
1640
+ app.
1641
+
1642
+ ### Fixed
1643
+
1644
+ - The mode toggle did nothing. `ModeToggle` was written but never instantiated,
1645
+ so the chrome frame held no control at all.
1646
+ - `ev.some_plot.plot(...)` drew nothing after the first interaction. An embedded
1647
+ figure gets no automatic repaint — pyplot installs that hook and pyplot has no
1648
+ place here, since `plt.show()` would start a second event loop against Tk's.
1649
+ Handlers now repaint whatever they drew.
1650
+ - A launch-time fault in startup was reported twice, because the deferred-startup
1651
+ hook re-entered itself.
1652
+ - Adding an element to a `.py` written with CRLF line endings rewrote every line
1653
+ in the file.
1654
+
1655
+ ### Added
1656
+
1657
+ - Drag an element to move it; drag an edge to resize one dimension or a corner
1658
+ to resize both. Pointer feedback says what a press will do before you commit.
1659
+ - Click empty canvas to place an element at a sensible default size for its
1660
+ type, centred on the click. Escape deselects, since clicking now creates.
1661
+ - `iterlab.run(name)` — the library entry point that contracts/commands.md and
1662
+ the README had documented while `__init__.py` was empty.
1663
+ - The version has a single source of truth in `__init__.py`, which
1664
+ `pyproject.toml` reads.
1665
+
1666
+ ## [0.1.0] — unreleased
1667
+
1668
+ The initial implementation of feature 001. Never published; superseded by 0.2.0
1669
+ before it left the working tree.
1670
+
1671
+ ### Added
1672
+
1673
+ - `iterlab <name>` opens an interface. One command; editing and using it are two
1674
+ modes of one program, switched with the toggle in the top-left corner.
1675
+ - **Editor mode**: a canvas, a palette of element types, and a properties panel.
1676
+ Draw by dragging; every property is editable, including the name.
1677
+ - **GUI mode**: the interface as drawn, with handlers wired and the standard
1678
+ matplotlib navigation toolbar on every plot area.
1679
+ - Two element types: plot areas and buttons.
1680
+ - Handlers bind by naming convention (`on_<interaction>_<element>`), with the
1681
+ universal interaction set click / hover / motion / key. Every handler is
1682
+ optional; exactly one stub is generated per element.
1683
+ - Code changes take effect on the next interaction with no restart, and nothing
1684
+ in the session is discarded — loaded data, computed results and drawn plots
1685
+ all survive.
1686
+ - A fault in researcher code never ends the session. It is reported to stderr
1687
+ in full and signalled in the window, and the report clears when corrected code
1688
+ runs. An element with no handler is silent, which is a different thing.
1689
+ - Renaming an element rewrites its handlers and nothing else in the file.
1690
+ - Layout files record `schema_version: 1`. A layout written by a newer iterlab
1691
+ is reported and left untouched rather than partially understood.
1692
+
1693
+ ### Known limits
1694
+
1695
+ - A mode switch ends the session; switching back runs startup again. Applying
1696
+ layout edits to a live session is the aim, not a promise.
1697
+ - Changing `on_startup` takes effect by starting a fresh session — toggling out
1698
+ and back is enough.
1699
+ - Handlers run to completion while the interface waits. Long computations block
1700
+ the window.
1701
+ - Reloading a module re-executes its top level, so data loaded at module level
1702
+ rather than in `on_startup` will reload on every edit. The generated starter
1703
+ file says so.