Skip to content

dogfood: I'm not a fan of the preview server in the current state #21180

@bpmct

Description

@bpmct

When a task is running, the preview server and develop.sh apps are not visible in the Tasks view, even though they appear in the Workspaces view.

Root Cause

Apps with command fields (terminal apps like develop.sh) are not properly handled in the Tasks view.

Technical Details

  1. In the dogfood template (dogfood/coder/main.tf):

    • coder_app.develop_sh (lines 895-906) - has command = "screen -x develop_sh"
    • coder_app.preview (lines 931-947) - has url = "http://localhost:8080"
  2. In TaskApps.tsx (site/src/pages/TaskPage/TaskApps.tsx):

    • Line 34-38: Apps are filtered by task.workspace_app_id and health !== "disabled"
    • Line 239-252: splitEmbeddedAndExternalApps() only checks app.external to split apps
    • Issue: Apps with command are NOT marked as external, so they go into embeddedApps array
    • These command apps then try to render as iframes (lines 95-102), which doesn't work properly for terminal apps
  3. Expected behavior:

    • Command apps should either be filtered out (since there's already a dedicated Terminal tab)
    • Or they should be handled specially to open in the terminal tab
    • Currently they likely fail to render or get lost in the iframe rendering logic

Impact

Users cannot see or access:

  • The preview server app (http://localhost:8080)
  • The develop.sh script app (terminal command)

Both apps work fine in the Workspaces view but are missing from the Tasks view.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions