transcript-viewer 0.7.1__tar.gz → 0.7.2__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 (33) hide show
  1. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/PKG-INFO +1 -1
  2. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/pyproject.toml +1 -1
  3. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/src/transcript_viewer/page.html +10 -5
  4. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_style.py +31 -0
  5. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/uv.lock +1 -1
  6. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/.coverage +0 -0
  7. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/.github/workflows/publish.yml +0 -0
  8. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/.github/workflows/test.yml +0 -0
  9. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/.gitignore +0 -0
  10. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/README.md +0 -0
  11. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/src/transcript_viewer/__init__.py +0 -0
  12. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/src/transcript_viewer/ai.py +0 -0
  13. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/src/transcript_viewer/cli.py +0 -0
  14. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/src/transcript_viewer/config.py +0 -0
  15. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/src/transcript_viewer/corpus.py +0 -0
  16. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/src/transcript_viewer/fetch.py +0 -0
  17. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/src/transcript_viewer/library.py +0 -0
  18. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/src/transcript_viewer/store.py +0 -0
  19. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/src/transcript_viewer/viewer.py +0 -0
  20. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/fixtures/big-command.json +0 -0
  21. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/page.test.js +0 -0
  22. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_ai.py +0 -0
  23. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_cli.py +0 -0
  24. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_config.py +0 -0
  25. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_corpus.py +0 -0
  26. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_fetch.py +0 -0
  27. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_library.py +0 -0
  28. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_page.py +0 -0
  29. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_readme.py +0 -0
  30. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_store.py +0 -0
  31. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_stream.py +0 -0
  32. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_tidiness.py +0 -0
  33. {transcript_viewer-0.7.1 → transcript_viewer-0.7.2}/tests/test_viewer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: transcript-viewer
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: Browse agent transcripts in a local, dependency-free web viewer.
5
5
  License: MIT
6
6
  Requires-Python: >=3.12
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "transcript-viewer"
3
- version = "0.7.1"
3
+ version = "0.7.2"
4
4
  description = "Browse agent transcripts in a local, dependency-free web viewer."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -412,14 +412,19 @@ pre{background:var(--sunk);border-radius:7px;padding:10px;overflow:auto;font-siz
412
412
  /* JSON syntax colours */
413
413
  .j-key{color:var(--j-key)}
414
414
  /* A command reads as a command: one gutter mark, then the script as written. */
415
+ /* Wrapped rather than scrolled: a command is read, and a line that runs off the
416
+ side is a line nobody reads.
417
+
418
+ No hanging indent. A negative text-indent pulls the *first* line out of the
419
+ content box to the left, and `pre` carries overflow:auto, so the box scrolled
420
+ itself sideways to chase it — which hid the first word of every command and
421
+ left the prompt mark stranded mid-block. Wrapped lines simply align with the
422
+ rest; which lines the shell sees as separate is legible from the text. */
415
423
  .sh{background:var(--bg);border-radius:7px;padding:10px 12px 10px 26px;margin:0;
416
424
  position:relative;font:12px/1.6 var(--font-mono);color:var(--ink);
417
- /* Wrapped rather than scrolled: a command is read, and a line that runs off
418
- the side is a line nobody reads. A continued line is indented so it stays
419
- obvious which lines the shell would actually see as separate. */
420
- white-space:pre-wrap;overflow-wrap:anywhere;text-indent:-1.4em;padding-left:calc(26px + 1.4em)}
425
+ white-space:pre-wrap;overflow-wrap:anywhere;overflow-x:hidden}
421
426
  .sh::before{content:"$";position:absolute;left:11px;top:10px;color:var(--faint);
422
- user-select:none;text-indent:0}
427
+ user-select:none}
423
428
  .sh-cmd{color:var(--sh-cmd)}
424
429
  .sh-str{color:var(--sh-str)}
425
430
  .sh-flag{color:var(--sh-flag)}
@@ -147,3 +147,34 @@ def test_the_session_count_is_said_in_one_place():
147
147
  assert script.count('count.textContent=') <= 2, (
148
148
  "the session count is being written in more than one place again"
149
149
  )
150
+
151
+
152
+ def _rule(selector: str) -> str:
153
+ """The declarations of one rule, as written."""
154
+ start = STYLE.index(selector + "{")
155
+ return STYLE[start + len(selector) + 1 : STYLE.index("}", start)]
156
+
157
+
158
+ def test_a_command_block_keeps_its_first_line_inside_itself():
159
+ """A negative text-indent pulls the first line out of the box.
160
+
161
+ `pre` carries overflow:auto, so the box then scrolls sideways to chase it:
162
+ the first word of every command disappeared and the prompt mark was left
163
+ stranded mid-block. Both symptoms, one declaration.
164
+ """
165
+ rule = _rule(".sh")
166
+ assert "text-indent:-" not in rule.replace(" ", ""), (
167
+ "a negative text-indent on .sh hides the start of the command"
168
+ )
169
+
170
+
171
+ def test_a_command_wraps_rather_than_scrolling():
172
+ rule = _rule(".sh").replace(" ", "").replace("\n", "")
173
+ assert "white-space:pre-wrap" in rule, "a command that runs off the side is not read"
174
+ assert "overflow-x:auto" not in rule, "it should wrap, not scroll"
175
+
176
+
177
+ def test_the_prompt_mark_stays_at_the_top_left():
178
+ rule = _rule(".sh::before").replace(" ", "").replace("\n", "")
179
+ assert "position:absolute" in rule
180
+ assert "left:11px" in rule and "top:10px" in rule
@@ -388,7 +388,7 @@ wheels = [
388
388
 
389
389
  [[package]]
390
390
  name = "transcript-viewer"
391
- version = "0.7.1"
391
+ version = "0.7.2"
392
392
  source = { editable = "." }
393
393
  dependencies = [
394
394
  { name = "atif-make" },