Commit Graph

17 Commits

Author SHA1 Message Date
AJ e11886bde9 feat: clearer Arguments editor with typed-together detection and one-click fix
- Label now explains the model with an example: a flag and its value go
  on separate lines. Placeholder shows the common uv pattern.
- split_suspicious_args() flags lines that contain whitespace plus a
  dash-prefixed token ('--directory /path') — legit single args with
  spaces ('My Documents') are never touched. Quotes are respected.
- The editor shows a warning under the args box with a 'Fix: split onto
  separate lines' button; the fix goes through the undo stack.
2026-07-02 00:13:06 -04:00
AJ 77f469c1dd feat: offer guided repair when loading a broken config file
If a config file on disk fails strict JSON parsing, BCC now runs it
through the same repair pipeline as pasted snippets and shows a dialog
listing the parse error, each fix it would apply, and a preview of the
resulting file. The user chooses: Repair & load (marks the profile
dirty; the file is only rewritten on Save, after the broken original
is backed up) or Cancel. Unsalvageable files keep the old error path.

repair_config_file() in bcc_core never writes to disk itself.
2026-07-02 00:10:27 -04:00
AJ d6ce4a0fb0 feat: numbered gutter in the Arguments editor
The one-arg-per-line model read as odd text wrapping — a path on its
own line looked like a wrapped continuation of the previous argument.
A line-number gutter makes each argument visibly its own item.
ArgsEdit also owns the NoWrap setting now.
2026-07-02 00:05:26 -04:00
AJ d2f7ce112c fix: legible inline cell editing + no soft-wrap in args box
- Cell editors in env/header tables got the global QLineEdit style
  (6px vertical padding, 7px radius) crammed into a short row, clipping
  the text to an unreadable sliver. Give table editors a compact flat
  style and bump default row height to 34px.
- Editor select-all now uses dim-orange/white selection colors inside
  cells for contrast against the dark field.
- Arguments box no longer soft-wraps: one arg per line means a wrapped
  path looks like two args. Long lines scroll horizontally instead.
2026-07-01 23:58:06 -04:00
AJ a02d2abe49 fix: readable text selection in inputs (selection-color on orange highlight)
CI / Lint (ruff) (push) Successful in 7s
CI / Tests (py3.10) (push) Successful in 7s
CI / Tests (py3.12) (push) Successful in 6s
Editing a table cell select-alls its text; without an explicit
selection-color the highlighted text rendered near-invisible against
the accent-orange selection background. Applies to all line edits,
text areas, and combo boxes.
2026-07-01 23:55:18 -04:00
AJ d5c89e9602 feat: user-resizable panes with persisted layout
CI / Lint (ruff) (push) Successful in 7s
CI / Tests (py3.10) (push) Successful in 6s
CI / Tests (py3.12) (push) Successful in 6s
- Horizontal splitter between the server list and the editor panel
- Vertical splitter between the Active and Disabled tables (drops the
  fixed 170px cap on the disabled list)
- Editor fields (args, env/header tables) now grow with the window
  instead of being pinned to fixed max heights
- Splitter positions and window geometry persist across launches via
  QSettings; handles highlight on hover/drag
2026-07-01 23:51:40 -04:00
AJ 6205c85b61 feat: lenient JSON repair for pasted MCP snippets
CI / Lint (ruff) (push) Successful in 10s
CI / Tests (py3.10) (push) Successful in 23s
CI / Tests (py3.12) (push) Successful in 10s
Pasted config snippets no longer have to be valid JSON. repair_json_text()
auto-fixes markdown fences, surrounding prose, // /* */ # comments,
trailing and missing commas, smart quotes, single quotes, unquoted keys,
Python/JS literals, and unclosed braces. parse_pasted_json_verbose()
reports every repair applied; the paste dialog now parses as you type
and previews exactly what will be added and what was fixed.

Also includes ruff lint fixes and formatting across bcc.py/bcc_core.py.
2026-07-01 23:43:39 -04:00
AJ 157dad9192 style: apply ruff lint fixes and formatting 2026-07-01 23:43:39 -04:00
AJ 8124150e34 ci: add lint + test workflow (ruff check/format, pytest on py3.10 & 3.12) 2026-07-01 23:43:30 -04:00
AJ 78595be2a2 test: migrate test_core.py script to a proper pytest suite under tests/ 2026-07-01 23:43:30 -04:00
AJ 5ec53b87bc chore: add pyproject.toml, ruff/pytest config, pre-commit hooks, dev deps 2026-07-01 23:43:30 -04:00
AJ Avezzano f5749947e1 fix: write BMP DIB entries in ICO so Windows exe shows correct icon
Pillow's ICO saver stores all sizes as PNG-compressed ("Vista icon"
format).  PyInstaller's Windows resource-updater cannot embed
PNG-compressed entries for small sizes and silently falls back to its
default gear icon.

Fix build_icons.py to write the ICO manually: BMP DIB for sizes ≤ 128 px,
PNG only for the 256 px entry (where Windows Explorer expects PNG).
Regenerate icons/app.ico with the new code.

Also set upx=False in bcc.spec for the Windows/Linux EXE; UPX is another
known cause of icon resources being stripped from PE files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 22:42:02 -04:00
AJ Avezzano 6f03b50a43 ci: disable generate_release_notes (unsupported on Gitea)
Build & Release / Build (Linux) (push) Successful in 46s
Build & Release / Build (Windows) (push) Successful in 1m8s
Build & Release / Build (macOS) (push) Successful in 1m35s
Build & Release / Publish Release (push) Failing after 5s
v1.0.1
2026-06-29 20:38:00 -04:00
AJ Avezzano 335a26a2d6 Fix CI: platform-specific Python setup and artifact actions v3 for Gitea
- Use actions/setup-python only on Linux (container); macOS/Windows create
  a venv from pre-installed python3.12 to avoid privileged install failures
- Downgrade upload/download-artifact to v3 (v4 uses an API Gitea doesn't support)
- Remove merge-multiple (v4-only option) from download-artifact
- Change release files glob to artifacts/**/* (v3 nests each artifact in a subdir)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 19:14:28 -04:00
AJ Avezzano 2e33850fe3 Fix PATH check, add undo, and popup dialog for env/header vars
PATH check:
- Add system_path() that reads /etc/paths + /etc/paths.d/* + well-known
  package manager dirs (/opt/homebrew/bin, /usr/local/bin, /opt/local/bin)
  so the ok/warn distinction is consistent whether BCC runs from terminal
  or as a .app — /opt/homebrew/bin/npx now correctly shows as ok
- augmented_path() now uses system_path() as its base and also includes
  the current process PATH (handles CI / container setups)
- diagnostics_text() uses system_path() to mark user-specific dirs with +

Undo:
- _push_undo() / _undo() snapshot-based undo with 50-entry stack
- Undo button in action bar + Ctrl+Z shortcut
- Hooked into: add server, duplicate, delete, paste JSON, enable/disable
  toggle, drag-drop import, and env/header row add/remove (via
  before_change callback chain through ServerEditor → KeyValueTable)
- Undo stack resets on profile load

Variable/header entry:
- KeyValueTable.+ Add now opens a popup dialog with labeled fields
  (key name + OK disabled until non-empty) instead of inserting an
  invisible blank row — applies consistently to both env and headers tables
- Pressing Enter in key field moves to value; Enter in value submits

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 15:34:18 -04:00
AJ Avezzano dd7557ea62 Add cross-platform packaging, icons, and Claude Code config discovery
Build & Release / Build (Linux) (push) Failing after 2m56s
Build & Release / Build (macOS) (push) Successful in 4m24s
Build & Release / Build (Windows) (push) Has been cancelled
Build & Release / Publish Release (push) Has been cancelled
- Auto-discovers Claude Code (~/.claude/settings.json) alongside Claude Desktop
- Generated icons/app.icns (macOS) and icons/app.ico (Windows) from rounded PNGs
- bcc.spec: PyInstaller spec for all platforms (.app on macOS, onefile on Windows/Linux)
- .github/workflows/release.yml: builds and publishes GitHub Release on version tags
- scripts/build_icons.py: regenerates icon files from source PNGs
- requirements-dev.txt: adds pyinstaller and pillow for building
- CLAUDE.md: initial repo guidance for Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.0.0
2026-06-29 15:01:30 -04:00
AJ Avezzano 780d4c3a9c Initial commit: Better Claude Config 2026-06-29 14:12:50 -04:00