Skip to content

bug: /api/actions/launch telemetry is dead — getattr(state, "logger", None) is always None, profiles.log never records web-UI launches #213

Open

Description

@falbany

Description

Every launch made through the web UI produces no telemetry: src/profiles/server/routes/actions.py:121 fetches the logger with

logger = getattr(state, "logger", None) if state else None

but ServerState (src/profiles/server/state.py) has no logger field and nothing in the repository ever assigns one — so logger is always None. launch_selected_file(..., logger=None) then skips every events.file_launched / file_launch_failed / workflow-step emission (all guarded by if logger is not None in src/profiles/core/actions.py).

Headless runs do log (src/profiles/app.py:505), so the result is that profiles.log — and with it the in-app Log Viewer — systematically misses the application's primary action: every launch, its hook steps, and its failures.

Steps to reproduce

  1. Start the app (web/desktop mode), launch any file from the list.
  2. Open the Log Viewer (Ctrl+Shift+L) or profiles.log.
  3. No FILE_LAUNCHED event appears — while the same launch in headless mode logs one.

Suggested fix

Use the same lookup the sibling routes already use: logging.getLogger("profiles") (as in src/profiles/server/routes/workflow.py:26 and src/profiles/server/routes/logs.py:18). Optionally remove the misleading getattr(state, "logger", None) so the next reader doesn't assume the attribute exists.

Activity

  1. added
    bug
    code-quality
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcode-quality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions