Skip to content

fix(mentor): relocate session-share button from per-message to navbar#136

Open
conradmugabe wants to merge 2 commits into
mainfrom
fix/645
Open

fix(mentor): relocate session-share button from per-message to navbar#136
conradmugabe wants to merge 2 commits into
mainfrom
fix/645

Conversation

@conradmugabe

@conradmugabe conradmugabe commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Previously the "Share this chat" icon rendered on every AI message bubble, which made it read as a per-message share action even though it always shared the whole session. Moved it to the platform navbar as a single session-level button styled to match the notifications area (icon + "Share" text on lg+, icon-only on smaller screens).

Visibility is gated on the same conditions the chat uses to decide whether a real conversation exists: logged in, not viewing a shared chat, a session id is present, and there is at least one non-welcome message (applies the messages[0].role === 'assistant' ? slice(1) : messages filter). Hidden on /explore and /analytics routes.

Also re-enabled Journey 12's "creates shareable chat URL" e2e test as expected to be fixed by this relocation (kept as fixme with a #645 note until a green CI run confirms) and added two new structural checkpoints: exactly-one-button-in-navbar and hidden-on-explore.

Closes https://github.com/iblai/iblai-platform/issues/645

Checklist

  • Tests were added/updated according to the feature/bugfix/change made
  • Version was rolled according to semver requirements
  • API endpoints openapi schema was updated if applicable

Changes

Screenshot 2026-04-20 at 06 51 43 Screenshot 2026-04-20 at 06 49 59

Tests Screenshot

Screenshot from 2026-04-21 02-52-15

Previously the "Share this chat" icon rendered on every AI message
bubble, which made it read as a per-message share action even though
it always shared the whole session. Moved it to the platform navbar
as a single session-level button styled to match the notifications
area (icon + "Share" text on lg+, icon-only on smaller screens).

Visibility is gated on the same conditions the chat uses to decide
whether a real conversation exists: logged in, not viewing a shared
chat, a session id is present, and there is at least one non-welcome
message (applies the messages[0].role === 'assistant' ? slice(1) :
messages filter). Hidden on /explore and /analytics routes.

Also re-enabled Journey 12's "creates shareable chat URL" e2e test as
expected to be fixed by this relocation (kept as fixme with a #645
note until a green CI run confirms) and added two new structural
checkpoints: exactly-one-button-in-navbar and hidden-on-explore.

Closes #645.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@conradmugabe conradmugabe requested a review from mamigot as a code owner April 20, 2026 05:20
@mamigot

mamigot commented Apr 20, 2026

Copy link
Copy Markdown
Member

Claude finished @conradmugabe's task —— View job


E2E Coverage Review ✅

Reviewing this PR for e2e test coverage requirements...

Todo List:

  • Dismiss stale REQUEST_CHANGES reviews from myself (no stale reviews found)
  • Identify what changed in the PR (no new page.tsx files, coverage files updated, e2e spec updated)
  • Run mechanical coverage check (✅ PASSED - coverage improved from 301 → 303 checkpoints)
  • Read current coverage state (Journey 12 updated with new checkpoints)
  • Apply decision logic and post GitHub review (✅ APPROVED)

Analysis:

This PR falls under CASE C: New functionality was added (moving share button from per-message to navbar), an e2e spec was updated (12-chat-sharing.spec.ts), AND coverage files were already updated by the developer.

Key findings:

  • No new page.tsx routes added
  • Mechanical coverage check PASSED (+2 new checkpoints)
  • Coverage files properly updated:
    • Added 2 new checkpoints: sh-07 and sh-08
    • Added app/platform/[tenantKey]/[mentorId]/_components/nav-bar/index.tsx to sourceFiles
  • Journey 12 test re-enabled from .fixme() to .test()

Review posted: ✅ APPROVED - The developer correctly updated both coverage.json and COVERAGE.md with the new structural checkpoints for the navbar share button feature. Coverage validation passed all requirements.


@mamigot mamigot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

✅ E2E Coverage — All Good

New share button feature is properly covered and coverage files are up to date.

Coverage validation:

  • ✅ No new routes requiring coverage
  • ✅ Mechanical check passed: 301 → 303 checkpoints (+2)
  • ✅ Journey 12 updated with new structural checkpoints:
    • sh-07: Share button rendered exactly once in navbar (not per message)
    • sh-08: Share button hidden on non-chat pages like /explore
  • ✅ Test re-enabled from .fixme() to .test()
  • coverage.json and COVERAGE.md properly updated

The navbar relocation fixes issue #645 and maintains complete test coverage.

@mamigot

mamigot commented May 5, 2026

Copy link
Copy Markdown
Member

Claude finished @conradmugabe's task —— View job


E2E Coverage Review ✅

Reviewing this PR for e2e test coverage requirements...

Todo List:

  • Dismiss stale REQUEST_CHANGES reviews from myself (no stale reviews found)
  • Identify what changed in the PR (no new page.tsx files, coverage files updated, e2e spec updated)
  • Run mechanical coverage check (✅ PASSED - coverage improved from 368 → 370 checkpoints)
  • Read current coverage state (Journey 12 updated with new checkpoints)
  • Apply decision logic and post GitHub review (✅ APPROVED)

Analysis:

This PR falls under CASE C: New functionality was added (moving share button from per-message to navbar), an e2e spec was updated (12-chat-sharing.spec.ts), AND coverage files were already updated by the developer.

Key findings:

  • No new page.tsx routes added
  • Mechanical coverage check PASSED (+2 new checkpoints)
  • Coverage files properly updated:
    • Added 2 new checkpoints: sh-07 and sh-08
    • Added app/platform/[tenantKey]/[mentorId]/_components/nav-bar/index.tsx to sourceFiles
  • Journey 12 test re-enabled from .fixme() to .test()

Review posted: ✅ APPROVED - The developer correctly updated both coverage.json and COVERAGE.md with the new structural checkpoints for the navbar share button feature. Coverage validation passed all requirements.

@mamigot mamigot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

✅ E2E Coverage — All Good

New share button feature is properly covered and coverage files are up to date.

Coverage validation:

  • ✅ No new routes requiring coverage
  • ✅ Mechanical check passed: 368 → 370 checkpoints (+2)
  • ✅ Journey 12 updated with new structural checkpoints:
    • sh-07: Share button rendered exactly once in navbar (not per message)
    • sh-08: Share button hidden on non-chat pages like /explore
  • ✅ Test re-enabled from .fixme() to .test()
  • coverage.json and COVERAGE.md properly updated

The navbar relocation fixes issue #645 and maintains complete test coverage.

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