tui2: add full in-app palette command reference

This commit is contained in:
thePR0M3TH3AN committed 2026-03-02 09:20:04 -05:00
1 parent 949d87dd4f
commit 3f0d4a8d89
6 files changed
+107 -23

No files matched your search

+2
View File
@@ -504,6 +504,7 @@ async def test_tui2_matrix_actions_palette_events_and_guards() -> None:
app._run_palette_command("page")
app._run_palette_command("page abc")
app._run_palette_command("page 0")
app._run_palette_command("help-commands now")
app._run_palette_command("link-filter")
app._run_palette_command("link-add")
app._run_palette_command("link-add no")
@@ -577,6 +578,7 @@ async def test_tui2_matrix_actions_palette_events_and_guards() -> None:
await pilot.pause()
app._run_palette_command("help")
app._run_palette_command("help-commands")
app._run_palette_command("search Doc")
app._run_palette_command("filter document")
app._run_palette_command("archive-filter all")
@@ -738,6 +738,26 @@ async def test_tui2_textual_link_commands_and_neighbor_open() -> None:
assert "No graph links" in links_text
@pytest.mark.anyio
async def test_tui2_textual_palette_help_commands_reference() -> None:
service = FakeEntryService([{"id": 1, "kind": "document", "label": "Doc 1"}])
app = _build_app(service)
async with app.run_test() as pilot:
await pilot.pause()
await _run_palette(app, pilot, "help-commands")
detail = _widget_text(app, "#entry-detail")
assert "Palette Reference" in detail
assert "archive-filter <active|all|archived>" in detail
assert "npub" in detail
assert "Displayed full palette command reference" in _status_text(app)
await _run_palette(app, pilot, "help")
assert "Palette Reference" in _widget_text(app, "#entry-detail")
assert "Palette commands:" in _status_text(app)
@pytest.mark.anyio
async def test_tui2_textual_reveal_and_qr_flow() -> None:
service = FakeEntryService(