Skip to content

feat(web): make session header metadata configurable - #1267

Merged
tiann merged 3 commits into
tiann:mainfrom
techotaku39:feat/configurable-session-header-metadata-latest
Aug 1, 2026
Merged

feat(web): make session header metadata configurable#1267
tiann merged 3 commits into
tiann:mainfrom
techotaku39:feat/configurable-session-header-metadata-latest

Conversation

@techotaku39

Copy link
Copy Markdown
Contributor

PR title

feat(web): make session header metadata configurable

PR description

Summary

  • add display settings for session-header agent, machine, active time, model, reasoning, Fast tier, creation time, update time, and worktree metadata
  • preserve the existing upstream header fields as defaults while keeping creation and update timestamps opt-in
  • hide enabled fields when the current session has no value, and allow field-label prefixes to be disabled
  • keep mobile headers compact by showing the agent plus the first enabled, available secondary field in upstream display order
  • apply the field-label preference to the composer reasoning status as well
  • persist preferences locally per browser without adding server-side settings or migrations

Testing

  • bun typecheck
  • bun run test:web
  • targeted session-header, metadata preference, timestamp, mobile-priority, status-label, and settings tests

AI disclosure

AI-assisted implementation using OpenAI Codex (GPT-5.6-Sol). The changes were manually reviewed and tested.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • [Minor] Mobile metadata priority does not match the configured/header order — fastMode is ordered after timestamps and worktree, so mobile can show a later field instead of Fast when both are enabled and available. Evidence: web/src/lib/sessionHeaderMobileMetadata.ts:15.
    Suggested fix:
    const MOBILE_SECONDARY_PRIORITY = [
        'machine', 'lastActive', 'model', 'reasoning',
        'fastMode', 'createdAt', 'updatedAt', 'worktree',
    ] as const

Summary
Review mode: initial

One Minor ordering issue found. No Blocker or Major findings. Residual risk: responsive rendering preferences are only partially covered; there is no component test exercising competing mobile fields.

Testing

  • GitHub test workflow: passed.
  • Suggested: assert fastMode wins over createdAt, updatedAt, and worktree in the mobile selector test.

HAPI Bot

'worktree',
'fastMode',
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MINOR] Keep mobile priority consistent with the configured/header order

fastMode is last here, while both the settings list and desktop header place Fast before created time, updated time, and worktree (web/src/routes/settings/display.tsx:146-149, web/src/components/SessionHeader.tsx:353-361). When two of these fields are enabled and available, mobile therefore selects the later field instead of Fast, contrary to the upstream-first ordering.

Suggested fix:

const MOBILE_SECONDARY_PRIORITY: ReadonlyArray<SessionHeaderSecondaryMetadataKey> = [
    'machine',
    'lastActive',
    'model',
    'reasoning',
    'fastMode',
    'createdAt',
    'updatedAt',
    'worktree',
]

@techotaku39

Copy link
Copy Markdown
Contributor Author

Fixed in d5a174a. Mobile secondary priority now matches the configured/desktop header order, including Fast before timestamps and worktree. Added competing-field coverage to the selector test.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • None.

Summary
Review mode: follow-up after new commits

No Blocker, Major, Minor, or Nit findings in the latest full diff. The prior mobile metadata priority finding is resolved at web/src/lib/sessionHeaderMobileMetadata.ts:11, with regression coverage at web/src/lib/sessionHeaderMobileMetadata.test.ts:10. Residual risk: preference persistence and selector/formatter logic have unit coverage, but there is no component test toggling stored preferences and verifying the desktop/mobile header plus composer status bar end to end.

Testing

  • Not run (automation; PR code execution is prohibited by the review instructions).
  • GitHub test check was pending at review time.

HAPI Bot

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • None.

Summary
Review mode: follow-up after new commits

No Blocker, Major, Minor, or Nit findings in the latest full diff. The prior mobile metadata priority finding remains resolved at web/src/lib/sessionHeaderMobileMetadata.ts:11, with competing-field coverage at web/src/lib/sessionHeaderMobileMetadata.test.ts:10. Residual risk: preference parsing, mobile selection, and timestamp formatting have unit coverage, but there is still no component test that changes stored preferences and verifies the desktop/mobile session header plus composer reasoning label end to end.

Testing

  • Not run (automation; PR code execution is prohibited by the review instructions).
  • GitHub test and pr-review checks were pending at review time.

HAPI Bot

@tiann
tiann merged commit 0537ddf into tiann:main Aug 1, 2026
2 checks 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.

2 participants