personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(link): hide pair/unpair modals when [hidden] is set

.link-modal unconditionally set `display: flex`, overriding the UA
stylesheet's `display: none` for the HTML `hidden` attribute. Both
modals rendered visible on page load and stayed visible after Cancel.
Add `.link-modal[hidden] { display: none; }`, mirroring the canonical
`.talent-view-modal[hidden]` idiom in convey/static/app.css. Regression
test asserts both rendered modals carry the `hidden` attribute and the
stylesheet carries the override rule.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+74
apps/link/tests/__init__.py

This is a binary file and will not be displayed.

+49
apps/link/tests/conftest.py
··· 1 + # SPDX-License-Identifier: AGPL-3.0-only 2 + # Copyright (c) 2026 sol pbc 3 + 4 + """Self-contained fixtures for link app tests.""" 5 + 6 + from __future__ import annotations 7 + 8 + import json 9 + 10 + import pytest 11 + 12 + 13 + @pytest.fixture 14 + def link_env(tmp_path, monkeypatch): 15 + """Create a temporary journal for link app testing.""" 16 + 17 + def _create(): 18 + journal = tmp_path / "journal" 19 + journal.mkdir(exist_ok=True) 20 + 21 + config_dir = journal / "config" 22 + config_dir.mkdir(parents=True, exist_ok=True) 23 + config_file = config_dir / "journal.json" 24 + config_file.write_text( 25 + json.dumps( 26 + { 27 + "convey": {"trust_localhost": True}, 28 + "setup": {"completed_at": 1700000000000}, 29 + }, 30 + indent=2, 31 + ) 32 + ) 33 + 34 + monkeypatch.setenv("SOLSTONE_JOURNAL", str(journal)) 35 + 36 + from convey import create_app 37 + 38 + app = create_app(journal=str(journal)) 39 + client = app.test_client() 40 + 41 + class Env: 42 + def __init__(self): 43 + self.journal = journal 44 + self.client = client 45 + self.app = app 46 + 47 + return Env() 48 + 49 + return _create
+21
apps/link/tests/test_workspace_modals.py
··· 1 + # SPDX-License-Identifier: AGPL-3.0-only 2 + # Copyright (c) 2026 sol pbc 3 + 4 + """Regression tests for link workspace modal visibility.""" 5 + 6 + from __future__ import annotations 7 + 8 + import re 9 + 10 + 11 + def test_workspace_modals_are_hidden_by_attribute_and_css(link_env): 12 + env = link_env() 13 + response = env.client.get("/app/link/") 14 + 15 + assert response.status_code == 200 16 + body = response.get_data(as_text=True) 17 + assert 'id="link-pair-modal"' in body 18 + assert re.search(r'<div id="link-pair-modal"[^>]{0,200}\bhidden\b', body) 19 + assert 'id="link-unpair-modal"' in body 20 + assert re.search(r'<div id="link-unpair-modal"[^>]{0,200}\bhidden\b', body) 21 + assert ".link-modal[hidden]" in body
+4
apps/link/workspace.html
··· 91 91 .link-unpair-btn { background: transparent; border: 1px solid #c44; color: #c44; border-radius: 4px; padding: 0.35em 0.7em; cursor: pointer; font-size: 0.85em; } 92 92 .link-unpair-btn:hover { background: #c44; color: #fff; } 93 93 94 + .link-modal[hidden] { 95 + display: none; 96 + } 97 + 94 98 .link-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 1000; } 95 99 .link-modal-box { background: #fff; border-radius: 10px; padding: 1.5em; max-width: 480px; width: 92%; box-shadow: 0 10px 40px rgba(0,0,0,0.2); } 96 100 .link-modal-box h3 { margin-top: 0; margin-bottom: 1em; }