feat: feedback button, cf-core env-var LLM config, mobile polish #14

Merged
pyr0ball merged 6 commits from feature/orch-auto-lifecycle into main 2026-04-03 22:01:48 -07:00
Owner

Summary

  • In-app feedback FAB (FeedbackButton.vue) — 2-step modal (type → review → submit) that creates Forgejo issues; probes /feedback/status on mount so button only shows when FORGEJO_API_TOKEN is configured; hidden in demo mode
  • cf-core env-var LLM config (closes #13) — bare-metal users can now set OLLAMA_HOST / ANTHROPIC_API_KEY / OPENAI_API_KEY with no llm.yaml needed; CF_LICENSE_KEY wired for hosted coordinator auth; circuitforge-core pinned to >=0.6.0
  • Mobile UX polish — nav FOUC fix via inline critical CSS; Pantry scan toggle responsive layout (480px / 360px); inv-row-right shrink fix; overflow-x: hidden on body and inventory list; env(safe-area-inset-bottom) for iPhone home bar clearance
  • .gitleaksignore — suppress initial-commit .env false positive (DIRECTUS_JWT_SECRET already gitignored going forward; rotate if not already done)
  • requests>=2.31 declared in pyproject.toml (used by feedback endpoint Forgejo calls)

Test plan

  • pytest tests/api/test_feedback.py — 7 tests: status endpoint, 503/403 gates, happy path, 502 on Forgejo error
  • Set FORGEJO_API_TOKEN in .env and confirm feedback FAB appears on load
  • Leave FORGEJO_API_TOKEN unset and confirm FAB stays hidden
  • Submit a test bug report and verify issue created in Circuit-Forge/kiwi
  • Check mobile layout at 480px and 360px (scan toggle, bottom nav clearance)
  • Set only OLLAMA_HOST (no llm.yaml) and confirm LLM recipe path works
## Summary - **In-app feedback FAB** (`FeedbackButton.vue`) — 2-step modal (type → review → submit) that creates Forgejo issues; probes `/feedback/status` on mount so button only shows when `FORGEJO_API_TOKEN` is configured; hidden in demo mode - **cf-core env-var LLM config** (closes #13) — bare-metal users can now set `OLLAMA_HOST` / `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` with no `llm.yaml` needed; `CF_LICENSE_KEY` wired for hosted coordinator auth; `circuitforge-core` pinned to `>=0.6.0` - **Mobile UX polish** — nav FOUC fix via inline critical CSS; Pantry scan toggle responsive layout (480px / 360px); `inv-row-right` shrink fix; `overflow-x: hidden` on body and inventory list; `env(safe-area-inset-bottom)` for iPhone home bar clearance - **`.gitleaksignore`** — suppress initial-commit `.env` false positive (DIRECTUS_JWT_SECRET already gitignored going forward; rotate if not already done) - `requests>=2.31` declared in `pyproject.toml` (used by feedback endpoint Forgejo calls) ## Test plan - [ ] `pytest tests/api/test_feedback.py` — 7 tests: status endpoint, 503/403 gates, happy path, 502 on Forgejo error - [ ] Set `FORGEJO_API_TOKEN` in `.env` and confirm feedback FAB appears on load - [ ] Leave `FORGEJO_API_TOKEN` unset and confirm FAB stays hidden - [ ] Submit a test bug report and verify issue created in Circuit-Forge/kiwi - [ ] Check mobile layout at 480px and 360px (scan toggle, bottom nav clearance) - [ ] Set only `OLLAMA_HOST` (no `llm.yaml`) and confirm LLM recipe path works
pyr0ball added 6 commits 2026-04-03 19:00:58 -07:00
- index.html: inline anti-FOUC CSS so sidebar stays hidden on mobile
  before the JS bundle hydrates (eliminates ~100ms flash of sidebar)
- InventoryList: scan-mode-toggle fills card width on <=480px so buttons
  don't overflow; mode button labels hidden on <=360px (icons only)
- Very narrow phones get icon-only mode toggle, all three buttons still
  accessible via aria-label
- FeedbackButton.vue — floating action button; fires POST /feedback if
  FORGEJO_API_TOKEN is configured, silently hidden otherwise
- feedback.py endpoint — creates Forgejo issues with beta-feedback +
  needs-triage labels; includes version, OS, device info
- App.vue: wire FeedbackButton; use env(safe-area-inset-bottom) for
  bottom-nav clearance (fixes clipped content on iPhone home-bar)
- style.css: overflow-x: hidden prevents stray elements expanding
  mobile viewport
- .env.example: document ANTHROPIC_API_KEY, OPENAI_API_KEY, OLLAMA_HOST,
  OLLAMA_MODEL, CF_ORCH_URL, CF_LICENSE_KEY with usage comments
- config.py: expose CF_LICENSE_KEY in Settings for startup visibility
- pyproject.toml: pin circuitforge-core >= 0.6.0 (env-var auto-config +
  CFOrchClient bearer auth land in 0.6.0)

Bare-metal self-hosters can now run Kiwi with only OLLAMA_HOST set and
zero yaml config. Paid+ users set CF_ORCH_URL + CF_LICENSE_KEY for
managed cloud GPU inference.
- feedback.py: add GET /feedback/status endpoint (returns {enabled: bool})
  so frontend can probe on mount instead of optimistic-enable; remove
  unused get_db import
- FeedbackButton.vue: probe /feedback/status on mount, start hidden;
  drop redundant 503-hide path (status probe makes it redundant)
- pyproject.toml: declare requests>=2.31 (used by feedback.py Forgejo calls)
- tests/api/test_feedback.py: 7 tests — status endpoint (no-token, token,
  demo mode), POST 503/403, happy path with mocked Forgejo, 502 on error
pyr0ball merged commit 63559dcdaa into main 2026-04-03 22:01:48 -07:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/kiwi#14
No description provided.