cc-continuity 0.3.34__tar.gz → 0.3.35__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.
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/PKG-INFO +1 -1
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/README.md +1 -1
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/__init__.py +1 -1
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/transcript.py +22 -7
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity.egg-info/PKG-INFO +1 -1
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/pyproject.toml +1 -1
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_transcript.py +20 -15
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/LICENSE +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/__main__.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/atomic.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/blink.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/blink_watch.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/bootstrap.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/checkpoint.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/cli.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/config.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/daemon_supervisor.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/doctor.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/gitsnap.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/hooks/__init__.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/hooks/common.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/hooks/pre_compact.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/hooks/pre_tool_use.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/hooks/session_end.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/hooks/session_start.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/hooks/stop.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/hooks/task.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/hooks/tool_use.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/hooks/user_prompt.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/hosting.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/install.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/launch.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/ledger.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/lock.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/managed.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/naming.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/notify.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/paths.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/power_plug.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/progress_pane.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/project.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/redact.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/rotator.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/settings_merge.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/skills.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/state.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/statusline.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/thresholds.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/validate.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/watchdog.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/watchdog_digest.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity/watchdogd.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity.egg-info/SOURCES.txt +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity.egg-info/dependency_links.txt +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity.egg-info/entry_points.txt +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/cc_continuity.egg-info/top_level.txt +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/setup.cfg +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_atomic.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_blink.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_blink_watch.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_bootstrap.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_checkpoint.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_cli.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_cli_ledger.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_config.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_daemon_supervisor.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_doctor.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_gitsnap.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_hooks_common.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_hooks_pre_compact.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_hooks_pre_tool_use.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_hooks_session_end.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_hooks_session_start.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_hooks_stop.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_hooks_task.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_hooks_tool_use.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_hooks_user_prompt.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_hosting.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_hygiene.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_install.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_integration_phase5.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_integration_phase6.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_integration_phase7.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_launch.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_ledger.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_lock.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_managed.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_naming.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_notify.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_notify_integration.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_paths.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_power_plug.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_progress_pane.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_project.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_redact.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_rotator.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_settings_merge.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_skills.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_state.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_status.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_statusline.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_thresholds.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_tmux_host.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_transcript_finalize.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_uninstall.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_validate.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_watchdog.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_watchdog_digest.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_watchdog_integration.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_watchdogd.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_wsl_doctor.py +0 -0
- {cc_continuity-0.3.34 → cc_continuity-0.3.35}/tests/test_wsl_install.py +0 -0
|
@@ -26,10 +26,10 @@ The five most recent updates, newest first. Each line links to its
|
|
|
26
26
|
commit, so you can see what changed lately without digging through the
|
|
27
27
|
log:
|
|
28
28
|
|
|
29
|
+
- **2026-11-14**: The dark icon chip now speaks: clicking it opens a small note that says why the image is missing (removed from disk, over the 4 MB embed cap, or an unsupported format), never an image - the note branch clears any previous gallery selection and hides the image row while it is up. The chip stays the same dark pulsing icon, and numbered thumbnails still open at the clicked index ([commit](https://github.com/pqant/claude-continuity/commit/614ddf8)).
|
|
29
30
|
- **2026-11-14**: The dark icon chip (the trace a pruned image leaves behind) is finally static: clicking it no longer popped the lightbox open with a stale image from an earlier gallery on the page, because the click handler un-hid the overlay before it noticed the chip carries no gallery. The chip is now a plain span (no button semantics, no gallery data) and the lightbox handler bails out for gallery-less chips, while numbered thumbnails still open at the exact clicked index ([commit](https://github.com/pqant/claude-continuity/commit/a1cf55e)).
|
|
30
31
|
- **2026-11-14**: The `image` text chip in the transcript export is no more: every embeddable image renders inline as a small thumbnail with a numbered badge (1, 2, 3, ...), and all thumbnails pulse in sync through a tiny JS timer, so a turn containing screenshots announces itself at a glance. An image that could not be embedded shows a solid dark photo icon instead of the old emoji-plus-word trace, and clicking a thumbnail opens the lightbox at that very image ([commit](https://github.com/pqant/claude-continuity/commit/722749a)).
|
|
31
32
|
- **2026-11-14**: Tab-completion for the whole command tree: `cc-continuity completion zsh|bash` prints a completion script generated from the very argparse tree the CLI builds, so a subcommand added upstream shows up on the next Tab for free. Install it with one eval line in `~/.zshrc`: `eval "$(cc-continuity completion zsh)"`; unsupported shells exit 1 with a clear stderr line instead of a half-script ([commit](https://github.com/pqant/claude-continuity/commit/2d7ddfe)).
|
|
32
|
-
- **2026-11-12**: `cc-continuity configure --show` prints the effective config as the code sees it: one sorted `key value` line per setting, defaults filled in where the file omits them, the installer stamp block left out of the noise, and `--json` for scripts. No config file is no longer a dead end: the defaults-only view prints with a one-line note instead of failing, and the command never writes anything ([commit](https://github.com/pqant/claude-continuity/commit/2ae1243)).
|
|
33
33
|
- **2026-11-12**: A `cc-continuity signal needs-human` fired while the session idles now lights up the animated pane too: in progress mode 1 the animator owns the blink but only consulted the rendered status-line text, the reply flag and the pane capture, never `ledger.blocked_reason`, so the push reached the phone while the tab stayed dark. The animator's ~1 s blink poll now reads the ledger and paints the blocked chip with a reason-carrying gate key, mirroring the reply-flag pattern ([commit](https://github.com/pqant/claude-continuity/commit/055c824)).
|
|
34
34
|
|
|
35
35
|
## How it works
|
|
@@ -351,6 +351,7 @@ mark{background:var(--mark);color:inherit;border-radius:2px;padding:0 1px}
|
|
|
351
351
|
.lbn button,.lbx{background:#222b;border:1px solid #555;color:#fff;border-radius:6px;padding:4px 12px;font-size:15px;cursor:pointer}
|
|
352
352
|
.lbn span{color:#fff;font-size:14px}
|
|
353
353
|
.lbx{position:fixed;top:14px;right:18px}
|
|
354
|
+
#lbnote{color:#fff;font-size:15px;max-width:60ch;text-align:center;background:#222b;border:1px solid #555;border-radius:8px;padding:14px 18px;margin:0}
|
|
354
355
|
"""
|
|
355
356
|
|
|
356
357
|
#: In-page search (case-insensitive ``<mark>`` hits, optional block filter
|
|
@@ -411,9 +412,16 @@ sel.onchange=function(){if(this.value)location.href=up+this.value;};})();
|
|
|
411
412
|
|
|
412
413
|
#: Lightbox shell for the image chips (issue #55): one fixed overlay,
|
|
413
414
|
#: reused by every chip button. Injected only when images are embedded.
|
|
415
|
+
#: Why an image chip has no embeddable image (issue #66): shown by the
|
|
416
|
+
#: lightbox overlay when the dark icon chip is clicked. One fixed English
|
|
417
|
+
#: string; the icon chip carries it in data-note. ASCII only.
|
|
418
|
+
_IMG_NOTE = ("This image could not be embedded in the export. Its source "
|
|
419
|
+
"file may have been removed from disk, exceeded the 4 MB "
|
|
420
|
+
"embed cap, or uses an unsupported format.")
|
|
414
421
|
_LIGHTBOX = ('<div id="lb" class="lb" hidden>'
|
|
415
422
|
'<button id="lbx" class="lbx">close</button>'
|
|
416
423
|
'<div class="lbb"><img id="lbi" alt="">'
|
|
424
|
+
'<p id="lbnote" hidden></p>'
|
|
417
425
|
'<div class="lbn"><button id="lbp">‹ prev</button>'
|
|
418
426
|
'<span id="lbc"></span>'
|
|
419
427
|
'<button id="lbn">next ›</button></div></div></div>')
|
|
@@ -424,16 +432,22 @@ _LIGHTBOX = ('<div id="lb" class="lb" hidden>'
|
|
|
424
432
|
_LIGHTBOX_JS = r"""
|
|
425
433
|
(function(){var lb=document.getElementById('lb');if(!lb)return;
|
|
426
434
|
var img=document.getElementById('lbi'),ctr=document.getElementById('lbc'),g=null,n=0;
|
|
427
|
-
|
|
435
|
+
var note=document.getElementById('lbnote'),row=document.querySelector('.lbn');
|
|
436
|
+
function hide(){lb.hidden=true;g=null;if(note)note.hidden=true;img.hidden=false;if(row)row.hidden=false;}
|
|
428
437
|
function show(){if(!g)return;var a=g.querySelectorAll('img');if(!a.length){hide();return;}
|
|
429
438
|
n=(n+a.length)%a.length;img.src=a[n].getAttribute('src');
|
|
430
439
|
ctr.textContent=(n+1)+' / '+a.length;}
|
|
431
440
|
document.addEventListener('click',function(e){var t=e.target;
|
|
432
441
|
var b=t.closest?t.closest('.chipbtn'):null;
|
|
433
|
-
if(b){var gid=b.getAttribute('data-g');
|
|
434
|
-
g=document.getElementById(gid);if(!g)return;
|
|
442
|
+
if(b){var gid=b.getAttribute('data-g');
|
|
443
|
+
if(gid){g=document.getElementById(gid);if(!g)return;
|
|
435
444
|
n=parseInt(b.getAttribute('data-i')||'0',10)||0;
|
|
445
|
+
if(note)note.hidden=true;img.hidden=false;if(row)row.hidden=false;
|
|
436
446
|
lb.hidden=false;show();return;}
|
|
447
|
+
var nt=b.getAttribute('data-note');if(nt){g=null;img.hidden=true;
|
|
448
|
+
if(note){note.textContent=nt;note.hidden=false;}
|
|
449
|
+
if(row)row.hidden=true;lb.hidden=false;return;}
|
|
450
|
+
return;}
|
|
437
451
|
if(t.id==='lbp'){n--;show();return;}
|
|
438
452
|
if(t.id==='lbn'){n++;show();return;}
|
|
439
453
|
if(t.id==='lbx'||t===lb){hide();}});
|
|
@@ -711,8 +725,9 @@ def render_html(blocks: list[Block], meta: dict) -> str:
|
|
|
711
725
|
# Issue #64: a pruned image's trace is a dark icon chip,
|
|
712
726
|
# never the emoji+"image" wording.
|
|
713
727
|
has_chips = True
|
|
714
|
-
body = (f'<
|
|
715
|
-
f'{
|
|
728
|
+
body = (f'<button class="chipbtn imgicon" '
|
|
729
|
+
f'data-note="{html.escape(_IMG_NOTE)}" '
|
|
730
|
+
f'aria-label="image could not be embedded">{_IMG_ICON}</button>')
|
|
716
731
|
else:
|
|
717
732
|
body = md_to_html(text)
|
|
718
733
|
sections.append(
|
|
@@ -740,9 +755,9 @@ def render_html(blocks: list[Block], meta: dict) -> str:
|
|
|
740
755
|
'<button id="t">theme</button><span id="stats"></span></div></div></header>\n'
|
|
741
756
|
f'<main>{"".join(sections)}</main>\n'
|
|
742
757
|
f'{"".join(galleries)}'
|
|
743
|
-
f'{_LIGHTBOX if galleries else ""}'
|
|
758
|
+
f'{_LIGHTBOX if galleries or has_chips else ""}'
|
|
744
759
|
f'{ext}<script>{_JS}{switch_js}'
|
|
745
|
-
f'{_LIGHTBOX_JS if galleries else ""}'
|
|
760
|
+
f'{_LIGHTBOX_JS if galleries or has_chips else ""}'
|
|
746
761
|
f'{_CHIP_PULSE_JS if has_chips else ""}</script></body>')
|
|
747
762
|
|
|
748
763
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cc-continuity"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.35"
|
|
8
8
|
description = "Zero-touch session rotation for Claude Code (local large-context model)"
|
|
9
9
|
requires-python = ">=3.11"
|
|
10
10
|
dependencies = [] # stdlib only at runtime (PRD §0.5)
|
|
@@ -139,13 +139,15 @@ def test_render_html_chip_clickable_with_images():
|
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
def test_render_html_plain_chip_is_dark_icon_without_text():
|
|
142
|
-
# Issue #64: the trace of a pruned image is a dark icon
|
|
143
|
-
#
|
|
142
|
+
# Issue #64: the trace of a pruned image is a dark icon chip, never the
|
|
143
|
+
# old "🖼 image" wording. Issue #66: clicking it explains itself, so the
|
|
144
|
+
# overlay is injected even on a gallery-free page.
|
|
144
145
|
d = transcript.render_html([("user", "🖼 image", None)], META)
|
|
145
146
|
assert "chipbtn" in d
|
|
146
147
|
assert "🖼" not in d and "🖼 image" not in d
|
|
147
148
|
assert "<svg" in d
|
|
148
|
-
assert 'id="lb"'
|
|
149
|
+
assert 'id="lb"' in d
|
|
150
|
+
assert "data-note=" in d
|
|
149
151
|
|
|
150
152
|
|
|
151
153
|
def test_render_html_folded_run_one_thumbnail_per_image():
|
|
@@ -168,27 +170,30 @@ def test_render_html_embed_chip_is_a_thumbnail():
|
|
|
168
170
|
assert '<img class="chipimg" src="data:image/png;base64,QUJD"' in d
|
|
169
171
|
|
|
170
172
|
|
|
171
|
-
def
|
|
172
|
-
# Issue #
|
|
173
|
-
# has an embedded gallery
|
|
174
|
-
#
|
|
173
|
+
def test_render_html_plain_icon_chip_opens_note():
|
|
174
|
+
# Issue #66: the icon chip is clickable again, but it carries a reason,
|
|
175
|
+
# never a gallery. On a page that also has an embedded gallery it must
|
|
176
|
+
# not hold data-g/data-i (that is the #65 stale-image trap).
|
|
175
177
|
b = [("user", "🖼 image", None, ("data:image/png;base64,QUJD",)),
|
|
176
178
|
("assistant", "🖼 image", None)]
|
|
177
179
|
d = transcript.render_html(b, META)
|
|
178
180
|
assert 'id="lb"' in d # page has a lightbox (the tempting stale source)
|
|
179
|
-
assert '<
|
|
180
|
-
|
|
181
|
-
frag = d[d.index('<span class="chipbtn imgicon"'):]
|
|
181
|
+
assert '<button class="chipbtn imgicon"' in d
|
|
182
|
+
frag = d[d.index('<button class="chipbtn imgicon"'):]
|
|
182
183
|
frag = frag[:frag.index(">")]
|
|
184
|
+
assert "data-note=" in frag
|
|
183
185
|
assert "data-g" not in frag and "data-i" not in frag
|
|
186
|
+
assert 'data-note="This image could not be embedded' in d
|
|
184
187
|
|
|
185
188
|
|
|
186
|
-
def
|
|
187
|
-
# Issue #
|
|
188
|
-
#
|
|
189
|
-
#
|
|
189
|
+
def test_lightbox_js_note_branch():
|
|
190
|
+
# Issue #66: the click handler branches on data-note when data-g is
|
|
191
|
+
# absent; the note branch must clear the stale gallery reference and
|
|
192
|
+
# hide the image element before showing the overlay. The #65 guard for
|
|
193
|
+
# broken gallery references stays.
|
|
190
194
|
js = transcript._LIGHTBOX_JS
|
|
191
|
-
assert "
|
|
195
|
+
assert "b.getAttribute('data-note')" in js
|
|
196
|
+
assert "g=null;img.hidden=true" in js
|
|
192
197
|
assert "getElementById(gid);if(!g)return" in js
|
|
193
198
|
|
|
194
199
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|