Skip to content

tui3: the status line's crew segment never draws on an ordinary launch — it guards on an empty profileDir, which is the normal case #315

Closed

Description

@santoshkumarradha

Problem

Found while landing #314 (the chat receipt for an inherited work seat), on the real binary rather than in a test: app.profileDir is empty on an ordinary launch. config.ProfileDir() is AFORGE_PROFILE_DIR, which almost nobody sets, and internal/config reads "" as "this process's profile" — so an empty profile dir is the normal case, not the absent one.

app.crewSegment / crewWord in internal/tui3 guard on profileDir == "" as if it meant "no profile". On every ordinary launch that guard is true, so the status line's crew … segment never draws. (#314's first cut of the receipt had the same guard and was silent on exactly the launch it was for; it was corrected to guard on a.hosted() — a connection, which is the real absence — before landing. The crew word was deliberately left alone there as its own decision.)

Replication

  1. Ordinary launch: aforge with no AFORGE_PROFILE_DIR in the environment, any profile with a crew picked.
  2. Look at the status line / chrome for the crew segment.
  3. It is absent. Set AFORGE_PROFILE_DIR to the profile's real directory and relaunch: the segment appears.

Decision to make

Guard the crew segment on the same fact the receipt now uses — a hosted (remote) window has no local profile; an ordinary local launch always does — via a.hosted(), not profileDir == "". Then a frame test at 80 and 120 columns that the crew word draws on an ordinary launch and is absent on a hosted one, following newTestApp in internal/tui3/tui3_test.go.

Acceptance


Drafted with CodeAF · reviewed and owned by the author

Activity

  1. added
    bug
    on Sep 2, 2026
  2. added
    area:chat
    and removed on Sep 10, 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

    area:chatbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions