Skip to content

feat: add internal/config package and upgrade to Go 1.26#22

Merged
kostyay merged 10 commits into
mainfrom
feat/config-package-go126
Feb 16, 2026
Merged

feat: add internal/config package and upgrade to Go 1.26#22
kostyay merged 10 commits into
mainfrom
feat/config-package-go126

Conversation

@kostyay

@kostyay kostyay commented Feb 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add internal/config package for persistent JSON config (~/.httpmon/config.json) with Load/Save, default backfill, CLI flag overrides via ApplyFlags, and MCP token migration from legacy mcp-token file
  • Upgrade Go from 1.25.3 to 1.26.0 and golangci-lint to v2.9.0, resolving the race detector toolchain version mismatch
  • Add MCP server documentation to README (start commands, bearer token, Claude Code setup, tool reference)

Test plan

  • go test -race ./internal/config/ — 10 tests, 92.3% coverage
  • make all passes (lint + test + build)
  • Verify httpmon --mcp-token prints token correctly
  • Verify config persists across runs in ~/.httpmon/config.json

🤖 Generated with Claude Code

kostyay and others added 10 commits February 16, 2026 21:55
Add persistent config support via ~/.httpmon/config.json with Load/Save,
CLI flag overrides, and MCP token migration from legacy mcp-token file.
Upgrade Go from 1.25.3 to 1.26.0 and golangci-lint to v2.9.0 to resolve
race detector toolchain mismatch. Update README with MCP server docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These are by-design: repeat/compose send user-initiated requests through
the local proxy, and the editor command comes from $VISUAL/$EDITOR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Load persistent config on startup, overlay CLI flags via ApplyFlags.
Use cfg.ProxyPort, cfg.BufferSize, cfg.MCPEnabled, cfg.MCPAddr,
cfg.ThrottlePreset instead of raw flag values. MCP token now managed
via config.LoadOrCreateToken. Pass DataDir into TUI AppConfig for
future settings screen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Centered popup with 7 fields: ProxyPort, MCPEnabled, MCPAddr,
BufferSize, ThrottlePreset, ListMode, TreeGroupBy. Bool/enum fields
toggle on Enter, int/string fields open textinput. Esc saves to disk.
Fields requiring restart show (restart) hint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Promote feat/mcp-server to PR #20 link. Add feat/config-package-go126
section covering persistent config, TUI settings screen, Go 1.26 upgrade.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract settingsFieldDisplay to deduplicate format logic, simplify
bool toggle to one-liner, fix struct field alignment, remove comments
that restate obvious code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kostyay kostyay merged commit 6d0c0f8 into main Feb 16, 2026
@kostyay kostyay deleted the feat/config-package-go126 branch February 16, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant