Thanks for contributing to Streamlit Bubble Chat.
uv— Python package manager and build backend.npm— for frontend dependencies (TypeScript, Vite).git
make setupThat command installs Python dependencies, installs the project in editable mode,
installs frontend dependencies with npm ci, and installs the git hooks defined
in .pre-commit-config.yaml via prek.
make check # run the full hook suite (formatting, linting, lock check)
make test # run all tests (unit + e2e)
make test-unit # run unit tests only
make test-e2e # run Playwright e2e tests only
make build-frontend # clean → typecheck → Vite build
make build # build frontend assets and Python distributions
make upgrade # refresh uv dependencies and hook revisions with a 14-day cooldownThe TypeScript source lives in streamlit_bubble_chat/frontend/src/. After
editing any .ts or .css file:
make build-frontendThen restart Streamlit — Vite hashes the output filenames (index-[hash].js)
and the Python side globs for them. A running Streamlit process won't pick up new
hashes until restarted.
Unit tests (tests/test_component_api.py) test Python API logic without a
browser. They monkeypatch st.components.v2.component and assert on the arguments
passed to the component.
E2E tests (tests/test_e2e_*.py) launch Streamlit + Chromium via Playwright.
They require uv run playwright install chromium once. Each test file targets one
example app.
make test-unit # fast, no browser needed
make test-e2e # real browser, ~50 sIf an E2E test fails, check:
- Frontend is built (
make build-frontend). - Ports 8501, 8503 are free (tests launch Streamlit on those ports).
- Playwright browsers are installed (
uv run playwright install chromium).
This repository uses Conventional Commits via Commitizen.
Examples:
feat: add agent name color overridesfix: preserve unread state when chat is closeddocs: clarify release workflow
- Keep changes focused.
- Update tests and docs when behavior changes.
- Run
make checkbefore opening a pull request.