polish(ui): founder feedback batch - inset sidebar hairline, calmer dialogs, Discord mark, chat skeleton (#1158)

- Sidebar: the hairline above the user block is inset to the content
  edges instead of running edge-to-edge (concept language).
- User menu: the Discord community link renders the actual Discord mark
  (inlined simple-icons path, CC0) instead of lucide MessagesSquare.
- Dialogs: open/close animation toned down, zoom 98 instead of 95 and
  150ms instead of 200ms.
- Settings modal: switching tabs no longer remounts the intercepted
  route (and replayed the whole open animation on every click). The rail
  now swaps sections via history.replaceState, which Next syncs into
  usePathname(), so the dialog stays mounted and tab switches are
  instant. Verified via Playwright: dialog DOM node survives three tab
  switches, URL tracks the section, Esc still closes back.
- /chat loading: the shared dashboard skeleton stretched edge-to-edge in
  chat's full-bleed wrapper (chat's own layout is what suspends, so a
  chat/loading.tsx cannot catch it). The shared fallback is now route-
  aware and renders a two-pane chat silhouette for /chat.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-07-24 19:36:45 +02:00
committed by GitHub
co-authored by Claude Fable 5
parent 15300aa8e2
commit bb551d1d59
7 changed files with 83 additions and 21 deletions
+6 -2
View File
@@ -27,11 +27,15 @@ export function SettingsModal({ sectionId }: { sectionId?: string }) {
const { company } = useCompany()
const t = useTranslations('settings_modal')
// Tab clicks inside the modal update the URL shallowly (see SettingsRail),
// so the pathname is the live source of truth for the active section; the
// sectionId route param only covers the very first intercepted render.
// Bare /settings (or an unknown section) defaults to company, or to account
// when there is no active company (the no-company escape hatch).
const urlSection = pathname.split('/')[2] ?? sectionId
const resolved =
sectionId && SETTINGS_SECTIONS[sectionId]
? sectionId
urlSection && SETTINGS_SECTIONS[urlSection]
? urlSection
: company
? 'company'
: 'account'
+8 -3
View File
@@ -16,8 +16,11 @@ import {
import { useSettingsNavItems } from './useSettingsNavItems'
interface SettingsRailProps {
/** Layout context: 'page' navigates with push (real route), 'modal' replaces
* the URL so section-switching keeps a single back-stack entry. */
/** Layout context: 'page' navigates with push (real route), 'modal' swaps
* the URL shallowly (history.replaceState) so section-switching keeps a
* single back-stack entry AND never re-renders the intercepted modal
* route: a router navigation would remount the Dialog and replay its
* open animation on every tab click. */
variant: 'page' | 'modal'
/** 'rail' = grouped vertical list (desktop); 'select' = grouped dropdown (mobile). */
display: 'rail' | 'select'
@@ -38,7 +41,9 @@ export function SettingsRail({ variant, display, activeId }: SettingsRailProps)
items[0]?.id
function navigate(href: string) {
if (variant === 'modal') router.replace(href)
// Shallow update: Next syncs usePathname() from the native History API,
// so SettingsModal re-resolves the section without a route transition.
if (variant === 'modal') window.history.replaceState(null, '', href)
else router.push(href)
}