Skip to content

fix(xdebug-trace): drop xdebug-trace from the UI menu when its temp dir cannot be made - #413

Merged
butschster merged 2 commits into
masterfrom
fix/xdebug-trace-disabled-menu
Nov 8, 2026
Merged

butschster merged 2 commits into
masterfrom
fix/xdebug-trace-disabled-menu

Conversation

@butschster

Copy link
Copy Markdown
Member

What

Follow-up to #412 (Xdebug Trace v1, GitHub #288). In memory mode, when the trace temp dir cannot be made, the module already stays unregistered and logs why, but /api/settings still listed xdebug-trace: the UI showed «Xdebug traces» and uploads fell through to http-dump.

  • ModulesConfig.Disable(type) turns a module off at runtime; IsEnabled and Disable share one type → field switch.
  • main.go: on the temp dir error, cfg.Modules.Disable("xdebug-trace") before app.New, so EnabledTypes (the UI menu) drops it.

Tests

  • TestModulesConfig_Disable: disabled type is off and missing from EnabledTypes, unknown type is a no-op.
  • go vet + go test -race -count=1 ./internal/app/ ./modules/xdebugtrace/ ok.
  • Live: binary with TMPDIR=/nonexistent-dir and var-dump: false → log xdebug-trace: cannot create temp dir; module disabled, /api/settings events without xdebug-trace.

Base: master (after #412, merged).

@butschster
butschster merged commit 44223c8 into master Nov 8, 2026
1 check passed
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