Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
# ── Gate ────────────────────────────────────────────────────────
# V12 cenário 8: release notes are CURATED in CHANGELOG.md, not
# release notes are CURATED in CHANGELOG.md, not
# auto-derived. This job fails the whole release if the tag has no
# corresponding `## [VERSION]` section (or, for a pre-release tag,
# no section for its base version). Nothing builds without notes.
Expand All @@ -30,7 +30,7 @@ jobs:
VERSION="${GITHUB_REF_NAME#v}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

# Pre-release detection (V12 cenário 9). Accept both the
# Pre-release detection. Accept both the
# semver-canonical `-rc.N` and the bare `-rcN` form so the
# tag conventions in docs/RELEASE.md stay flexible.
if [[ "$VERSION" =~ -(rc|beta|alpha)\.?[0-9]+$ ]]; then
Expand Down Expand Up @@ -69,11 +69,11 @@ jobs:
- platform: macos-latest
args: --target x86_64-apple-darwin --bundles app,dmg
target: x86_64-apple-darwin
# Linux: deb + rpm + AppImage (V12 cenário 4).
# Linux: deb + rpm + AppImage.
- platform: ubuntu-22.04
args: --bundles appimage,deb,rpm
target: ""
# Windows: MSI + NSIS .exe (V12 cenário 3). Code-signing
# Windows: MSI + NSIS .exe. Code-signing
# cert is out of scope for v1 (decision 2026-05-17) — the
# installers ship unsigned and SmartScreen warns on first
# run, which is acceptable for a developer build.
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
prerelease: ${{ needs.validate.outputs.prerelease == 'true' }}
args: ${{ matrix.args }}

# ── Homebrew cask (V12 cenário 5) ───────────────────────────────
# ── Homebrew cask ───────────────────────────────
# Bumps the cask in the tap repo (httuicom/homebrew-httui) so
# `brew tap httuicom/httui && brew install --cask httui` works.
# Stable releases only. Gated on HOMEBREW_TAP_TOKEN (a PAT with
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
if: ${{ env.TAP_TOKEN == '' }}
run: echo "HOMEBREW_TAP_TOKEN not set — skipping Homebrew bump."

# ── winget manifest (V12 cenário 6) ─────────────────────────────
# ── winget manifest ─────────────────────────────
# Opens a PR against microsoft/winget-pkgs with the new MSI.
# Stable releases only. Gated on WINGET_TOKEN (a classic PAT that
# can fork winget-pkgs). CI-bound: needs the token and a merged
Expand Down
115 changes: 55 additions & 60 deletions CHANGELOG.md

Large diffs are not rendered by default.

21 changes: 9 additions & 12 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ make wipe-config # Apaga config persistente do app (notes.db,
# Mantém keychain. Útil pra voltar ao empty state entre testes manuais.
```

## Empty-state + first-run flow (V1 vertical 1)
## Empty-state + first-run flow

Mounted in `AppShell` when `vaultPath === null`:

Expand Down Expand Up @@ -151,7 +151,7 @@ Only one survives:
- `src/components/layout/ConflictBanner.tsx` — banner for externally modified files
- `src/components/layout/git/` — Git, two complementary surfaces over the shared `useGitStore` (V10.1):
- **Side panel** (`GitSidePanel`, V10.1): right collapsible column (Box, NOT Dialog — preserves CM6 focus), mounted in `AppShell` like ChatPanel; open state persisted (`useSettingsStore.gitSidePanelOpen`). The TopBar `LuGitBranch` button toggles it. Composes `GitStatusHeader` + `GitFileList` + `GitCommitForm` + `GitSyncBar` + `GitSidePanelHistory` + a "Details" button → pane-tab. Sub-components extracted for SRP: `GitSyncBar`, `GitSidePanelHistory`, `GitMetricsStrip`, `GitCommitTemplateField`.
- **Pane-tab** (V10): `GitPanelContainer` (data/dispatch) → `GitPanel` (Status/Log; `GitMetricsStrip` band on top — V10.1 cenário 6) composing carry sub-components (GitStatusHeader/GitFileList/GitCommitForm/GitLogList/GitLogFilter/GitCommitDiffViewer/GitBranchPicker/GitSyncButtons/GitConflictBanner/GitConflictResolver). Still a `SingletonTabKind = "git"` pane-tab; opened from the side panel's Details/View-all (not the TopBar button anymore).
- **Pane-tab**: `GitPanelContainer` (data/dispatch) → `GitPanel` (Status/Log; `GitMetricsStrip` band on top) composing carry sub-components (GitStatusHeader/GitFileList/GitCommitForm/GitLogList/GitLogFilter/GitCommitDiffViewer/GitBranchPicker/GitSyncButtons/GitConflictBanner/GitConflictResolver). Still a `SingletonTabKind = "git"` pane-tab; opened from the side panel's Details/View-all (not the TopBar button anymore).
- **Shared hooks** (single source — both surfaces): `useGitCommit`, `useGitStage`, `useGitSync` (stage-all → commit → pull `--ff-only` → push). Commit-message prefill: `lib/blocks/commit-template.ts` (default + `{{notes}}/{{count}}/{{date}}`). Push-error formatting: `lib/blocks/git-error.ts`.
- `ShareMenu` (status bar + panel toolbar) wraps `share/SharePopover` via `useShareRepoUrl`. Branch switcher lives in `BranchMenu` (status bar). Conflict regions in the markdown editor are decorated by `src/lib/codemirror/cm-merge-conflict.tsx`. Backend: `httui-core/src/git/` (`conflict.rs` = `git show :1|:2|:3`; `git_push` has `set_upstream`; `git_pull` has `ff_only`).
- `src/components/layout/TopBar.tsx` — vault selector, environment switcher
Expand Down Expand Up @@ -206,9 +206,9 @@ Info-string tokens: `alias`, `timeout`, `display`, `mode` (`raw|form`). Canonica
- **V1 timing:** `total_ms` (full execution) + `ttfb_ms` (split between `req.send()` returning headers and the first body chunk). `dns_ms`/`connect_ms`/`tls_ms` stay `None` and `connection_reused` stays `false` — the full breakdown requires swapping reqwest for isahc/libcurl, deferred to V2 (see `docs/http-timing-isahc-future.md` for criteria + skeleton).
- **Body viewer:** `HttpBodyCM6Viewer` is a CodeMirror 6 read-only `EditorView` with `oneDarkHighlightStyle` and language picked from Content-Type (`json`/`xml`/`html`/`svg`, with the legacy heuristic as fallback). The `lowlight` package itself stays in `package.json` — still used by `ChatMarkdown`.

**Run history (Story 24.6):** `block_run_history` SQLite table (migration `009`) stores **metadata only** (method, URL canonical, status, sizes, elapsed, outcome, timestamp) — never request/response bodies. Trim: 10 rows per (file_path, alias). Drawer shows last N. Tauri commands: `list_block_history`, `insert_block_history`, `purge_block_history`.
**Run history:** `block_run_history` SQLite table (migration `009`) stores **metadata only** (method, URL canonical, status, sizes, elapsed, outcome, timestamp) — never request/response bodies. Trim: 10 rows per (file_path, alias). Drawer shows last N. Tauri commands: `list_block_history`, `insert_block_history`, `purge_block_history`.

**Code generation (Story 24.7):** `src/lib/blocks/http-codegen.ts` exports `toCurl`, `toFetch`, `toPython`, `toHTTPie`, `toHttpFile`. Snippets are pre-computed in panel state (resolved refs included) so the clipboard write happens synchronously inside the user-gesture window — avoid the gotcha where `await` between click and `clipboard.writeText` silently denies. Status-bar `⤓` menu offers all 5; `Mod-Shift-c` shortcuts directly to cURL.
**Code generation:** `src/lib/blocks/http-codegen.ts` exports `toCurl`, `toFetch`, `toPython`, `toHTTPie`, `toHttpFile`. Snippets are pre-computed in panel state (resolved refs included) so the clipboard write happens synchronously inside the user-gesture window — avoid the gotcha where `await` between click and `clipboard.writeText` silently denies. Status-bar `⤓` menu offers all 5; `Mod-Shift-c` shortcuts directly to cURL.

**Slash commands:** `/HTTP Request`, `/HTTP GET`, `/HTTP POST`, `/HTTP PUT`, `/HTTP DELETE` insert templates in the HTTP-message format with cursor on the request line.

Expand Down Expand Up @@ -307,23 +307,20 @@ PermissionBanner (`src/components/chat/PermissionBanner.tsx`): scope selector (O
- `docs/SPEC.md` — Full product specification (features, data models, Tauri commands, UI details). Some references to TipTap/E2E may be stale.
- `docs/ARCHITECTURE.md` — Plugin architecture description (aspirational in places — see Architecture section above).
- `docs/chat-design.md` — Chat system technical design (1000 lines): protocol spec, session lifecycle, streaming, permissions, MCP integration.
- `docs/backlog/` — Epics with stories and tasks. `README.md` has dependency graph and implementation order.

## Compact Instructions

When auto-compacting this conversation, **preserve at all costs**:

- Active epic and story (look at the most recent commit message + `docs-llm/v1/backlog/README.md` for ground truth)
- Quality gate state — whether the last `make quality-check` passed, the threshold (80% / 600 lines), and any active `// size:exclude file` / `// coverage:exclude file` opt-outs
- Recent decisions logged in `docs-llm/jaum-audit/` (autonomous-mode audit trail) — keep the gist; details can be re-read
- The Definition-of-Done rules (`docs-llm/v1/definition-of-done.md`) — non-negotiable
- The `docs-llm/v1/out-of-scope.md` list — never touch these
- For autonomous mode (`/auto-start`): the loop discipline — decide-and-audit, never ask, never push to remote, never bypass gates by editing scripts
- The current task/goal and any in-progress work not yet committed
- Quality gate state — whether the last `make quality-check` passed and the active threshold (80% coverage / 600 lines per touched file)
- Decisions made this session and their rationale (keep the gist; details can be re-read from the commits)
- Any non-negotiable constraints the user has stated

You can drop:
- Verbose tool output (cargo build/test stdout, file listings)
- Earlier exploration of files that are now well-understood
- Old plan-mode discussions that already resulted in committed code
- Step-by-step user prompts/agreements once the action is reflected in commits

When in doubt, re-read the active epic file from `docs-llm/v1/backlog/` rather than relying on summarized memory of it.
When in doubt, prefer re-reading the current code and commits over relying on summarized memory.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ Both gates honor file-level opt-outs on line 1:
- `// coverage:exclude file` — skip the coverage check
- `// size:exclude file` — skip the size check

Use sparingly. Each opt-out must be documented under the corresponding
section of `docs-llm/v1/tech-debt.md`. Exclusions are reviewed during
the sweep epics (20a, 30a) and reduced over time. Truly atomic files
(generated tables, long but cohesive parser state machines, Tauri
command shells with no logic) are the bar.
Use sparingly. Justify each opt-out in the PR description, and prefer
splitting the file or mocking heavy deps over taking one. Exclusions
should be reduced over time. Truly atomic files (generated tables,
long but cohesive parser state machines, Tauri command shells with no
logic) are the bar.

## Code style

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ test-front:
npm run test --workspace httui-desktop -- --project unit

# Coverage gate — touched-files rule (≥80% per file changed).
# See docs-llm/v1/definition-of-done.md.
# See CONTRIBUTING.md.
coverage-check:
./scripts/coverage-check.sh

Expand All @@ -110,7 +110,7 @@ coverage-fe:
cd httui-desktop && npm run test -- --project unit --coverage

# File-size gate — touched files must stay under MAX_LINES (default 600).
# SOLID nudge for SRP. See docs-llm/v1/definition-of-done.md.
# SOLID nudge for SRP. See CONTRIBUTING.md.
size-check:
./scripts/size-check.sh

Expand Down
4 changes: 2 additions & 2 deletions docs/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ sudo rpm -i httui-0.4.0-1.x86_64.rpm # Fedora/RHEL
chmod +x httui_0.4.0_amd64.AppImage && ./httui_0.4.0_amd64.AppImage
```

## 8. Homebrew (cenário 5)
## 8. Homebrew

Prerequisite: the tap repo **`httuicom/homebrew-httui`** must exist
and `HOMEBREW_TAP_TOKEN` must be set. On each stable release the
Expand All @@ -129,7 +129,7 @@ brew install --cask httui
brew upgrade --cask httui
```

## 9. winget (cenário 6)
## 9. winget

The `winget` job submits a PR to `microsoft/winget-pkgs` via
`winget-releaser` (needs `WINGET_TOKEN`). The **first** manifest is
Expand Down
2 changes: 1 addition & 1 deletion httui-core/migrations/009_block_run_history.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Story 24.6 — Block run history (HTTP block).
-- Block run history (HTTP block).
--
-- Stores metadata only (method, URL canonical, status, sizes, elapsed,
-- timestamp) for the most recent N runs per (file_path, alias). Body of
Expand Down
2 changes: 1 addition & 1 deletion httui-core/migrations/012_block_run_history_plan.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Epic 53 Story 01 — `EXPLAIN ANALYZE` plan blob attached to a run.
-- `EXPLAIN ANALYZE` plan blob attached to a run.
--
-- When the SQL block carried `explain=true` in its info-string, the
-- executor ran `EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) <sql>` (or
Expand Down
2 changes: 1 addition & 1 deletion httui-core/migrations/013_schema_cache_drop_fk.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- V4 fix: connections moved to .httui/connections.toml (Epic 12)
-- fix: connections moved to.httui/connections.toml
-- but the schema_cache.connection_id FK still points at the legacy
-- SQLite `connections` table. Inserts fail with code 787 the moment
-- a file-backed connection (e.g. SQLite added via the new
Expand Down
4 changes: 2 additions & 2 deletions httui-core/src/block_history/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Block run history — Story 24.6.
//! Block run history.
//!
//! Stores metadata about HTTP block runs (method, URL canonical, status,
//! sizes, elapsed, timestamp) in SQLite. Body of request/response is NEVER
Expand Down Expand Up @@ -143,7 +143,7 @@ pub async fn list_history(
}

/// Return the most recent N entries for a single file across all
/// aliases. Used by Epic 29 sidebar History tab to show every run
/// aliases. Used by the sidebar History tab to show every run
/// inside the active runbook without an N+1 IPC fan-out from the
/// frontend. Output is most-recent-first; cap is the per-(file,
/// alias) retention multiplied by a small constant so a busy doc
Expand Down
2 changes: 1 addition & 1 deletion httui-core/src/block_history/summary.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Per-file last-run summary — Epic 50 Story 03 backend slice.
//! Per-file last-run summary — backend slice.
//!
//! Powers the `<DocHeaderMetaStrip>` "Last run 14:32 · 12 blocks ·
//! 1 failed" chip. Pure aggregation over `HistoryEntry[]` returned
Expand Down
2 changes: 1 addition & 1 deletion httui-core/src/block_history/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct HistoryEntry {
/// `EXPLAIN`-flavoured JSON plan when the SQL block carried
/// `explain=true`. Capped via `crate::explain::cap_explain_body`
/// (200 KB). `None` for regular runs and any non-SQL block.
/// Epic 53 Story 01 (migration 012).
/// (migration 012).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub plan: Option<String>,
}
Expand Down
2 changes: 1 addition & 1 deletion httui-core/src/blocks/http_codegen.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Code generators for the HTTP block "Send as" menu (Story 24.7).
//! Code generators for the HTTP block "Send as" menu.
//!
//! Pure functions — each takes a block's resolved params and returns a
//! snippet string the user can paste into a terminal / editor / IDE.
Expand Down
4 changes: 2 additions & 2 deletions httui-core/src/captures_cache.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Persistent captures cache (Epic 46 Story 03).
//! Persistent captures cache.
//!
//! When auto-capture is ON for a file, the last-run capture map
//! survives restarts via a JSON file at
//! `<vault>/.httui/captures/<file_relpath>.json` (gitignored via
//! Epic 17's `.httui/` auto-block).
//! the `.httui/` auto-block).
//!
//! Secrets are NEVER persisted: the consumer must filter
//! `isSecret`-flagged entries out of the JSON BEFORE calling
Expand Down
5 changes: 2 additions & 3 deletions httui-core/src/connection_uses.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//! Vault-wide grep for "which runbook uses connection X" (V4
//! cenário 7).
//! Vault-wide grep for "which runbook uses connection X" (V4.
//!
//! Walks `.md` files in the vault, scans for db-block fenced-code
//! info strings, and records every fence whose `connection=<name>`
Expand All @@ -11,7 +10,7 @@
//! On-demand only — no cache, no indexing. The frontend hook is
//! debounced and the typical vault is well under 10k files; if a
//! larger vault hits a measurable gap, we add a cache + invalidation
//! by file watcher (Epic 11). Same skip-dirs convention as
//! by file watcher. Same skip-dirs convention as
//! `tag_index` so build artifacts don't pollute the scan.

use std::fs;
Expand Down
Loading
Loading