diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8fb34db5..1e981d59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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. @@ -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 @@ -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. @@ -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 @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index d481453a..db997293 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,8 @@ markdown editor with executable HTTP and DB blocks inline in documents and an embedded Claude chat assistant. Vaults are plain `.md` files plus a `.httui/` sidecar — no proprietary store, no account. -This entry consolidates the v1 foundation work (epics 00–37) and the -v2 vertical pass (V1–V12): the empty-state vault flow (open / clone / +This entry consolidates the foundational storage/secrets work and the +subsequent feature passes: the empty-state vault flow (open / clone / create), the workbench shell + design system, refined Connections / Variables / Environments master-detail surfaces, the document DocHeader (frontmatter + tags), the Git side panel + share-via-repo, @@ -35,119 +35,116 @@ Settings → General. - **⌘E env switcher** — atalho abre um dropdown no seletor de ambiente da status bar com atalhos numéricos (1–9) pra trocar de - env e uma ação rápida "Clone \". (V11 cenário 1) + env e uma ação rápida "Clone \". - **Quick-edit de conexão** — clicar numa conexão na sidebar abre um popover com status, "Rotate password", override temporário de host:port (só pra sessão, badge TEMPORARY na conexão), Test e - Duplicate. (V11 cenário 2) + Duplicate. - **Popover do `{{var}}` no editor** — clicar num chip `{{var}}` mostra o valor no ambiente ativo, um override de sessão e "Used in N blocks", sem perder o cursor do editor ao fechar. - (V11 cenário 3) + - **⌘⇧V nova variável** — popover estilo cmd+K com seletor de tipo (Text/Number/Bool/Secret) e helpers de template (`{{uuid()}}`, `{{now()}}`, `{{base64()}}`, `{{env()}}`, - `{{$prev.body.id}}`); salva no ambiente ativo. (V11 cenário 4) + `{{$prev.body.id}}`); salva no ambiente ativo. - **Referência posicional `{{$prev.path}}`** — encadeia bloco→bloco usando a resposta do bloco anterior sem precisar nomear um - `alias=`. (V11 cenário 4) + `alias=`. - **Git side panel (Source Control)** — coluna lateral colapsável estilo VS Code, aberta/fechada pelo botão git da top bar e persistente entre sessões: status do branch, lista de mudanças com stage/unstage por arquivo, campo de commit, Sync, history compacto, e botão "Details" pro pane-tab detalhado. Não rouba o - foco do editor. (V10.1 cenários 1, 5) + foco do editor. - **Sync de 1 clique** — botão Sync faz stage-all → commit → pull (fast-forward only) → push numa ação só, com progresso por etapa; para na etapa que falhar e mostra o motivo; reusa o confirm de set-upstream quando o branch não tem upstream. - (V10.1 cenário 3) + - **Template de commit message** — o campo de commit vem pré-preenchido (`Update ` / `Update N notes` por padrão); configurável em Settings → General com placeholders `{{notes}}` - / `{{count}}` / `{{date}}`. (V10.1 cenários 2, 8) + / `{{count}}` / `{{date}}`. - **History compacto + diff inline** — últimos commits no side panel (hash, autor, subject, tempo relativo); clicar abre o diff - do commit ali mesmo; "View all" abre o pane-tab. (V10.1 cenário 4) + do commit ali mesmo; "View all" abre o pane-tab. - **Faixa de métricas no pane-tab git** — branch, upstream, ahead/behind explícito, mudanças por tipo, autor do último - commit, último sync e URL do remote acima das abas. (V10.1 - cenário 6) + commit, último sync e URL do remote acima das abas. - **Git panel** — aba singleton (botão na top bar) com Status / Log: working tree (staged/unstaged/untracked), stage/unstage por arquivo, commit form com preview, log filtrável (autor / path), diff de commit lado-a-lado, push / pull / fetch, e prompt de confirmar set-upstream ao dar push numa branch sem upstream. Detecta `git remote add` feito por fora sem precisar recarregar. - (V10 cenários 1-5, 8) + - **Branch switcher** — o indicador de branch na status bar agora abre um picker (branches locais + remotas, filtro, criar nova) que - faz checkout e recarrega a árvore de arquivos. (V10 cenário 4) + faz checkout e recarrega a árvore de arquivos. - **Resolução de conflito de merge** — banner por arquivo conflitado com Accept yours / Accept theirs e um resolvedor 3-way (ours editável ↔ theirs, base sob demanda). No editor markdown, hunks de conflito ganham destaque (ours/theirs/markers) + ações - inline na linha do marker (accept current/incoming/both). (V10 - cenário 6) + inline na linha do marker (accept current/incoming/both). - **Share via URL do repositório** — popover (na status bar e no git panel) com as URLs HTTPS / SSH / Web do remote; copiar ou - abrir a Web URL no navegador. (V10 cenário 7) + abrir a Web URL no navegador. - **DocHeader card acima do CM6** — breadcrumb (workspace › path), h1 serif do título, abstract serif, tag chips na coluna direita, pill row de pre-flight checks, meta strip com gravatar do owner + edited mtime + branch + diff stats (`main +N ~M`) + last run - status. Card é o ponto de entrada visual da nota. (V6 cenários 1-2) + status. Card é o ponto de entrada visual da nota. - **Pre-flight check builder no DocHeader** — `+ Add check` abre popover com kind picker (connection / env_var / branch / file_exists / command) + CM6 inline editor pra value com autocomplete contextual (connections puxam de `ConnectionsStore`, env_var da env ativa). Pill cliclável abre o mesmo popover em modo edit (pré-bind do kind/value + - botão Remove). (V6 cenário 9) + botão Remove). - **Pre-flight context wiring** — evaluator agora lê o estado real do vault: connection names do `ConnectionsStore`, env-var keys da env ativa via `EnvironmentsStore`, branch corrente via `git rev-parse --abbrev-ref HEAD`. `file_exists` / `command` contra FS + PATH. Checks deixam de ser "decorativos" e passam - a refletir o ambiente. (V6 cenário 9 — `def8e27`, `3c3be69`) + a refletir o ambiente. - **Pre-flight Run-all gate** — `⌘⇧R` (Run all) com pre-flight com falha abre dialog de confirmação; `Shift+⌘⇧R` faz override. - (V6 cenário 10) + - **Variables page (master-detail)** — TopBar `LuKeyRound` abre tab dedicada com lista densa cross-env (1 row por chave, colunas por env, contagem `USES` via vault-grep), sidebar SCOPES/HELPERS, detail panel à direita com value-per-env (Show pra secrets resolve via keychain, Edit + Override + Delete por row), is_secret toggle com prompt + migração para/do keychain, - USED IN BLOCKS lista clicável que pula pro arquivo. (V5 - cenários 1-4) + USED IN BLOCKS lista clicável que pula pro arquivo. - **Session override** — botão `Override` em cada value row salva TEMPORARY value em memória (`useSessionOverrideStore`); chip `TEMPORARY` clicável dropa. `getActiveVariables` mergeia overrides em cima do resolver, então blocos HTTP/DB - consomem o valor de override. Sem persistência. (V5 cenário 3) + consomem o valor de override. Sem persistência. - **+ New variable inline form** — table-row style (KEY mono input + VALUE input + lock toggle + + save + × cancel) - inserido no header da Variables page. (V5 cenário 5) + inserido no header da Variables page. - **Environments page** — TopBar `LuLayers` abre tab com cards densos por env (varCount, connectionsUsedCount, ACTIVE pill, chips personal/temporary). Click ativa o env via `set_active_environment`; o pill ACTIVE faz **swap visual animado** entre cards (FLIP manual via `getBoundingClientRect` - + translate inverso, 360ms ease-out). (V5 cenário 6) + + translate inverso, 360ms ease-out). - **Clone / Rename / Delete environment** — ⋮ menu em cada card abre Chakra Popover ancorado embaixo. Clone copia plain vars. Rename **migra entries de keychain** (novo backend `rename_environment` + `EnvironmentsStore::rename_env`). Delete tem banner Destructive + type-the-name confirmation - (industry-standard guardrail). (V5 cenários 7-8) + (industry-standard guardrail). - **+ New environment** — Popover anchored no botão pra criar - novo env (envs/.toml). (V5 cenário 6 polish) + novo env (envs/.toml). - **EnvironmentManager drawer** — refatorado pra consumir - `VariableValueRow` + `NewVariableForm` (V5 atoms). Per-var + `VariableValueRow` + `NewVariableForm`. Per-var delete shortcut (× vermelho ghost) + + New variable inline + per-env Set active / Duplicate / Delete header actions. - (V5 cenário 10) + - **Master-detail shared atoms** — `components/layout/shared/` expõe `SectionLabel`, `SidebarHintCard`, `MasterDetailListHeader`, `MasterDetailSidebarRow` + @@ -162,11 +159,11 @@ Settings → General. (Form / Connection string / SSL — SSH placeholder), file picker nativo para SQLite db / cert / key paths, ⋮ menu de row (Edit / Test / Duplicate / Delete) e config-changed listener - refletindo edição manual de `connections.toml`. (V4 cenários 1-8) + refletindo edição manual de `connections.toml`. - **`find_connection_uses_cmd` Tauri command** — vault-grep on-demand (`httui_core::connection_uses`) que walk `*.md` e retorna `{file, line}` de cada referência `db-` no - vault. (V4 cenário 7) + vault. - **Workbench shell + design system** — top bar com logo, breadcrumb (workspace › project › file), segmented env switcher, ⌘K search e branch button substituem a topbar legada. Sidebar nova reúne Files, @@ -174,38 +171,37 @@ Settings → General. (lock icon + valor mascarado para entries `is_secret`). Status bar interativa expõe env menu, branch menu, contador `+N ~M -D` de mudanças git, latência, cursor (Ln/Col), encoding e versão. - (V2 cenários 1-3) + - **Inline DocHeader (Notion-mode)** — título serif, abstract, tags (chips +/×) e checklist preflight (`[x] item`) editáveis dentro do CodeMirror; frontmatter YAML invisível e gerado automaticamente. Meta strip do header mostra autor (avatar Gravatar + nome), - contagem de blocos e last-run inline. (V2 cenário 4.5) + contagem de blocos e last-run inline. - **Empty-state cards (Open / Clone / Create vault)** — primeiro contato com o app sem vault aberto. Three actionable cards replace the legacy "Em branco / Templates / Importar" surface, with inline error rendering per card and Mac-native directory picker. Open and Create rely on `scaffold_new_vault`; Clone shells out to `git` and respects the user's credential helper - / ssh-agent. (V1 vertical 1, cenários 1-3) + / ssh-agent. - **`clone_vault_cmd` Tauri command** — `git clone /` com leaf derivado da URL e parent configurável. Default parent: `~/Documents`. Pre-flight rejeita parent inexistente, parent que é arquivo, e leaf não-vazio. - Backed by `httui_core::git::git_clone`. (V1 vertical 1, cenário 2) + Backed by `httui_core::git::git_clone`. - **`create_vault_cmd` Tauri command** — compõe mkdir + `git init` + `scaffold_new_vault` numa operação atômica do ponto de vista do user. Validações de input rejeitam path traversal (name vazio, com `/` ou `\\`, começando com `.`). Backed by `httui_core::vault_config::create::create_new_vault`. - (V1 vertical 1, cenário 3) + - **First-run secrets modal** — quando o vault aberto referencia `{{keychain:...}}` ausentes do OS keychain local, abre um modal batch após `switchVault`. Cada row tem Save (preenche e remove do store) e Skip (esconde da sessão atual mas mantém pendente). Skip all / Done dismissam sem tocar o store. Refs ainda pendentes ficam visíveis via badge na statusbar (`LuTriangleAlert` + - contador), clicável para reabrir o modal. (V1 vertical 1, - cenário 4) + contador), clicável para reabrir o modal. - **`save_secret_cmd` Tauri command** — persiste valor no OS keychain. Validações rejeitam `keychain_key` vazio e `value` vazio. Driver pra coletar resposta do modal first-run. @@ -220,45 +216,45 @@ Settings → General. - **Local overrides** — every committed `*.toml` config file accepts a sibling `*.local.toml` that deep-merges over the base on read; writes always target the base file. The vault's `.gitignore` auto-includes - the `*.local.toml` block. (Epic 10, ADR 0004) + the `*.local.toml` block. (see ADR 0004) - **File watcher** — the desktop app watches `connections.toml`, `envs/*.toml`, `.httui/workspace.toml` and `~/.config/httui/user.toml` via `notify`; external edits invalidate the in-process cache and - emit a Tauri event. (Epic 11) + emit a Tauri event. - **Vault migration tooling** — Tauri command `migrate_vault_to_v1` walks the legacy SQLite tables and writes the v1 file layout. Backs up `notes.db` first; idempotent on re-run; supports a dry-run - preview. (Epic 12, see [`docs/MIGRATION.md`](docs/MIGRATION.md)) + preview. (see [`docs/MIGRATION.md`](docs/MIGRATION.md)) - **Secret backend abstraction** — `SecretBackend` trait with a `Keychain` default impl plus a parser for `{{keychain:…}}` markers in TOML. Slot for future `1Password` / `Stronghold` / `pass` impls. - (Epic 13) + - **Vault open / scaffold / validate** — `open_vault`, `scaffold_vault`, `check_is_vault` Tauri commands; first-run flow for empty directories writes the v1 skeleton (`runbooks/`, - `connections.toml`, `envs/`, `.httui/`, `.gitignore`). (Epic 17) + `connections.toml`, `envs/`, `.httui/`, `.gitignore`). - **First-run missing-secrets scan** — `first_run_missing_secrets` Tauri command lists keychain markers referenced by the vault that have no value on this machine, so the UI can prompt for batch entry. - (Epic 18) + - **Settings split foundation** — `user.toml` (per-machine prefs) vs. `.httui/workspace.toml` (vault defaults) split, with the seven legacy `app_config` UI keys promoted to the new schema. Schema - bump shipped; UI restructure deferred to a frontend session. (Epic 19) + bump shipped; UI restructure deferred to a frontend session. - **Git panel backend** — `httui_core::git` shells out to `git` for status, log, branch, fetch, pull, push and remote inspection; exposed through Tauri commands ready for the panel UI to consume. - (Epic 20) + - **Codebase reorganization** — desktop app moved into `httui-desktop/`, marketing landing into `httui-web/`, chat sidecar into `httui-sidecar/`. Shared logic lives in `httui-core/`. The TUI, MCP server and chat sidecar all read the same vault on disk. - (Epic 00) + - **Quality gates** — pre-push and CI gate every modified `.rs`/`.ts`/ `.tsx` file at ≤600 production lines and ≥80% line coverage on the file as a whole; ESLint warnings for `complexity`, `max-lines-per-function`, `max-params`, `max-depth` baseline - recorded. (Epic 04.5, Epic 04) + recorded. - **OSS readiness docs** — README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT, LICENSE plus `docs/ARCHITECTURE.md`, four ADRs and user-facing `docs/concepts.md` + `docs/blocks.md`. @@ -268,7 +264,7 @@ Settings → General. - **Botão git da top bar** — agora abre/fecha o git side panel (antes abria direto o pane-tab). O pane-tab detalhado abre pelo - "Details" / "View all" dentro do side panel. (V10.1 cenário 1) + "Details" / "View all" dentro do side panel. - **Design system token vocabulary** — UI 100% alinhada ao vocabulário Chakra v3. Tokens custom (`bg.1/2/3/hi`, `fg.2/3`, `line`, `line.soft`, `accent.*`, `sel`) foram @@ -276,16 +272,16 @@ Settings → General. emphasized/panel`, `fg.muted/subtle`, `border`, `brand.fg/ contrast/subtle`). Recipes internos (Menu, Popover, Tooltip, Card, Badge) consomem os mesmos nomes — sem slot recipe - override por componente. (V2 cenário 5) + override por componente. - **File-tree contrast** — items inativos da árvore de arquivos passaram de `fg.subtle` para `fg.muted` para garantir - legibilidade no tema dark Fuji. (V2 cenário 5) + legibilidade no tema dark Fuji. - **MarkdownEditor split** — o componente monolítico (~573 linhas com `coverage:exclude`) foi quebrado em três sub-módulos coesos (`markdown-vim-motions`, `markdown-highlight-style`, `markdown-extensions`) com 100% de cobertura, deixando o shell React em ~206 linhas. - Comportamento user-visible inalterado. (V2 cenário 6) + Comportamento user-visible inalterado. - **Editor stack** — TipTap rich-text editor and the legacy "E2E" block were removed; the editor is now CodeMirror 6 only. Block panels (HTTP, DB) mount via React portals into CM6 widget DOM. @@ -308,18 +304,18 @@ Settings → General. - **HTTP block — fenced-code-native storage format** — body is HTTP message text inside a ```http fence (info-string tokens `alias`, `timeout`, `display`, `mode`); legacy JSON-bodied blocks are parsed - on read. (Epic 24) + on read. ### Removed - **Aba Audit do git panel** — sem os filtros action-type (adiados pra v1.x) era idêntica à aba Log; removida do v1, volta - com os filtros. (V10 follow-up) + com os filtros. - **Pre-flight `keychain` kind** — retirado do typed set em V6. macOS keychain enumeration é restritivo e os call sites que se beneficiariam não estão construídos. YAML legado com `keychain: ` cai pro fallback `Unknown` do parser (não - crasha — só não aparece como pill). (V6 cenário 9 — `3c3be69`) + crasha — só não aparece como pill). - **Top bar "Run all" button** — dropado em V2; o roteiro inteiro de um documento já é executável bloco-a-bloco e o botão acumulava complexidade sem demanda real. @@ -344,12 +340,11 @@ Settings → General. / GH013 / non-fast-forward / auth) eram despejadas como o stderr cru do git, espremido e ininteligível. Agora vêm com um resumo legível em destaque + o detalhe limpo (sem o ruído `remote:`) - num bloco rolável; o botão volta a "Retry sync". (V10.1 - cenário 3, follow-up de UAT) + num bloco rolável; o botão volta a "Retry sync". - **Conflitos de merge invisíveis no git panel** — `git status` não interpretava as linhas `u` (unmerged) do `porcelain=v2`, então um vault em conflito aparecia como "Working tree clean" e o banner - de resolução nunca surgia. (V10 cenário 6) + de resolução nunca surgia. - **Markdown serializer round-trip** — fenced code blocks for executable types (```http, ```db-*) survive the CM6 markdown parser/serializer cycle without corruption. diff --git a/CLAUDE.md b/CLAUDE.md index d97d5605..32b67574 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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`: @@ -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 @@ -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. @@ -307,18 +307,15 @@ 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) @@ -326,4 +323,4 @@ You can drop: - 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. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2265798f..bc65fb47 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/Makefile b/Makefile index 8fbcaa13..f9bac9d8 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 diff --git a/docs/RELEASE.md b/docs/RELEASE.md index 43bd1d18..7ddc7416 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -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 @@ -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 diff --git a/httui-core/migrations/009_block_run_history.sql b/httui-core/migrations/009_block_run_history.sql index 4e743048..7b5dfc95 100644 --- a/httui-core/migrations/009_block_run_history.sql +++ b/httui-core/migrations/009_block_run_history.sql @@ -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 diff --git a/httui-core/migrations/012_block_run_history_plan.sql b/httui-core/migrations/012_block_run_history_plan.sql index 3b908010..02de9a5e 100644 --- a/httui-core/migrations/012_block_run_history_plan.sql +++ b/httui-core/migrations/012_block_run_history_plan.sql @@ -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) ` (or diff --git a/httui-core/migrations/013_schema_cache_drop_fk.sql b/httui-core/migrations/013_schema_cache_drop_fk.sql index 890346c3..5b292b4a 100644 --- a/httui-core/migrations/013_schema_cache_drop_fk.sql +++ b/httui-core/migrations/013_schema_cache_drop_fk.sql @@ -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 diff --git a/httui-core/src/block_history/mod.rs b/httui-core/src/block_history/mod.rs index e1e08650..3b909372 100644 --- a/httui-core/src/block_history/mod.rs +++ b/httui-core/src/block_history/mod.rs @@ -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 @@ -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 diff --git a/httui-core/src/block_history/summary.rs b/httui-core/src/block_history/summary.rs index cdf8ab4c..4e0d95a7 100644 --- a/httui-core/src/block_history/summary.rs +++ b/httui-core/src/block_history/summary.rs @@ -1,4 +1,4 @@ -//! Per-file last-run summary — Epic 50 Story 03 backend slice. +//! Per-file last-run summary — backend slice. //! //! Powers the `` "Last run 14:32 · 12 blocks · //! 1 failed" chip. Pure aggregation over `HistoryEntry[]` returned diff --git a/httui-core/src/block_history/types.rs b/httui-core/src/block_history/types.rs index d214a9cf..e9eddc12 100644 --- a/httui-core/src/block_history/types.rs +++ b/httui-core/src/block_history/types.rs @@ -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, } diff --git a/httui-core/src/blocks/http_codegen.rs b/httui-core/src/blocks/http_codegen.rs index 134bb00f..8dd38855 100644 --- a/httui-core/src/blocks/http_codegen.rs +++ b/httui-core/src/blocks/http_codegen.rs @@ -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. diff --git a/httui-core/src/captures_cache.rs b/httui-core/src/captures_cache.rs index 368d6844..1ec5ab8c 100644 --- a/httui-core/src/captures_cache.rs +++ b/httui-core/src/captures_cache.rs @@ -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 //! `/.httui/captures/.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 diff --git a/httui-core/src/connection_uses.rs b/httui-core/src/connection_uses.rs index 07f95e97..5e8e45ea 100644 --- a/httui-core/src/connection_uses.rs +++ b/httui-core/src/connection_uses.rs @@ -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=` @@ -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; diff --git a/httui-core/src/db/connections.rs b/httui-core/src/db/connections.rs index 961890f7..94f07024 100644 --- a/httui-core/src/db/connections.rs +++ b/httui-core/src/db/connections.rs @@ -4,14 +4,14 @@ use sqlx::Row; use uuid::Uuid; // Pool lifecycle + status emission moved to `db::pool_manager` -// (Epic 20a Story 01 first split). Re-exported here so the existing +// Re-exported here so the existing // `use httui_core::db::connections::{PoolManager, StatusEmitter}` // callers keep compiling without a sweeping import rewrite. pub use super::pool_manager::{HostPortOverride, PoolManager, StatusEmitter}; // `DatabasePool` enum + lifecycle helpers (`create_pool`, builders, -// validators, sanitizer) moved to `db::pool` (Epic 20a Story 01 — -// fourth split). Re-exported here so existing imports compile. +// validators, sanitizer) moved to `db::pool`. Re-exported here so +// existing imports compile. #[cfg(test)] use super::pool::validate_bind_values; use super::pool::validate_sqlite_path; @@ -126,7 +126,7 @@ pub struct UpdateConnection { } // Query error sanitization + location extraction moved to -// `db::query_error` (Epic 20a Story 01 — second split). Re-exports +// `db::query_error`. Re-exports // keep existing imports compiling. pub(crate) use super::query_error::sanitize_query_error; pub use super::query_error::{ @@ -386,14 +386,14 @@ fn validate_connection_fields( } // Query execution dispatcher + DTOs + bind validation moved to -// `db::pool` (Epic 20a Story 01 — eighth split). Re-exports keep +// `db::pool`. Re-exports keep // `httui_core::db::connections::{QueryResult, ColumnInfo, JsonRow}` // working for downstream consumers (executor/db, blocks/db_export). pub use super::pool::{ColumnInfo, JsonRow, QueryResult}; pub(crate) use super::pool_exec_sqlite::sqlite_row_to_json; // SQL scanner + statement splitter + placeholder helpers moved to -// `db::sql_scanner` (Epic 20a Story 01 — third split). Re-exports +// `db::sql_scanner`. Re-exports // keep existing imports compiling. pub(crate) use super::sql_scanner::contains_multiple_statements; pub use super::sql_scanner::{count_placeholders, normalize_placeholders_to_pg, split_statements}; @@ -571,7 +571,7 @@ mod tests { // build_pg_connect_options / validate_sqlite_path / // validate_mysql_database_name / normalize_placeholders tests // moved alongside the implementations (`db::pool` and - // `db::sql_scanner`) — Epic 20a Story 01. + // `db::sql_scanner`). #[tokio::test] async fn test_execute_select_sqlite() { @@ -687,16 +687,14 @@ mod tests { assert_eq!(result.rows[0][1], serde_json::json!("charlie")); } - // Pool config validation tests moved to `db::pool::tests` - // (Epic 20a Story 01 — fourth extraction). + // Pool config validation tests moved to `db::pool::tests`. // SQL-scanner / split_statements / contains_multiple_statements // tests moved to `db::sql_scanner::tests` along with the - // implementations (Epic 20a Story 01 — third extraction). + // implementations. // QueryErrorLocation / position_to_line_col / mysql_line_from_message - // tests moved to `db::query_error::tests` along with the functions - // (Epic 20a Story 01 — second extraction). + // tests moved to `db::query_error::tests` along with the functions. #[tokio::test] async fn test_explain_analyze_delete_rejected() { @@ -909,8 +907,8 @@ mod tests { // Tests run on a single tokio thread per case, so blocking is fine. #[allow(clippy::await_holding_lock)] async fn create_connection_fails_secure_when_keychain_unavailable() { - // Epic 16, Story 02 invariant: if `store_secret` fails, the - // connection row must NOT be inserted with a plaintext password. + // invariant: if `store_secret` fails, the connection row + // must NOT be inserted with a plaintext password. // We force the keychain to error and verify both the Err return // AND that no row leaked into the database. use crate::db::keychain::{force_keychain_failure, KEYCHAIN_TEST_LOCK}; @@ -991,7 +989,7 @@ mod tests { #[tokio::test] async fn update_connection_followed_by_invalidate_yields_fresh_pool() { - // Epic 16, Story 05 invariant (L102): the Tauri command sequence + // invariant (L102): the Tauri command sequence // (update_connection → conn_manager.invalidate) must guarantee // that the next `get_pool` call returns a pool built from the // updated row, not a stale cached one. diff --git a/httui-core/src/db/driver.rs b/httui-core/src/db/driver.rs index cd064a61..ed29c0b0 100644 --- a/httui-core/src/db/driver.rs +++ b/httui-core/src/db/driver.rs @@ -19,7 +19,7 @@ //! aren't represented here. `DbDriver::from_str` returns an `Err` //! for them. //! -//! Added in Epic 20a Story 07 (`tech-debt.md` code-smell #1). +//! Added to address `tech-debt.md` code-smell #1. use std::fmt; use std::str::FromStr; diff --git a/httui-core/src/db/lookup.rs b/httui-core/src/db/lookup.rs index b5b31730..e0e82fcc 100644 --- a/httui-core/src/db/lookup.rs +++ b/httui-core/src/db/lookup.rs @@ -3,12 +3,11 @@ //! `vault_config::ConnectionsStore` (file-backed), tests use a mock, //! and the legacy `SqlitePool`-backed lookup remains available as //! an adapter for the SQLite test fixtures that have not yet -//! migrated to file-backed (Epic 20a Story 01 cleanup). +//! migrated to file-backed (cleanup). //! //! Closes the DIP item from `tech-debt.md` — //! `PoolManager::new(app_pool: SqlitePool, ...)` no longer hardwires -//! SQLite as the source of connection records (Epic 19 Story 02 -//! Phase 3; audit-015). +//! SQLite as the source of connection records. use std::sync::Arc; diff --git a/httui-core/src/db/mod.rs b/httui-core/src/db/mod.rs index e8430505..f6cacfa9 100644 --- a/httui-core/src/db/mod.rs +++ b/httui-core/src/db/mod.rs @@ -209,7 +209,7 @@ async fn run_migrations(pool: &SqlitePool) -> Result<(), sqlx::Error> { } } - // Story 24.6: block run history (CREATE IF NOT EXISTS — idempotent) + // block run history (CREATE IF NOT EXISTS — idempotent) for statement in MIGRATION_009_SQL.split(';') { let trimmed = statement.trim(); if !trimmed.is_empty() { @@ -233,7 +233,7 @@ async fn run_migrations(pool: &SqlitePool) -> Result<(), sqlx::Error> { } } - // Epic 53 Story 01: block_run_history.plan (ALTER may fail + // block_run_history.plan (ALTER may fail // when the column already exists — same idempotent pattern // as 002 / 006 / 007 / 008). for statement in MIGRATION_012_SQL.split(';') { @@ -244,7 +244,7 @@ async fn run_migrations(pool: &SqlitePool) -> Result<(), sqlx::Error> { } // V4 fix: schema_cache.connection_id FK still pointed at the - // legacy SQLite `connections` table (now empty after Epic 12). + // legacy SQLite `connections` table (now empty after). // Migration recreates the table without the FK. Not idempotent // at the SQL layer (DROP + RENAME), so guard at the Rust layer // by inspecting pragma_foreign_key_list — only re-run while the diff --git a/httui-core/src/db/pool.rs b/httui-core/src/db/pool.rs index 9cf7b219..269d8708 100644 --- a/httui-core/src/db/pool.rs +++ b/httui-core/src/db/pool.rs @@ -1,8 +1,8 @@ //! `DatabasePool` enum + per-driver pool construction (Postgres / //! MySQL / SQLite). //! -//! Extracted from `db::connections` (Epic 20a Story 01 — fourth -//! split). Owns the lifecycle pieces — enum definition, ping +//! Extracted from `db::connections`. Owns the lifecycle pieces +//! — enum definition, ping //! (`test`), `create_pool` factory, driver-specific //! `build_*_connect_options` helpers, path/name validation, pool //! config validation, and connection-error sanitization. diff --git a/httui-core/src/db/pool_exec_mysql.rs b/httui-core/src/db/pool_exec_mysql.rs index cb024267..50a7be8f 100644 --- a/httui-core/src/db/pool_exec_mysql.rs +++ b/httui-core/src/db/pool_exec_mysql.rs @@ -1,10 +1,10 @@ -// coverage:exclude file — DB pool/exec/lookup or vault-store registry. Coverage requires live DB integration tests; owned by Epic 32 (critical-path tests). Audit-027. +// coverage:exclude file — DB pool/exec/lookup or vault-store registry. Coverage requires live DB integration tests; owned by the critical-path test harness. //! MySQL execute helpers used by the `DatabasePool::execute_*` //! dispatchers. //! -//! Extracted from `db::connections` (Epic 20a Story 01 — seventh -//! split). Owns MySQL SELECT pagination, mutation, value binding, +//! Extracted from `db::connections`. Owns MySQL SELECT +//! pagination, mutation, value binding, //! and the type-aware row → JSON conversion (sqlx-mysql rejects //! `i64` for UNSIGNED columns and rejects `String` for `JSON`, //! so we dispatch by `column.type_info().name()`). diff --git a/httui-core/src/db/pool_exec_pg.rs b/httui-core/src/db/pool_exec_pg.rs index 460ef7f6..42961b1f 100644 --- a/httui-core/src/db/pool_exec_pg.rs +++ b/httui-core/src/db/pool_exec_pg.rs @@ -1,9 +1,9 @@ -// coverage:exclude file — DB pool/exec/lookup or vault-store registry. Coverage requires live DB integration tests; owned by Epic 32 (critical-path tests). Audit-027. +// coverage:exclude file — DB pool/exec/lookup or vault-store registry. Coverage requires live DB integration tests; owned by the critical-path test harness. //! Postgres execute helpers used by the `DatabasePool::execute_*` //! dispatchers. //! -//! Extracted from `db::connections` (Epic 20a Story 01 — sixth split). +//! Extracted from `db::connections`. //! Owns Postgres SELECT pagination, mutation, value binding, and row → //! JSON conversion. `?` → `$N` normalization happens here so callers //! can write driver-agnostic SQL with `?` and the dispatcher picks diff --git a/httui-core/src/db/pool_exec_sqlite.rs b/httui-core/src/db/pool_exec_sqlite.rs index fd64b1a4..b9280bc3 100644 --- a/httui-core/src/db/pool_exec_sqlite.rs +++ b/httui-core/src/db/pool_exec_sqlite.rs @@ -1,7 +1,7 @@ //! SQLite-specific execute helpers used by the `DatabasePool::execute_*` //! dispatchers. //! -//! Extracted from `db::connections` (Epic 20a Story 01 — fifth split). +//! Extracted from `db::connections`. //! Owns SQLite SELECT pagination, mutation, value binding, and row → //! JSON conversion. diff --git a/httui-core/src/db/pool_manager.rs b/httui-core/src/db/pool_manager.rs index 94a51f43..efaef823 100644 --- a/httui-core/src/db/pool_manager.rs +++ b/httui-core/src/db/pool_manager.rs @@ -1,6 +1,6 @@ //! Pool lifecycle, TTL eviction, status emission. //! -//! Extracted from `db::connections` (Epic 20a Story 01 — first split). +//! Extracted from `db::connections`. //! `connections.rs` was 2894 L mixing 7 concerns; this file owns the //! pool-management one. Holds an `Arc` (file- //! backed in production via `vault_config::ConnectionsStore`, @@ -24,7 +24,7 @@ pub trait StatusEmitter: Send + Sync { fn emit_connection_status(&self, connection_id: &str, name: &str, status: &str); } -/// Session-scoped host:port override for a connection (V11 cenário 2). +/// Session-scoped host:port override for a connection. /// /// In-memory on the frontend (`connectionSessionOverride` store), passed /// per DB execution through `DbParams`. Never persisted — the vault @@ -64,7 +64,7 @@ pub struct PoolManager { /// (`SqliteLookup`). See `db/lookup.rs`. lookup: Arc, /// Retained only for `cleanup_query_log` (the `query_log` SQLite - /// table; future Epic 20a Story owns the move-out and the field + /// table; future Story owns the move-out and the field /// disappears with it). app_pool: SqlitePool, pools: RwLock>, @@ -116,7 +116,7 @@ impl PoolManager { /// supplied the pool is created against the overridden host/port and /// cached under a composite key — the base `connection_id` pool is /// never mutated, so non-overridden runs (and a later cleared - /// override) keep using it untouched. (V11 cenário 2.) + /// override) keep using it untouched. pub async fn get_pool_with_override( &self, connection_id: &str, @@ -519,7 +519,7 @@ mod tests { assert_eq!(count, 5, "old rows should be deleted, recent ones kept"); } - // ───── V11 cenário 2: host:port session override ───── + // ───── host:port session override ──────────────────── #[test] fn host_port_override_is_empty_only_when_both_none() { diff --git a/httui-core/src/db/query_error.rs b/httui-core/src/db/query_error.rs index 8ed00a26..34308bca 100644 --- a/httui-core/src/db/query_error.rs +++ b/httui-core/src/db/query_error.rs @@ -1,7 +1,6 @@ //! Query error sanitization + driver-specific location extraction. //! -//! Extracted from `db::connections` (Epic 20a Story 01 — second -//! split). Owns: +//! Extracted from `db::connections`. Owns: //! //! - `QueryErrorInfo` + `QueryErrorLocation` data types //! - `sanitize_query_error` / `sanitize_query_error_rich` — strip diff --git a/httui-core/src/db/schema_cache_remote.rs b/httui-core/src/db/schema_cache_remote.rs index 379cc0b0..ffccb93d 100644 --- a/httui-core/src/db/schema_cache_remote.rs +++ b/httui-core/src/db/schema_cache_remote.rs @@ -3,9 +3,8 @@ // pure SchemaEntry mapping (`build_pg_entry`, `build_mysql_entry`, // `first_string_or_bytes_lossy`) and the SQL constants stay in // `schema_cache.rs` and are unit-tested there. Exercising these -// async helpers needs a live Postgres / MySQL pool — owned by -// Epic 32 (critical-path tests, DB integration harness). See -// `docs-llm/jaum-audit/028-schema-cache-remote-split.md`. +// async helpers needs a live Postgres / MySQL pool — owned by the +// critical-path / DB integration test harness. use sqlx::Row; diff --git a/httui-core/src/db/sql_scanner.rs b/httui-core/src/db/sql_scanner.rs index a27f7e59..565a248c 100644 --- a/httui-core/src/db/sql_scanner.rs +++ b/httui-core/src/db/sql_scanner.rs @@ -1,8 +1,8 @@ //! SQL-aware scanner shared by multi-statement detection, placeholder //! normalization, and bind count. //! -//! Extracted from `db::connections` (Epic 20a Story 01 — third -//! split). The scanner tracks whether the cursor is inside a single- +//! Extracted from `db::connections`. The scanner tracks +//! whether the cursor is inside a single- //! quoted string, a `--` line comment, or a `/* ... */` block comment //! so semicolon-/`?`-aware passes can ignore characters that look //! like statement boundaries or placeholders but aren't. diff --git a/httui-core/src/dotenv.rs b/httui-core/src/dotenv.rs index ad97b8b5..87619ab8 100644 --- a/httui-core/src/dotenv.rs +++ b/httui-core/src/dotenv.rs @@ -1,9 +1,8 @@ -//! `.env` auto-discovery: parse + classify + scan (Epic 54 Story 01). +//! `.env` auto-discovery: parse + classify + scan. //! //! Pure-string parsing + classification + a vault-root scanner that //! looks for `.env`-style files at the root and one level deep. The -//! Tauri command, banner UI, and import flow ship in Stories 02-04 of -//! Epic 54. +//! Tauri command, banner UI, and import flow ship in Stories 02-04 of. use once_cell::sync::Lazy; use regex::Regex; diff --git a/httui-core/src/executor/db/mod.rs b/httui-core/src/executor/db/mod.rs index 36465f32..f9cf6d57 100644 --- a/httui-core/src/executor/db/mod.rs +++ b/httui-core/src/executor/db/mod.rs @@ -21,7 +21,7 @@ struct DbParams { #[serde(default = "default_fetch_size")] fetch_size: u32, timeout_ms: Option, - /// `explain=true` info-string token (Epic 53 Story 01). When set, + /// `explain=true` info-string token. When set, /// the user's SQL is prefixed with the driver's `EXPLAIN ANALYZE … /// FORMAT JSON` form via `crate::explain::prefix_explain_sql`, the /// query runs once, and the JSON plan is extracted from the result @@ -30,13 +30,13 @@ struct DbParams { /// surface `ExplainError::Unsupported` verbatim to the consumer. #[serde(default)] explain: bool, - /// Session-scoped host override (V11 cenário 2). In-memory on the - /// frontend; passed per run. When set (with/without + /// Session-scoped host override. In-memory on the frontend; + /// passed per run. When set (with/without /// `session_port_override`) the run uses an override-keyed pool — /// the persisted connection record is never touched. #[serde(default)] session_host_override: Option, - /// Session-scoped port override (V11 cenário 2). + /// Session-scoped port override. #[serde(default)] session_port_override: Option, } @@ -97,7 +97,7 @@ impl DbExecutor { .unwrap_or(30_000) }; - // EXPLAIN swap (Epic 53 Story 01). When `explain=true`, replace + // EXPLAIN swap. When `explain=true`, replace // the user's SQL with the driver-prefixed form so the executor // returns the plan instead of the regular result set. Reject // multi-statement up-front — `EXPLAIN ANALYZE` over a script @@ -231,7 +231,7 @@ impl DbExecutor { let results = results?; - // EXPLAIN extraction (Epic 53 Story 01). The helper short- + // EXPLAIN extraction. The helper short- // circuits when `explain=false`; when true, it pulls the JSON // plan from the single-row result the driver returned and // applies the 200 KB cap. Calling unconditionally keeps the @@ -932,7 +932,7 @@ mod tests { assert_eq!(resp.results.len(), 1); } - // ───── V11 cenário 2: session host:port override ───── + // ───── session host:port override ──────────────────── #[tokio::test] async fn test_session_override_runs_against_override_keyed_pool() { @@ -961,12 +961,12 @@ mod tests { } } - // ───── Epic 53 Story 01: explain wiring ───── + // ───── explain wiring ─────────────────────── #[tokio::test] async fn test_explain_on_sqlite_returns_unsupported_error() { - // SQLite is explicitly unsupported per Epic 53 spec — the - // prefix builder errors out and the executor surfaces the + // SQLite is explicitly unsupported per spec — the prefix + // builder errors out and the executor surfaces the // driver name to the consumer. let (manager, conn_id) = setup_test_env().await; let executor = DbExecutor::new(manager); diff --git a/httui-core/src/explain/mod.rs b/httui-core/src/explain/mod.rs index ec08ae42..bace7f07 100644 --- a/httui-core/src/explain/mod.rs +++ b/httui-core/src/explain/mod.rs @@ -1,5 +1,5 @@ //! Unified `PlanNode` tree for `EXPLAIN ANALYZE` output across -//! drivers. Story 02 of Epic 53 ships the Postgres parser first +//! drivers. ships the Postgres parser first //! (most complete; canvas mock targets it). MySQL and MongoDB //! parsers carry to follow-up slices. //! diff --git a/httui-core/src/explain/node.rs b/httui-core/src/explain/node.rs index 7237d20e..c7e3ee33 100644 --- a/httui-core/src/explain/node.rs +++ b/httui-core/src/explain/node.rs @@ -1,6 +1,5 @@ //! Driver-agnostic plan-node shape. //! -//! Spec: `docs-llm/v1/backlog/53-sql-explain-analyze.md` Story 02. //! The fields are tuned for the canvas Workbench mock — `op` //! (e.g. "Limit"), `target` ("(rows=50)" / "r.created_at DESC"), //! `cost` ("0.42..18.7"), `rows`, `pct` (share of total cost diff --git a/httui-core/src/explain/prefix.rs b/httui-core/src/explain/prefix.rs index 5e4274d5..58a07118 100644 --- a/httui-core/src/explain/prefix.rs +++ b/httui-core/src/explain/prefix.rs @@ -1,4 +1,4 @@ -//! `EXPLAIN`-prefix builder for SQL drivers (Epic 53 Story 01). +//! `EXPLAIN`-prefix builder for SQL drivers. //! //! When a SQL block runs with `explain=true` in its info-string, the //! consumer (DB executor) swaps the user's SQL for an `EXPLAIN`-prefixed @@ -11,13 +11,13 @@ //! the executor. //! //! SQLite / BigQuery / Snowflake are explicitly unsupported per -//! Epic 53 spec ("best-effort or NOT supported with clear message"). +//! spec ("best-effort or NOT supported with clear message"). //! MongoDB is excluded too — it doesn't take SQL; the Mongo executor //! handles `db.collection.explain("executionStats")` separately. use std::fmt; -/// Body cap for stored EXPLAIN payloads. Per Epic 53 spec: "Body cap +/// Body cap for stored EXPLAIN payloads. Per spec: "Body cap /// 200 KB; truncate marker if exceeded". pub const EXPLAIN_BODY_CAP: usize = 200_000; diff --git a/httui-core/src/git/checkout.rs b/httui-core/src/git/checkout.rs index 0189d56f..dab2faeb 100644 --- a/httui-core/src/git/checkout.rs +++ b/httui-core/src/git/checkout.rs @@ -1,6 +1,6 @@ //! `git checkout` + `git checkout -b` — branch switching. //! Plus `git_checkout_conflict_path` for accepting one side of a -//! merge conflict (Epic 48 Story 06). +//! merge conflict. use std::path::Path; diff --git a/httui-core/src/git/clone.rs b/httui-core/src/git/clone.rs index 3a57f945..c471641a 100644 --- a/httui-core/src/git/clone.rs +++ b/httui-core/src/git/clone.rs @@ -1,4 +1,4 @@ -//! `git clone` — V1 vertical 1, cenário 2. +//! `git clone`. //! //! Shells out to `git clone /` using the //! system `git`. Auth (HTTPS PAT, SSH keys) is delegated to the diff --git a/httui-core/src/git/log.rs b/httui-core/src/git/log.rs index d1dd98aa..30613f42 100644 --- a/httui-core/src/git/log.rs +++ b/httui-core/src/git/log.rs @@ -47,7 +47,7 @@ pub fn git_log( /// Return the commit that first added `path` to the repo, following /// renames. `None` when the path doesn't appear in any commit (a new /// untracked file or a path the caller invented). Powers the -/// DocHeader meta strip's "author initials" chip (Epic 50 Story 03). +/// DocHeader meta strip's "author initials" chip. /// /// Implementation detail: `git log --follow --diff-filter=A -- ` /// returns every commit that *added* the path — usually one entry, diff --git a/httui-core/src/git/mod.rs b/httui-core/src/git/mod.rs index 236ccb2c..358a3fcd 100644 --- a/httui-core/src/git/mod.rs +++ b/httui-core/src/git/mod.rs @@ -1,6 +1,6 @@ //! Thin wrapper around the system `git` CLI for the in-app git -//! panel (Epic 20). Functions all accept a `vault_path: &Path` and -//! shell out to `git -C `. No `git2-rs` dependency — keeps +//! panel. Functions all accept a `vault_path: &Path` and shell out +//! to `git -C `. No `git2-rs` dependency — keeps //! the build slim and the surface easy to swap to libgit2 later if //! we need richer diff data. //! @@ -45,7 +45,7 @@ use std::process::{Command, Output}; /// True when `git check-ignore --quiet -- ` reports the path /// is ignored (exit 0). Returns `false` for every other outcome: /// path not ignored (exit 1), path outside a git repo (exit 128), -/// `git` not installed, IO failure, etc. Powers Epic 54 Story 04 +/// `git` not installed, IO failure, etc. Powers /// task 2 — the auto-discovery scanner uses this to skip e.g. /// `node_modules//.env` without baking the noisy-dir list /// any deeper. @@ -86,7 +86,7 @@ pub(crate) fn run_git>(vault: P, args: &[&str]) -> Result` +/// evaluator to decide whether a `branch: ` /// check passes. Cheap wrapper around `git rev-parse --abbrev-ref /// HEAD` — much lighter than `git_status` for callers that only /// need the branch name. diff --git a/httui-core/src/git/remote.rs b/httui-core/src/git/remote.rs index 5b38a6b0..59cc938f 100644 --- a/httui-core/src/git/remote.rs +++ b/httui-core/src/git/remote.rs @@ -1,6 +1,6 @@ //! `git remote -v` — list configured remotes. //! -//! Used by Epic 49's `` to populate the remotes list. +//! Used by the `` to populate the remotes list. //! Each remote has multiple lines (one per fetch / push direction); //! we deduplicate by name + URL so the popover sees one entry per //! `(name, url)` pair. diff --git a/httui-core/src/git/remote_host.rs b/httui-core/src/git/remote_host.rs index 90e439fc..02ad3d5d 100644 --- a/httui-core/src/git/remote_host.rs +++ b/httui-core/src/git/remote_host.rs @@ -1,6 +1,6 @@ //! Detect which forge a `git remote` URL points at. //! -//! Used by Epic 49 stories 02 + 03 to compose forge-specific URLs +//! Used by the stories 02 + 03 to compose forge-specific URLs //! (`/blob//` for GitHub, `/-/blob/...` //! for GitLab) and the compare/PR URL. Pure parsing; no network. //! @@ -82,7 +82,7 @@ pub fn parse_remote_url(url: &str) -> Option { let owner = segments[0].to_string(); // For nested GitLab groups (`group/subgroup/repo`), the repo is // the last segment and the owner is the first; the middle - // segments belong to the URL but Story 04's consumer only needs + // segments belong to the URL but the consumer only needs // owner/repo for the compose helpers. let repo = segments[segments.len() - 1].to_string(); if owner.is_empty() || repo.is_empty() { diff --git a/httui-core/src/git/staging.rs b/httui-core/src/git/staging.rs index 3feee50c..4dea1d09 100644 --- a/httui-core/src/git/staging.rs +++ b/httui-core/src/git/staging.rs @@ -1,5 +1,5 @@ //! `git add ` / `git reset HEAD ` / `git commit` — -//! stage / unstage / commit operations for Epic 48 Story 02. +//! stage / unstage / commit operations. use std::path::Path; diff --git a/httui-core/src/git/sync.rs b/httui-core/src/git/sync.rs index 8cc611de..7084c314 100644 --- a/httui-core/src/git/sync.rs +++ b/httui-core/src/git/sync.rs @@ -1,5 +1,4 @@ -//! `git fetch` / `git pull` / `git push` — sync ops for Epic 48 -//! Story 05. +//! `git fetch` / `git pull` / `git push` — sync ops. //! //! All three shell out to `git` and surface its output (stdout + //! stderr) verbatim so the consumer's toast can show exactly what @@ -48,8 +47,8 @@ pub fn git_fetch(vault: &Path, remote: Option<&str>) -> Result { /// `git pull [--ff-only] [ ]`. Both remote/branch /// are optional — passing None falls back to git's default upstream /// resolution. `ff_only` adds `--ff-only` so the 1-click Sync -/// (V10.1 cenário 3) never creates a surprise merge commit — a -/// non-fast-forward pull stops the flow and the user resolves it in +/// never creates a surprise merge commit — a non-fast-forward +/// pull stops the flow and the user resolves it in /// the detailed pane-tab. pub fn git_pull( vault: &Path, @@ -126,7 +125,7 @@ mod tests { fn pull_ff_only_builds_without_panicking() { // No remote configured, so the pull errors — but the // `--ff-only` arg branch must build cleanly (guards the - // V10.1 cenário 3 Sync path). + // Sync path). let dir = TempDir::new().unwrap(); init_repo(dir.path()); std::fs::write(dir.path().join("a"), "x").unwrap(); diff --git a/httui-core/src/preflight/evaluator.rs b/httui-core/src/preflight/evaluator.rs index c3822b6a..1b1482d4 100644 --- a/httui-core/src/preflight/evaluator.rs +++ b/httui-core/src/preflight/evaluator.rs @@ -1,4 +1,4 @@ -//! Pre-flight evaluator (Epic 51 Story 02). +//! Pre-flight evaluator. //! //! Pure logic — `EvaluationContext` carries the in-memory snapshots //! the consumer collected (active env vars, branch, connection @@ -7,7 +7,7 @@ //! `FileExists` and `Command` checks need filesystem / process //! access; the pure evaluator returns `Skip { reason: "needs FS/proc //! evaluation" }` for those — a thin consumer-side wrapper layers -//! the syscalls on top once Story 03's UI mount lands. Keeping them +//! the syscalls on top once the UI mount lands. Keeping them //! out of the pure layer keeps the evaluator deterministic and //! easy to test. //! diff --git a/httui-core/src/preflight/io_evaluator.rs b/httui-core/src/preflight/io_evaluator.rs index dbdec7d1..6037bc3a 100644 --- a/httui-core/src/preflight/io_evaluator.rs +++ b/httui-core/src/preflight/io_evaluator.rs @@ -1,4 +1,4 @@ -//! IO-aware pre-flight evaluator (Epic 51 Story 02 carry-over). +//! IO-aware pre-flight evaluator. //! //! The pure evaluator returns `Skip { reason: "needs FS/proc evaluation" }` //! for `FileExists` and `Command` because those need filesystem and diff --git a/httui-core/src/preflight/mod.rs b/httui-core/src/preflight/mod.rs index f43dc2dd..9ad287ba 100644 --- a/httui-core/src/preflight/mod.rs +++ b/httui-core/src/preflight/mod.rs @@ -3,10 +3,10 @@ //! Canvas §4 mocks a row of pills above the runbook body — one per //! item from the YAML frontmatter `preflight:` block-list. Each //! item declares one of six check kinds (connection / env_var / -//! branch / keychain / file_exists / command); Story 02 evaluates +//! branch / keychain / file_exists / command); evaluates //! them against vault context. //! -//! Story 01 (this slice) ships only the parser. The parser reads +//! (this slice) ships only the parser. The parser reads //! the raw frontmatter region produced by `crate::frontmatter` — //! the slice-1 YAML parser keeps block-list children verbatim in //! `raw_yaml`, so this module owns the typed extraction for the diff --git a/httui-core/src/preflight/parser.rs b/httui-core/src/preflight/parser.rs index 0cb32c20..03a80ae8 100644 --- a/httui-core/src/preflight/parser.rs +++ b/httui-core/src/preflight/parser.rs @@ -15,7 +15,7 @@ //! the expected shape is dropped (with no error) so the surrounding //! frontmatter parser stays generic. Items with unknown keys are //! recorded as `PreflightItem::Unknown` for forward-compat — the -//! evaluator (Story 02) can choose to surface them as `Skip { reason +//! evaluator can choose to surface them as `Skip { reason //! "unknown check kind" }` later. use serde::Serialize; @@ -163,7 +163,7 @@ mod tests { #[test] fn parse_records_keychain_as_unknown_kind() { - // V6 cenário 9: keychain was removed from the typed set. Legacy + // keychain was removed from the typed set. Legacy // YAML that still uses it falls through to Unknown so the file // doesn't break — the pill renders as a skip with the key. let raw = "preflight:\n - keychain: payments-db.password\n"; diff --git a/httui-core/src/references.rs b/httui-core/src/references.rs index 6ad01508..04ff8b8d 100644 --- a/httui-core/src/references.rs +++ b/httui-core/src/references.rs @@ -312,7 +312,7 @@ mod tests { assert_eq!(resolved["url"], "{{UNKNOWN}}/api"); } - // ─────── Epic 16 L166: prototype pollution defense ─────── + // ─────── L166: prototype pollution defense ─────────────── #[test] fn navigate_json_blocks_prototype_pollution_keys() { diff --git a/httui-core/src/run_bodies.rs b/httui-core/src/run_bodies.rs index 70e10623..abc14d3c 100644 --- a/httui-core/src/run_bodies.rs +++ b/httui-core/src/run_bodies.rs @@ -1,9 +1,9 @@ -//! Block run-body cache (Epic 47 Story 01). +//! Block run-body cache. //! //! Per-run response bodies live on disk at //! `/.httui/runs///.` — -//! gitignored by default (`.httui/` is part of Epic 17's auto-block). -//! `block_run_history` (SQLite, Story 24.6) stores metadata; this +//! gitignored by default (`.httui/` is part of the auto-block). +//! `block_run_history` (SQLite) stores metadata; this //! module owns the body bytes that were too large to live there. //! //! Contract: @@ -179,7 +179,7 @@ pub fn trim_run_bodies( /// Move every cached run body for `(file_path, old_alias)` to /// `(file_path, new_alias)`. Powers the "alias rename" carry from -/// Epic 47 Story 05: when the user renames a block's `alias=` info- +/// when the user renames a block's `alias=` info- /// string token, the on-disk run history follows so older diffs /// stay reachable from the new alias. /// diff --git a/httui-core/src/runner.rs b/httui-core/src/runner.rs index 63093425..6f4b2e15 100644 --- a/httui-core/src/runner.rs +++ b/httui-core/src/runner.rs @@ -352,7 +352,7 @@ mod tests { assert_eq!(result.data["body"]["ok"], true); } - // ─────── Epic 16 L166: deep dependency chain DoS ─────── + // ─────── L166: deep dependency chain DoS ─────────────── #[tokio::test] async fn deep_dependency_chain_rejects_above_max_depth() { diff --git a/httui-core/src/secrets/mod.rs b/httui-core/src/secrets/mod.rs index c665494b..7a6b7ea0 100644 --- a/httui-core/src/secrets/mod.rs +++ b/httui-core/src/secrets/mod.rs @@ -2,7 +2,7 @@ //! upcoming alternatives (Touch ID, Stronghold, 1Password CLI, pass). //! //! The MVP path lives in [`crate::db::keychain`] and uses the OS -//! keychain via the `keyring` crate. Epic 13 introduces this module +//! keychain via the `keyring` crate. introduces this module //! as the boundary against which Epics 14–16 add new backends. For //! v1 every backend is local — there is no remote secret backend //! shipped with the desktop app. @@ -11,8 +11,8 @@ //! //! The old shape — free `store_secret`, `get_secret`, `delete_secret` //! in `db::keychain` — couples every caller to "the OS keychain is -//! the answer". Once we add Touch ID (Epic 14), Windows Hello -//! (Epic 15) and 1Password (Epic 16), the resolver needs to dispatch +//! the answer". Once we add Touch ID, Windows Hello +//! and 1Password, the resolver needs to dispatch //! by reference type (`{{keychain:...}}` vs `{{1password:...}}` vs //! `{{pass:...}}`). The trait gives us a single object the resolver //! can hold without import-tangling each backend's module. @@ -34,7 +34,7 @@ pub mod parser; /// Errors a backend can return. Kept as a plain `String` for now — /// matches the existing `db::keychain` error type and keeps the -/// boundary low-friction. Will tighten in Epic 13's prompt-fix +/// boundary low-friction. Will tighten in the prompt-fix /// follow-up commit if we need to distinguish "user denied" from /// "system error". pub type SecretError = String; diff --git a/httui-core/src/secrets/parser.rs b/httui-core/src/secrets/parser.rs index 06f1271a..2e370e35 100644 --- a/httui-core/src/secrets/parser.rs +++ b/httui-core/src/secrets/parser.rs @@ -11,10 +11,10 @@ //! ([`crate::db::keychain::resolve_secret_ref`] and //! [`crate::vault_config::validate::is_secret_ref`]) stay as thin //! wrappers so existing callers don't break — they delegate here in a -//! follow-up commit (Epic 19 cutover or earlier opportunistic work). +//! follow-up commit (or earlier opportunistic work). /// Backends recognised by the parser. New backends are added when their -/// epic lands (Epic 16 introduces `1password`, etc.). +/// epic lands (introduces `1password`, etc.). const KNOWN_BACKENDS: &[&str] = &["keychain", "1password", "pass", "env"]; /// Returns `true` when `s` is a structurally valid `{{backend:address}}` diff --git a/httui-core/src/tag_index.rs b/httui-core/src/tag_index.rs index 8353c7be..a077970a 100644 --- a/httui-core/src/tag_index.rs +++ b/httui-core/src/tag_index.rs @@ -1,4 +1,4 @@ -//! Vault-wide frontmatter tag index (Epic 52 Story 04). +//! Vault-wide frontmatter tag index. //! //! Walks `.md` files in the vault, parses YAML frontmatter, and //! extracts the `tags:` flow-list. Returns one `TagEntry` per file diff --git a/httui-core/src/templates.rs b/httui-core/src/templates.rs index f4129f84..bf0fe62e 100644 --- a/httui-core/src/templates.rs +++ b/httui-core/src/templates.rs @@ -1,4 +1,4 @@ -//! Template registry — Epic 41 Story 04 carry. +//! Template registry — carry. //! //! The empty-state Templates card needs a list of available //! templates to render its `+ N templates →` count and to seed the diff --git a/httui-core/src/var_uses.rs b/httui-core/src/var_uses.rs index 2185905d..e4fcc7a2 100644 --- a/httui-core/src/var_uses.rs +++ b/httui-core/src/var_uses.rs @@ -1,4 +1,4 @@ -//! Vault grep for variable references — Epic 43 Story 04. +//! Vault grep for variable references. //! //! Scans every `*.md` under the vault for occurrences of a specific //! variable key in the canonical reference forms `{{KEY}}` and diff --git a/httui-core/src/vault_config/connection_traits.rs b/httui-core/src/vault_config/connection_traits.rs index ec8016f9..2b1b7959 100644 --- a/httui-core/src/vault_config/connection_traits.rs +++ b/httui-core/src/vault_config/connection_traits.rs @@ -13,7 +13,7 @@ //! Existing `match` arms across the codebase don't need touching — //! they all collapse to `connection.as_dyn().method()` calls. //! -//! Extracted in Epic 20a Story 03 (OCP fix per `tech-debt.md`). +//! Extracted (OCP fix per `tech-debt.md`). use super::connections::{ BigqueryConfig, CommonFields, Connection, GraphqlConfig, GrpcConfig, HttpConfig, MongoConfig, diff --git a/httui-core/src/vault_config/connection_views.rs b/httui-core/src/vault_config/connection_views.rs index 0484dfa4..a3fdc0d4 100644 --- a/httui-core/src/vault_config/connection_views.rs +++ b/httui-core/src/vault_config/connection_views.rs @@ -3,11 +3,11 @@ //! `db::connections::Connection` struct that the pool manager still //! consumes. //! -//! Extracted from `connections_store.rs` (Epic 20a Story 02). The -//! pure variant accessors (`driver_string_for`, `host_of`, …) live +//! Extracted from `connections_store.rs`. The pure variant +//! accessors (`driver_string_for`, `host_of`, …) live //! here too — they're shared between the public view and the legacy -//! adapter, and they're the OCP target Story 03 replaces with -//! `trait DbConnection`. Keeping them in one module makes the trait +//! adapter, and they're the OCP target replaces with `trait +//! DbConnection`. Keeping them in one module makes the trait //! migration a one-file refactor. use serde::Serialize; @@ -122,7 +122,7 @@ pub(super) fn to_public(name: &str, c: &Connection) -> ConnectionPublic { /// usable for an actual DB connection. /// /// This adapter dies when the legacy `db::connections::Connection` -/// shape is removed (post Epic 19 frontend cutover). +/// shape is removed (post frontend). pub(super) fn to_legacy(name: &str, c: &Connection) -> Result { let view = c.as_dyn(); let password = match view.password() { diff --git a/httui-core/src/vault_config/create.rs b/httui-core/src/vault_config/create.rs index 12bb4839..f7f4f48d 100644 --- a/httui-core/src/vault_config/create.rs +++ b/httui-core/src/vault_config/create.rs @@ -1,4 +1,4 @@ -//! `create_new_vault` — V1 vertical 1, cenário 3. +//! `create_new_vault`. //! //! Composes the "Create vault" empty-state flow: //! diff --git a/httui-core/src/vault_config/environments_store.rs b/httui-core/src/vault_config/environments_store.rs index 3dce895c..15b43901 100644 --- a/httui-core/src/vault_config/environments_store.rs +++ b/httui-core/src/vault_config/environments_store.rs @@ -35,10 +35,10 @@ pub struct EnvironmentPublic { pub color: Option, pub var_count: usize, pub secret_count: usize, - /// Canvas §6 Story 03 — `[meta].temporary`. Drives the + /// Canvas §6 `[meta].temporary`. Drives the /// `temporary` chip in the Environments page. pub temporary: bool, - /// Canvas §6 Story 03 — `[meta].connections_used` allowlist. + /// Canvas §6 `[meta].connections_used` allowlist. /// Empty list means "all connections". pub connections_used: Vec, } diff --git a/httui-core/src/vault_config/envs.rs b/httui-core/src/vault_config/envs.rs index bdc0625d..0c7f3dca 100644 --- a/httui-core/src/vault_config/envs.rs +++ b/httui-core/src/vault_config/envs.rs @@ -36,12 +36,12 @@ pub struct EnvMeta { #[serde(default)] pub color: Option, - /// Canvas §6 Story 03 — true marks the env as a throw-away (the + /// Canvas §6 true marks the env as a throw-away (the /// UI surfaces a `temporary` chip; user cleanup remains manual). #[serde(default)] pub temporary: bool, - /// Canvas §6 Story 03 — allowlist of connection IDs this env + /// Canvas §6 allowlist of connection IDs this env /// may target. Empty list (default) means "all connections in /// the vault are visible while this env is active". #[serde(default)] @@ -139,7 +139,7 @@ connections_used = ["pg-staging", "redis-cache"] #[test] fn pre_existing_envs_load_without_the_new_meta_fields() { - // Lazy-migration: an env file written before Story 03 has no + // Lazy-migration: an env file written before has no // `temporary` or `connections_used` keys. It must still parse // and return defaults. let raw = r#" diff --git a/httui-core/src/vault_config/error.rs b/httui-core/src/vault_config/error.rs index 9e9ebcff..64c28d39 100644 --- a/httui-core/src/vault_config/error.rs +++ b/httui-core/src/vault_config/error.rs @@ -6,8 +6,8 @@ //! `{ code, message, details? }` and the frontend can switch on the //! code for retry / display logic. //! -//! Story 06 of Epic 20a defined this surface; the migration of -//! existing call sites is incremental and lands across follow-up +//! defined this surface; the migration of existing call sites +//! is incremental and lands across follow-up //! commits. New code should reach for `VaultConfigError` / //! `ConnectionsError` directly; legacy callers continue with //! `Result<_, String>` until rewired. diff --git a/httui-core/src/vault_config/migration.rs b/httui-core/src/vault_config/migration.rs index c8073b3a..931eaf35 100644 --- a/httui-core/src/vault_config/migration.rs +++ b/httui-core/src/vault_config/migration.rs @@ -78,7 +78,7 @@ pub struct MigrationOptions { pub backup: bool, /// Path of the per-machine `user.toml`. Currently only used to /// satisfy `EnvironmentsStore::new`; the prefs migration that - /// would actually touch this file is deferred to Epic 19. + /// would actually touch this file is deferred to. pub user_config_path: PathBuf, } @@ -162,7 +162,7 @@ pub async fn run_migration( /// Migrate the seven UI prefs keys from `app_config` into the /// per-machine `user.toml [ui]` section. See audit-005 for the /// scope decision and the original audit -/// `docs-llm/v1/audit-app-config-keys.md` for the per-key +/// for the per-key /// classification. async fn migrate_prefs( pool: &SqlitePool, @@ -235,7 +235,7 @@ async fn get_pref(pool: &SqlitePool, key: &str) -> Result, String /// `{ mode, accent, ... }` per `stores/settings.ts`. We only /// migrate `mode` into the `theme` string; accent/etc. are /// per-machine UI niceties that the new `[ui]` section doesn't -/// have room for yet — Epic 27+ will expand the schema if needed. +/// have room for yet — + will expand the schema if needed. /// Returns `true` when at least the `mode` field was extracted. fn apply_theme_json(raw: &str, out: &mut UiPrefs) -> bool { let Ok(value) = serde_json::from_str::(raw) else { @@ -359,7 +359,7 @@ mod tests { use crate::db::init_db; use tempfile::TempDir; - // --- Detection tests (Epic 41 Story 07 carry slice 2) ---------------- + // --- Detection tests ------------------------------------------------- #[test] fn detect_returns_neither_for_empty_vault() { diff --git a/httui-core/src/vault_config/missing_secrets.rs b/httui-core/src/vault_config/missing_secrets.rs index 3141e383..ce186d66 100644 --- a/httui-core/src/vault_config/missing_secrets.rs +++ b/httui-core/src/vault_config/missing_secrets.rs @@ -1,9 +1,9 @@ //! Scan a vault for `{{keychain:...}}` references whose values are -//! missing from the local keychain (Epic 18 / Story 01). +//! missing from the local keychain. //! //! On a freshly cloned vault every `{{keychain:...}}` ref points at //! a key that doesn't yet exist on this machine. The first-run flow -//! (Story 02) batch-prompts the user once instead of forcing a +//! batch-prompts the user once instead of forcing a //! prompt-per-execution. This module walks `connections.toml` and //! `envs/*.toml`, collects every reference, and asks the //! [`SecretBackend`] which ones are missing. diff --git a/httui-core/src/vault_config/mod.rs b/httui-core/src/vault_config/mod.rs index ea67278a..23870d58 100644 --- a/httui-core/src/vault_config/mod.rs +++ b/httui-core/src/vault_config/mod.rs @@ -1,6 +1,6 @@ //! Vault configuration files (TOML). //! -//! Implements the schemas defined in ADR 0001 (`docs-llm/v1/adr/`): +//! Implements the schemas defined in ADR 0001: //! //! - `connections.toml` — connection definitions //! - `envs/{name}.toml` — per-environment vars and secrets diff --git a/httui-core/src/vault_config/scaffold.rs b/httui-core/src/vault_config/scaffold.rs index 2873b898..43f78f7e 100644 --- a/httui-core/src/vault_config/scaffold.rs +++ b/httui-core/src/vault_config/scaffold.rs @@ -1,4 +1,4 @@ -//! Vault scaffolding + validation (Epic 17 foundation). +//! Vault scaffolding + validation (foundation). //! //! Two pure operations live here: //! @@ -12,7 +12,7 @@ //! the local-overrides block (ADR 0004). //! //! Frontend wiring (welcome screen, git clone progress, modal -//! forms) lives in upcoming UI work — Epic 17 Stories 01 + 03. +//! forms) lives in upcoming UI work. use std::path::Path; diff --git a/httui-core/src/vault_config/secret_resolver.rs b/httui-core/src/vault_config/secret_resolver.rs index 363d9393..f7f269fa 100644 --- a/httui-core/src/vault_config/secret_resolver.rs +++ b/httui-core/src/vault_config/secret_resolver.rs @@ -7,7 +7,7 @@ //! owns that bridge so neither store repeats the parsing or keychain //! plumbing inline. //! -//! Extracted in Epic 20a Story 02 from `connections_store.rs` (where +//! Extracted from `connections_store.rs` (where //! it lived as `ensure_password_ref` / `parse_keychain_ref` / //! `resolve_password_ref` / `format_password_ref`). The same module is //! reused by `environments_store.rs` for env-var secrets. diff --git a/httui-core/src/vault_config/user.rs b/httui-core/src/vault_config/user.rs index 368c4ec6..8fbe871b 100644 --- a/httui-core/src/vault_config/user.rs +++ b/httui-core/src/vault_config/user.rs @@ -62,31 +62,30 @@ pub struct UiPrefs { #[serde(default = "default_sidebar_open")] pub sidebar_open: bool, /// Git side-panel (VS-Code-style SCM column) open/closed. - /// V10.1 cenário 1 — persists across launches. Default closed. + /// persists across launches. Default closed. #[serde(default)] pub git_side_panel_open: bool, /// Commit-message template for the git side panel. V10.1 - /// cenário 8. Empty = use the built-in conditional default + /// Empty = use the built-in conditional default /// ("Update " / "Update N notes"). Placeholders: /// `{{notes}}`, `{{count}}`, `{{date}}`. #[serde(default)] pub git_commit_template: String, /// Color mode: `"system" | "light" | "dark"`. Frontend wires it /// to Chakra/next-themes via ``. Separate from - /// `theme` (legacy customisation JSON pending Epic 19 sweep). + /// `theme` (legacy customisation JSON pending a future sweep). #[serde(default = "default_color_mode")] pub color_mode: String, /// True when the user has dismissed the MVP-to-v1 migration /// banner. Surfaced in the Empty state when a legacy `notes.db` /// is detected without a `.httui/` v1 layout. Once dismissed, - /// the banner stays hidden across launches (Epic 41 Story 07 - /// carry). + /// the banner stays hidden across launches (carry). #[serde(default)] pub mvp_migration_dismissed: bool, /// True when quick-open should hide files whose frontmatter /// `status:` is `archived`. Default `false` (archived files - /// still surface). Epic 52 Story 06 task 3 — the toggle the - /// settings UI flips. The actual filter applies inside the + /// still surface). the toggle the settings UI flips. The + /// actual filter applies inside the /// quick-open ranker; this flag only persists the user's /// choice. #[serde(default)] @@ -100,7 +99,7 @@ pub struct UiPrefs { pub shortcut_profile: String, /// Opt-in to receive pre-release auto-updates (`-rc`, `-beta`, /// `-alpha` tags). Default `false`: the updater only offers - /// stable releases. V12 cenário 9 — the Settings toggle flips + /// stable releases. the Settings toggle flips /// this; `useAutoUpdate` reads it to gate the update prompt. #[serde(default)] pub auto_update_include_prereleases: bool, diff --git a/httui-core/src/vault_config/workspace.rs b/httui-core/src/vault_config/workspace.rs index 871b3739..a40bb191 100644 --- a/httui-core/src/vault_config/workspace.rs +++ b/httui-core/src/vault_config/workspace.rs @@ -41,8 +41,8 @@ pub struct WorkspaceDefaults { /// Per-field origin marker returned alongside [`WorkspaceDefaults`] by /// [`super::workspace_store::WorkspaceStore::defaults_with_sources`]. -/// Powers the "overridden locally" badge in the Settings UI (V3 -/// cenário 3): a `Local` source means the value lives in +/// Powers the "overridden locally" badge in the Settings UI: a +/// `Local` source means the value lives in /// `workspace.local.toml`, not the committed base file. #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] diff --git a/httui-core/src/vault_config/workspace_store.rs b/httui-core/src/vault_config/workspace_store.rs index 6ab4c059..dabff7ab 100644 --- a/httui-core/src/vault_config/workspace_store.rs +++ b/httui-core/src/vault_config/workspace_store.rs @@ -129,7 +129,7 @@ impl WorkspaceStore { /// Same as [`defaults`](Self::defaults) but also reports which /// fields originate from `workspace.local.toml`. Powers the - /// "overridden locally" badges in the Settings UI (V3 cenário 3). + /// "overridden locally" badges in the Settings UI. /// /// A field is `Source::Local` iff the `[defaults]` table in the /// `.local.toml` sibling has that key, regardless of whether the @@ -203,8 +203,8 @@ impl WorkspaceStore { /// Set the `docheader_compact` flag for `file_path`. Same prune /// semantics as `set_file_auto_capture` — defaulted entries are - /// removed so workspace.toml stays minimal. Powers Epic 50 - /// Story 06's compact-mode persistence. + /// removed so workspace.toml stays minimal. Powers + /// the compact-mode persistence. pub async fn set_file_docheader_compact( &self, file_path: &str, diff --git a/httui-core/src/vaults.rs b/httui-core/src/vaults.rs index dbbc0915..1ed8a5b1 100644 --- a/httui-core/src/vaults.rs +++ b/httui-core/src/vaults.rs @@ -9,7 +9,7 @@ //! //! Mirror of the desktop logic in `src/lib/tauri/commands.ts:79-108`. //! Living in the core lets desktop, TUI and MCP converge on the same -//! semantics (Epic 22). +//! semantics. use sqlx::sqlite::SqlitePool; diff --git a/httui-desktop/eslint.config.js b/httui-desktop/eslint.config.js index 7c8ae6c3..79952a4b 100644 --- a/httui-desktop/eslint.config.js +++ b/httui-desktop/eslint.config.js @@ -53,8 +53,8 @@ export default tseslint.config( // tech-debt.md) generate ~90 hits today. Flipping to `error` // would either block every PR touching those files or force a // wave of `// eslint-disable-next-line` graffiti. Warnings keep - // the signal during code review without gating CI; Epic 30a is - // where they get retired. + // the signal during code review without gating CI; a later + // refactor is where they get retired. // // Thresholds chosen pragmatically: // - complexity 15: clippy uses cognitive_complexity = 50 in diff --git a/httui-desktop/src-tauri/Entitlements.plist b/httui-desktop/src-tauri/Entitlements.plist index d6cbb96b..9451c819 100644 --- a/httui-desktop/src-tauri/Entitlements.plist +++ b/httui-desktop/src-tauri/Entitlements.plist @@ -1,8 +1,8 @@