feat(frontend): add display names to page titles#861
feat(frontend): add display names to page titles#861Gkrumbach07 merged 2 commits intoambient-code:mainfrom
Conversation
|
@christianvogt Can you please rebase your branch onto main? |
5b091a3 to
74668f9
Compare
WalkthroughAdds HTML Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@components/frontend/src/app/projects/`[name]/sessions/[sessionName]/page.tsx:
- Line 1450: This client component injects a <title> element causing duplicate
titles; remove the <title>{`${session.spec.displayName || session.metadata.name}
· Ambient Code Platform`}</title> from the client page and move the title
computation into the server-side layer using generateMetadata (or a server
wrapper page.tsx) so the Metadata API is the single source of truth; update the
server page's generateMetadata to compute the same displayName fallback logic
(session.spec.displayName || session.metadata.name) and return the title string,
and ensure the client component no longer renders any <title> element.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2f9c63e0-7265-4665-8b0d-c222c5e12d47
📒 Files selected for processing (1)
components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx
components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx
Show resolved
Hide resolved
Review Queue — Not Ready to MergeCodeRabbit flagged the use of The two PRs offer competing technical approaches for the same feature. To unblock: Review PR #878 and decide which approach to use. Either adopt the metadata API pattern from #878, or provide technical justification for keeping the React 19 title hoisting pattern. |
74668f9 to
1408c09
Compare
1408c09 to
da8a9df
Compare
|
@Mergifyio queue |
Merge Queue Status
Required conditions to enter a queue
|
|
@Mergifyio refresh |
✅ Pull request refreshed |
Summary
When multiple ACP sessions are open in separate browser tabs, all tabs show the same title ("Ambient Code Platform"), making it impossible to identify which tab belongs to which session. This also prevents browser tab search features (e.g., Chrome's "Search tabs") from being useful for finding a specific session.
Adds dynamic browser tab titles across all main pages so users can distinguish tabs when multiple are open.
Uses two complementary Next.js mechanisms:
generateMetadatain new layout files — initial title from route params on first load<title>tags in page components — refines title with fetched display names after hydrationChanges
integrations/layout.tsxprojects/[name]/page.tsx<title>withproject.displayNamesessions/[sessionName]/page.tsx<title>withsession.spec.displayNameNo behavioral, styling, or logic changes — purely additive. The large diff in the project page is just re-indentation from the fragment wrapper.