Skip to content

feat(ui): show the session title in the header bar#340

Open
pascalandr wants to merge 8 commits into
NeuralNomadsAI:devfrom
Pagecran:fix/show-session-title
Open

feat(ui): show the session title in the header bar#340
pascalandr wants to merge 8 commits into
NeuralNomadsAI:devfrom
Pagecran:fix/show-session-title

Conversation

@pascalandr
Copy link
Copy Markdown
Contributor

@pascalandr pascalandr commented Apr 18, 2026

Fixes #299

Summary

  • show the active session title in the instance header, just after the menu switch.
  • keep the title visible whenever the left session drawer is not pinned, using a quiet two-line header treatment without active-item highlighting.
  • when the unpinned drawer is open as a floating overlay, keep the title in the same left header slot so the drawer covers it instead of pushing toolbar controls around.

Validation

  • git diff --check
  • npm run typecheck --workspace @codenomad/ui
  • npm run build --workspace @codenomad/ui
  • visually validated in the rebuilt desktop app raw executable

Render the current session title in the instance header for both compact and regular layouts, while keeping the existing status indicators and command controls in place.
Display the active session title next to the new-tab control, and only when the left session drawer is closed so the title adds context without competing with the sidebar.
@pascalandr pascalandr changed the title feat(ui): show the active session title in the header feat(ui): show the session title in the tab bar Apr 18, 2026
@pascalandr
Copy link
Copy Markdown
Contributor Author

@CodeNomadBot

I want you to perform the gatekeeper checks for latest PR state

check for regressions
check for better possible implementations
Be the PR gatekeeper
Be ruthless about code quality

@codenomadbot
Copy link
Copy Markdown
Contributor

codenomadbot Bot commented Apr 18, 2026

Gatekeeper review for the latest PR state.

Assumption: you wanted a strict review pass on the current branch state, focused on regressions and implementation quality, not additional code changes.

Findings

No blocking regressions stood out in the current diff.

Non-blocking concerns / things to confirm

  1. packages/ui/src/App.tsx:243-260
    The tab-bar session title is derived only when activeAppTab() is an instance tab. If a sidecar tab is active, activeInstance() becomes null, so the session title disappears entirely. That may be intentional, but it is the main UX edge case I would verify because the tab bar still remains visible and the user may still expect session context there.

  2. packages/ui/src/components/instance/instance-shell2.tsx:92
    This file is already very large at roughly 975 lines. The current change is small and acceptable, but it increases the prop/effect surface of an already oversized component. I would not block on that here, but it is a maintainability hotspot.

Validation

I attempted the PR’s stated build check:
npm run build --workspace @codenomad/ui

That could not run in this bot environment because the workspace dependencies are not installed here. The failure was environment-level, not a code-level type/build error from this diff:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite'

Bottom line

From a code review standpoint, I do not see a blocker in the implementation as submitted. The only thing I would explicitly confirm before merge is the sidecar-tab behavior described above.

--
Yours,
CodeNomadBot

@shantur
Copy link
Copy Markdown
Collaborator

shantur commented Apr 19, 2026

@pascalandr - Thanks for working on this.

I think the best would be to show the session title in the session view header instead of the tab bar. It gives a better mental model. I do need to relayout the header anyway so I can implement as part of that work if that's ok.

@pascalandr
Copy link
Copy Markdown
Contributor Author

@shantur
What about merging this while waiting for your relayout of the header, and drop it when you're ready ?

@pascalandr
Copy link
Copy Markdown
Contributor Author

I have have way too much PRs opened so closing this.

@pascalandr pascalandr closed this Apr 26, 2026
@pascalandr pascalandr reopened this May 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/24606059189

Artifacts expire in 7 days.
Artifacts: (none found on this run)

@pascalandr
Copy link
Copy Markdown
Contributor Author

pascalandr commented May 9, 2026

as the issue #299 is tagged as ready-to-work, opening this again, i Have an idea to make it work in the header

pascalandr added 3 commits May 9, 2026 13:46
Show the active session title in the session header when the left sidebar is not pinned so the tab strip stays focused on workspace tabs.

The header slot reserves the sidebar width and reuses existing session title styling to avoid layout jumps while preserving the compact/mobile toolbar controls.

Validated with git diff --cached --check, npm run typecheck --workspace @codenomad/ui, and npm run build --workspace @codenomad/ui.
Subtract the Material toolbar inset from the reserved header title slot so the active session title ends at the same edge as the floating session sidebar.

This prevents the title background from peeking out beside the open drawer while keeping the closed-drawer menu button and title aligned with the sidebar width.

Validated with npm run typecheck --workspace @codenomad/ui and npm run build --workspace @codenomad/ui.
@pascalandr
Copy link
Copy Markdown
Contributor Author

pascalandr commented May 9, 2026

image

@shantur what do you think ?

@pascalandr
Copy link
Copy Markdown
Contributor Author

@CodeNomadBot

I want you to perform the gatekeeper checks for latest PR state

check for regressions
check for better possible implementations
Be the PR gatekeeper
Be ruthless about code quality

@codenomadbot
Copy link
Copy Markdown
Contributor

codenomadbot Bot commented May 9, 2026

Gatekeeper review for the latest PR state.

Assumption: this was a strict review request only, not a request for me to change the PR branch. I reviewed the new implementation that moved the session title into the session header.

Findings

  1. Blocking: closing the left drawer can remove the only header reopen control on info / empty / missing-session states.

packages/ui/src/components/instance/instance-shell2.tsx:699-727

renderHeaderLeftSlot() wraps the whole left header slot in <Show when={showHeaderSessionTitle()}>, and showHeaderSessionTitle() depends on activeSessionTitle(). activeSessionTitle() returns null for the info view and can also be absent while there is no active/resolved session. Because the left drawer IconButton lives inside that same Show, the reopen button is not rendered in those states even when leftDrawerState() === "floating-closed".

There is an embedded sidebar toggle in SessionView, but that path only exists for an active session (packages/ui/src/components/session/session-view.tsx:365-398). It does not cover the info view or empty state. This is a behavioral regression from the previous header behavior, where the left drawer button was controlled only by leftDrawerState() === "floating-closed".

Recommended fix: decouple the drawer button from the title visibility. The slot can always render when the floating drawer is closed, while only the title itself is gated by showHeaderSessionTitle().

  1. Medium: the title visibility no longer matches the stated non-duplication behavior.

packages/ui/src/components/instance/instance-shell2.tsx:705

showHeaderSessionTitle is !leftPinned() && Boolean(activeSessionTitle()), so the title is shown while the left drawer is floating-open. If the goal is still “show the title only when the session drawer is closed,” this should key off leftDrawerState() === "floating-closed" rather than only !leftPinned(). If the new desired behavior is to show it even while the floating drawer is open, the PR description should be updated because it still describes the old tab-bar/closed-drawer behavior.

Implementation quality notes

  • The current approach reuses the session-list item classes for a non-list header element. That keeps visual consistency, but it also couples header layout to sidebar item styling. Acceptable for now, but fragile if session-list styles evolve.
  • packages/ui/src/components/instance/instance-shell2.tsx is now about 1028 lines. I would not block solely on file size, but this change continues to concentrate header, drawer, session cache, and permission behavior in one oversized component.

Validation

I attempted:
npm run build --workspace @codenomad/ui

It could not run in this bot environment because dependencies are not installed here:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite'

Bottom line

I would not merge this latest state as-is because of the lost left-drawer reopen control. Fixing the button/title coupling should be small and keeps the scope tight.

--
Yours,
CodeNomadBot

Keep the floating-sidebar reopen control available even when the active session title is absent, so info and empty states do not strand the user after closing the drawer.

Render the header session title as a quiet two-line text treatment with subtle vertical separators instead of reusing the active session item highlight. This preserves the drawer-width alignment while reducing visual weight in the toolbar.

Validated with git diff --check, npm run typecheck --workspace @codenomad/ui, npm run build --workspace @codenomad/ui, and a rebuilt raw Tauri executable for visual review.
@pascalandr pascalandr changed the title feat(ui): show the session title in the tab bar feat(ui): show the session title in the header bar May 9, 2026
Keep the header left slot mounted while the unpinned session drawer is open so toolbar controls remain offset from the floating panel instead of sliding underneath it.

The slot now acts as an empty spacer in the floating-open state, while the reopen button and quiet two-line session title remain limited to the floating-closed state.

Validated with git diff --check and npm run typecheck --workspace @codenomad/ui.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25605390334

Artifacts expire in 7 days.
Artifacts: (none found on this run)

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25605390334

Artifacts expire in 7 days.
Artifacts: (none found on this run)

Keep the quiet header session title mounted in the left slot for all unpinned drawer states, so opening the floating sidebar covers the title instead of pushing it to the right.

The reopen control is still limited to the closed state, while the slot width remains reserved when the floating drawer is open to keep toolbar controls out from under the overlay.

Validated with git diff --check and npm run typecheck --workspace @codenomad/ui.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25605511004

Artifacts expire in 7 days.
Artifacts: (none found on this run)

@pascalandr
Copy link
Copy Markdown
Contributor Author

@CodeNomadBot

I want you to perform the gatekeeper checks for latest PR state

check for regressions
check for better possible implementations
Be the PR gatekeeper
Be ruthless about code quality

@codenomadbot
Copy link
Copy Markdown
Contributor

codenomadbot Bot commented May 9, 2026

Gatekeeper review for the latest PR state.

Assumption: this is another strict review pass only. I reviewed the current branch after the follow-up commits and compared it with the updated PR description: show the active session title in the header after the menu switch, and only when the left session drawer is closed.

Findings

  1. Blocking: the title is still not gated by the left drawer being closed.

packages/ui/src/components/instance/instance-shell2.tsx:705-714

The prior drawer-button regression is fixed: renderHeaderLeftSlot() now renders when !leftPinned(), so the menu button can still appear on info/empty states.

However, showHeaderSessionTitle is still:

const showHeaderSessionTitle = createMemo(() => showHeaderLeftSlot() && Boolean(activeSessionTitle()))

That means the title renders whenever the left drawer is unpinned and there is an active session title. It does not require leftDrawerState() === "floating-closed", which is the stated behavior in the PR description.

This is not just a wording nit. The implementation is relying on layout/overlay behavior to make the title effectively hidden or “under” the floating sidebar, but the component still renders the title while the drawer is open. That can create visual duplication depending on stacking/layout details and it keeps duplicate title text in the DOM/accessibility tree while the sidebar already shows it.

Recommended fix: encode the product rule directly:

const showHeaderSessionTitle = createMemo(
  () => leftDrawerState() === "floating-closed" && Boolean(activeSessionTitle()),
)

Keep the drawer button/slot visibility separate from the title visibility, as the current patch already started doing.

  1. Medium: headerLeftSlotStyle now reserves sidebar-width space while the floating drawer is open.

packages/ui/src/components/instance/instance-shell2.tsx:709-711

leftDrawerState() === "floating-open" || showHeaderSessionTitle()

If the intended behavior is to keep toolbar controls out from under the floating drawer, this may be deliberate. If the title is changed to only render when closed, double-check that the open-drawer state does not leave an awkward blank left header slot on widths where the drawer does not actually cover the toolbar. This is mostly a visual validation point, not necessarily a code blocker by itself.

Implementation quality notes

  • The follow-up improves the previous coupling bug by separating showHeaderLeftSlot from showHeaderSessionTitle.
  • The title styling is now local to header-specific classes, which is better than reusing sidebar list item classes.
  • packages/ui/src/components/instance/instance-shell2.tsx is still very large at about 1028 lines.
  • packages/ui/src/styles/panels/session-layout.css is now about 537 lines, above the project’s source-file warning threshold.

Validation

I attempted:
npm run build --workspace @codenomad/ui

It still cannot run in this bot environment because dependencies are missing:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite'

Bottom line

The previous hard regression with the missing reopen button looks addressed. I would still hold merge until showHeaderSessionTitle is explicitly tied to leftDrawerState() === "floating-closed", because that is the central behavior promised by this PR.

--
Yours,
CodeNomadBot

@pascalandr
Copy link
Copy Markdown
Contributor Author

Thanks for the re-check. This finding was based on stale PR wording, not the final product behavior we validated.

The title is intentionally rendered whenever the left drawer is not pinned. When the drawer is open as a floating overlay, the title stays in the same left header slot and is covered by the overlay instead of being moved or unmounted. That keeps the toolbar layout stable: the command/status controls do not slide under the floating drawer, and they also do not jump horizontally when the drawer opens or closes.

I updated the PR description to make that behavior explicit:

  • title visible when the left drawer is not pinned
  • quiet two-line header treatment
  • floating drawer covers the title in-place rather than pushing toolbar content

So I am not applying the suggested leftDrawerState() === "floating-closed" gate. The reopen button remains separately gated to the closed state, which was the actual regression from the earlier pass.

@pascalandr
Copy link
Copy Markdown
Contributor Author

@CodeNomadBot
same review again but takes into account the comment above please.

@codenomadbot
Copy link
Copy Markdown
Contributor

codenomadbot Bot commented May 9, 2026

Gatekeeper review for the latest PR state, taking the updated product behavior into account.

Assumption: this remains a strict review-only request. I treated the latest PR description and your follow-up comment as the source of truth: the title intentionally remains mounted/visible whenever the left drawer is unpinned, and the floating drawer covers that left header slot instead of causing toolbar controls to shift.

Findings

No blocking regressions found in the current diff under the clarified behavior.

Review notes

  • The previous blocker about showHeaderSessionTitle not requiring leftDrawerState() === "floating-closed" no longer applies because the PR description now explicitly wants the title present whenever the drawer is not pinned.
  • The earlier button/title coupling regression appears fixed: showHeaderLeftSlot() is separate from showHeaderSessionTitle(), and the menu button is still gated by leftDrawerState() === "floating-closed".
  • The implementation now uses header-specific title classes instead of reusing active session-list item styling, which is a better separation of concerns.
  • The fixed-width left slot behavior matches the clarified intent to keep toolbar controls stable while the floating drawer opens/closes.

Residual risks / things I would visually verify before merge

  • Compact/tablet/phone wrapping: the left slot can reserve roughly sidebar width in the compact header path, so the command/status controls should be checked at narrow widths with long two-line titles.
  • Floating overlay stacking: the drawer should consistently cover the header title in desktop/tablet unpinned-open states, including RTL.
  • Accessibility expectation: because the title remains mounted while covered by the drawer, screen readers may still encounter both the header title and the sidebar title. Given the clarified product behavior, I do not consider this a blocker, but it is worth being aware of.

File-size notes

  • packages/ui/src/components/instance/instance-shell2.tsx is still large at about 1028 lines.
  • packages/ui/src/styles/panels/session-layout.css is about 537 lines, above the project’s source-file warning threshold.

Validation

  • git diff --check origin/dev...HEAD passed.
  • npm run typecheck --workspace @codenomad/ui could not be meaningfully validated in this bot environment because dependencies are missing; errors are dominated by unresolved packages like solid-js, @tauri-apps/*, @opencode-ai/*, etc.
  • npm run build --workspace @codenomad/ui also could not run here because vite is not installed/resolvable in this environment.

Bottom line

With the clarified behavior, I do not see a merge-blocking issue in the current implementation. The main remaining confidence gap is visual validation across compact/RTL/floating-drawer states, which the PR author says was validated in the rebuilt desktop app.

--
Yours,
CodeNomadBot

@shantur
Copy link
Copy Markdown
Collaborator

shantur commented May 9, 2026

Screenshot 2026-05-09 at 22 56 30

This is disturbing mobile view

@shantur
Copy link
Copy Markdown
Collaborator

shantur commented May 9, 2026

Probably should come with the header improvements as separate work. I am not suggesting to be done here

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.

Add show session title

2 participants