Skip to content

Follow ~/.python_search/theme in ps_ui; remove the Python terminal UI - #64

Merged
jeanCarloMachado merged 9 commits into
mainfrom
rust-ui-theme-file-remove-term-ui
Oct 30, 2026
Merged

jeanCarloMachado merged 9 commits into
mainfrom
rust-ui-theme-file-remove-term-ui

Conversation

@jeanCarloMachado

@jeanCarloMachado jeanCarloMachado commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • ps_ui theme from a file: dark_mode_now() reads ~/.python_search/theme (dark / light). Order is PS_UI_THEME, then the file, then the time of day as before. It's checked every frame while the launcher is visible, so a running daemon switches as soon as an external theme switcher writes the file.
  • Python terminal UI removed: terminal_ui.py, kitty_for_search_ui.py, QueryLogic.py, bm25_search.py, search_actions.py, python_search/apps/theme/, their tests, the term_ui script and setup_term_ui_logger.
  • python_search search / pys now run ps_ui show.
  • KittyTerminal.get_kitty_cmd uses SystemPaths.KITTY_BINNARY directly.
  • README, DESIGN and rust/README no longer describe term_ui and document the theme order.
  • CI fixed (the Tests workflow had failed on every run since September): run on ubuntu-24.04 with Python 3.12 via actions/setup-python, regenerate the stale poetry.lock, install ripgrep, and write ~/.config/python_search/config before pytest.

Test plan

  • pytest tests: 99 passed
  • cargo build --release -p ps-ui
  • Installed on Linux, restarted ps-ui.service, and the theme file is written by the system theme switch
  • Tests workflow green in CI
  • Visually confirm the launcher flips after writing light / dark to ~/.python_search/theme

🤖 Generated with Claude Code

jeanCarloMachado and others added 9 commits October 30, 2026 18:33
ps_ui now picks dark/light from ~/.python_search/theme (after PS_UI_THEME,
before the time-of-day fallback), re-read every frame so a running daemon
switches live when a system-wide theme switch writes the file.

The Kitty-based term_ui and its supporting modules (QueryLogic, BM25 search,
search actions, Python themes) are removed; `python_search search` / `pys`
now open ps_ui.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The ubuntu-22.04 runner ships Python 3.10, which the project's
python = ">=3.12,<=3.14" constraint rejects, so the Tests workflow has
failed at poetry install on every run since September.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CI's poetry install refused the stale lock file (pyproject.toml changed
significantly since poetry.lock was last generated).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
getch 1.0 is a Python 2 C extension that no longer builds on 3.12, and only
the removed terminal UI used it. poetry.lock was also out of sync with
pyproject.toml (missing pysimplegui), which made `poetry install` abort in CI.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Tests import SystemPaths, which requires PYTHON_SEARCH_PATH in
~/.config/python_search/config.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
SystemPaths and the entries loader raise when ~/.config/python_search/config
or current_project are missing, so test collection errored on the runner.
Point them at the checkout and at a project made from the bundled template.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ubuntu-22.04's apt ripgrep (13.0) fails to find the entry key declaration
in test_entries_editor_finds_key_declaration_not_other_mentions; 24.04
ships 14.1.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
re.escape also escapes spaces, and ripgrep < 14 (Ubuntu 22.04's 13.x) rejects
"\ " as an unrecognized escape, so edit_key found nothing for any key with a
space and fell back to the default file. Escape only Rust regex metacharacters.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@jeanCarloMachado
jeanCarloMachado merged commit ede24f0 into main Oct 30, 2026
2 checks passed
jeanCarloMachado added a commit that referenced this pull request Nov 4, 2026
Commit 93acfeb landed on the PR #64 branch after the squash merge, so it
never reached main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant