Commit Graph
19 Commits
Author SHA1 Message Date
teste.inabaandClaude Sonnet 5 2fecad021b fix: persist host port and compat mode in config.toml
The host-side port mapping and seccomp compatibility-mode selections
were only used in-memory for docker run args and never written to
config.toml, so a re-run of the installer couldn't recover them as
form defaults (worse, the host port field silently defaulted to the
container's internal port). Add host_port and seccomp_unconfined to
[server] and decode them back via AppConfig.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 15:08:24 -03:00
teste.inaba a05b98fdf5 feat: auto-update app-dono-cliente when a new image is pushed to :latest
Adds a StepRunUpdater step that starts app-dono-updater after the app
container comes up: a poll loop (docker pull, compare image IDs,
recreate on change) baked into the official docker:cli image via
`sh -c`, reusing the same docker run argv as the initial container
start so the two can't drift.

Not built on Watchtower: containrrr/watchtower was archived upstream
in Dec 2025 with no maintained successor recommended for production
use, so this avoids taking on that dependency.
2026-08-26 12:30:44 -03:00
jbandClaude Opus 4.8 ef126eaf61 feat: add build-stamped version with --version flag and TUI header
Introduce tui.Version (defaults to "dev"), stamped at build time via a
VERSION_LDFLAG in the Makefile (-X .../internal/tui.Version=$(VERSION))
across all build targets. main.go handles "--version"/"-v" before
launching the TUI, and the version is shown next to the title in the
header. Docs updated (README + CLAUDE).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 14:57:05 -03:00
jbandClaude Opus 4.8 920fa5e904 refactor: show placeholder for certificate directory field too
Drop the hardcoded dummy fallback for Certificates.DirPath in loadConfig
so the field shows its placeholder instead of a pre-filled value, matching
the DB URL and central server URL fields. An existing config.toml still
seeds it on re-run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 12:31:53 -03:00
jbandClaude Opus 4.8 d4ed79115c refactor: show placeholder for DB URL and central server URL fields
Drop the hardcoded dummy fallbacks for Database.URL and
Application.CentralServerURL in loadConfig so these inputs display their
placeholder instead of a pre-filled value. An existing config.toml still
seeds them on re-run via the decode, so real defaults are preserved.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 12:30:57 -03:00
jbandClaude Opus 4.8 9943d5f7b7 fix: render full placeholder text in form inputs
bubbles/v2 textinput truncates the placeholder to its first rune when the
input width is 0 (the default): it sizes the placeholder buffer to
Width()+1 and early-returns after the first character. Set a non-zero
width on every text input (defaultInputWidth) and resize inputs
responsively to the terminal on WindowSizeMsg via FormStep.SetWidth, so
placeholders render in full and inputs fill the available width.

Adds a regression test asserting the placeholder renders past its first
rune.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 12:28:34 -03:00
jbandClaude Opus 4.8 255b4cc299 feat: add back navigation, review step, and error retry to TUI
Implements three UX improvements (TODO #1–#3):

- Back navigation: Esc returns to the previous input step. The Model keeps
  a history stack of input steps (advance/goBack helpers); action/wait
  steps are excluded via isInputStep so back never re-enters a
  side-effecting step. Form values are preserved.
- Review step (StepReview): shows all collected config for confirmation
  before any file is written; Enter installs, Esc edits.
- Retry vs. fix: transient failures (image pull, container run) offer
  "r: tentar novamente" instead of quitting; validation failures route
  back to the relevant form to correct the value.

Adds nav_test.go for the history/navigation logic and updates
README/CLAUDE/docs (incl. docs/TODO.md tracking the remaining ideas).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 12:19:49 -03:00
jbandClaude Opus 4.8 3edfaa4ab2 test: add unit tests for config generation and form values
Cover the deploy-critical pure logic:

- GenerateConfigTOML: round-trip decode of values + a guard asserting the
  config port is always containerAppPort (host port must not leak)
- GenerateWireguardConfig: MTU emitted/commented, PROTO default UDP
- WriteConfigFile / WriteWireguardConfigFile: numeric validation rejects
  bad input and does not write a file
- FormStep.Values(): text/password/select resolution and select default
  fallback

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 12:04:31 -03:00
jbandClaude Opus 4.8 d2717de47a refactor: clarify fixed container port with containerAppPort constant
The container always listens on 8080 internally while the user-provided
port is only the host-side mapping. Make this explicit without changing
behavior or the generated config:

- add a named containerAppPort constant and use it in both the docker -p
  mapping and the config.toml generation (was a bare 8080 literal in two
  places)
- document why config.toml hardcodes the port, so it isn't "fixed" back
  to the form value
- relabel the form field to "Porta (host)"

The generated config.toml is byte-identical (port = 8080).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 12:00:54 -03:00
jbandClaude Opus 4.8 6becd3462d refactor: unify image download into a single DownloadImageCmd
DownloadImageCmd and DownloadWireguardImageCmd were identical except for
the image URL. Collapse them into one DownloadImageCmd that takes the
image as a parameter, passing imageName/wireguardImageName at the call
sites.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 11:54:08 -03:00
jbandClaude Opus 4.8 3379ada59a fix: print docker output in network error and use networkName constant
The network creation error format string had a trailing "output" with no
verb, silently dropping the captured docker output. Add the missing %s.
Also replace the hardcoded "app-dono_app" literal with the networkName
constant in RunAppClienteContainer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 11:54:02 -03:00
teste.inaba 009c4bc8d1 fix: adicionar opção de segurança para compatibilidade
deu pau pra rodar no vdm
2026-05-29 14:51:44 -03:00
teste.inaba dedbae0c07 fix: criar container com usuário, logs json e criar network 2026-05-20 16:09:58 -03:00
teste.inaba 0fc3c65259 fix: porta do container deve ser hardcodada, ops 2026-04-20 17:45:43 -03:00
teste.inaba 219dcc78bd feat: trocar configurações de certificado
Agora a emissão e renovação de certificado é automática.
2026-04-09 17:31:10 -03:00
jb 0753745115 feat: changed port binding 2026-03-12 10:23:22 -03:00
jb c622abf194 feat: wireguard / vproxy configuration 2026-03-11 16:00:26 -03:00
jb 085cda7251 feat: implemented all features besides wireguard 2026-03-11 11:01:35 -03:00
jb 6870144f39 feat: main flow created 2026-03-09 11:37:43 -03:00