Repository navigation
fix(social): UI polish round 3 — fewer duplicate entries, tighter copy, Escape closes panels (#173) #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(social): UI polish round 3 — fewer duplicate entries, tighter copy, Escape closes panels (#173) #176
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Sidebar friend rows use hover-only settings gear, two-line titles with the Friend's Bot marker visible, and Past rooms in sentence case. The + menu merges Add friend and Accept invite, uses Add Bot consistently, and Escape closes Add friend and Face-to-face dialogs. Bot Sharing settings get a section header; friend empty chats show a one-line hint; the tab title follows the active chat; Chief greets in English when the UI is English. ([#173](https://github.com/ThinkFlowLab/FlyBot/issues/173)) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ import { countCards, createSource, EMPTY_ROSTER, indexRoster, isAgentSession } f | |
| import { themeCss, shellTokens, registry, registerShape, registerTheme, allThemes } from './themes.js' | ||
| import { MENTION_ORIGIN, currentPart } from './text.js' | ||
| import { SHELL_CSS, CONVERSATION_CSS, installStyles, installCompiledStyles } from './styles.js' | ||
| import { installBrandChrome } from './brand.js' | ||
| import { brandTitle, installBrandChrome, sessionTabLabel } from './brand.js' | ||
| import { lookOf } from './mark.js' | ||
| import { TeamSidebar, ConnectPlugins, YouAvatar, AccountLauncher, FooterAccount, BrandMark, BrandName, BotReturn, SIDEBAR_CSS, RETURN_CSS, holdShellShortcuts } from './sidebar.js' | ||
| import { HeaderPill } from './header.js' | ||
|
|
@@ -50,6 +50,19 @@ export function apply(ctx) { | |
| } catch {} | ||
| ctx.effect(() => installLocale(ctx.get('locale')), 'ds-bot: interface copy') | ||
| ctx.effect(() => installBrandChrome(), 'ds-bot: brand chrome') | ||
| ctx.effect(() => { | ||
| const sessions = ctx.sessions.list | ||
| const sync = () => { | ||
| if (typeof document === 'undefined') return | ||
| const row = Object.values(sessions.getSnapshot().byId ?? {}).find(session => (session?.retainedBy?.mainView ?? 0) > 0) | ||
| const label = sessionTabLabel(roster.getSnapshot(), row?.id) | ||
| if (!label) return | ||
| const next = brandTitle(`${label} — FlyBot`) | ||
| if (document.title !== next) document.title = next | ||
| } | ||
| sync() | ||
| return sessions.subscribe(sync) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The tab label is derived from both the session list and Useful? React with 👍 / 👎. |
||
| }, 'ds-bot: tab title') | ||
| const roster = createSource(EMPTY_ROSTER) | ||
| migrateStorage() | ||
| const UNREAD_KEY = STORAGE.unread | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Under the synchronous
ctx.effectcontract used by the client plugin, this effect immediately callssync(), which readsrostereven though thatconstis not initialized until line 66. Normal FlyBot client startup therefore throws a TDZReferenceErrorhere and aborts the remainder ofapply(); create the roster before registering this effect.Useful? React with 👍 / 👎.