From ff53c7048bf510d18c32125f5d3a31056df0913c Mon Sep 17 00:00:00 2001 From: eti Date: Tue, 1 Sep 2026 23:12:06 +0200 Subject: [PATCH] web: sweep the comments Signed-off-by: eti --- web/src/app.css | 19 ----- web/src/lib/api/collaborator.ts | 2 - web/src/lib/api/fileHistory.ts | 5 -- web/src/lib/api/repo.ts | 3 - web/src/lib/api/repoIndex.ts | 1 - web/src/lib/auth.svelte.ts | 2 + .../comment/CommentCard.stories.svelte | 4 - web/src/lib/components/icons/Bluesky.svelte | 3 - .../icons/UserRoundArrowForward.svelte | 4 +- .../moderation/ReportDialog.stories.svelte | 3 - .../components/moderation/ReportDialog.svelte | 5 -- .../moderation/ReportItems.stories.svelte | 6 -- .../components/moderation/reporting.svelte.ts | 1 - .../notifications/NotificationBell.svelte | 7 -- .../NotificationItem.stories.svelte | 1 - .../notifications/NotificationItem.svelte | 2 - .../notifications/NotificationList.svelte | 2 - .../notifications/NotificationToolbar.svelte | 1 - .../components/notifications/notification.ts | 3 - web/src/lib/components/notifications/types.ts | 4 - .../profile/VouchButton.stories.svelte | 6 -- .../lib/components/profile/VouchButton.svelte | 1 - web/src/lib/components/repo/BlobHeader.svelte | 2 +- web/src/lib/components/repo/CommitList.svelte | 3 - .../repo/CommitLogView.stories.svelte | 2 - .../components/repo/CommitRow.stories.svelte | 2 - web/src/lib/components/repo/CommitRow.svelte | 3 - web/src/lib/components/repo/EmptyRepo.svelte | 5 -- .../repo/FileHistoryView.stories.svelte | 2 - .../lib/components/repo/RefSelector.svelte | 2 - .../repo/RepoIndexView.stories.svelte | 1 - .../components/repo/StarButton.stories.svelte | 4 - web/src/lib/components/repo/StarButton.svelte | 2 - .../repo/SubscribeButton.stories.svelte | 7 -- .../components/repo/SubscribeButton.svelte | 1 - .../repo/pipelines/Elapsed.stories.svelte | 5 -- .../components/repo/pipelines/Elapsed.svelte | 3 - .../repo/pipelines/PipelineCardContent.svelte | 4 - .../repo/pipelines/PipelineEmptyState.svelte | 2 - .../pipelines/PipelineList.stories.svelte | 2 - .../repo/pipelines/PipelineList.svelte | 1 - .../pipelines/PipelineSearch.stories.svelte | 1 - .../repo/pipelines/PipelineSearch.svelte | 3 - .../repo/pipelines/PipelineStatusIcon.svelte | 3 - .../repo/pipelines/PipelineSymbol.svelte | 7 +- .../repo/pipelines/PipelineToolbar.svelte | 4 - .../PipelineWorkflows.stories.svelte | 3 - .../repo/pipelines/PipelineWorkflows.svelte | 13 --- .../pipelines/StepStatusIcon.stories.svelte | 2 - .../repo/pipelines/StepStatusIcon.svelte | 4 - .../pipelines/WorkflowLogs.stories.svelte | 23 ----- .../repo/pipelines/WorkflowLogs.svelte | 44 ---------- .../pipelines/WorkflowSidebar.stories.svelte | 3 - .../repo/pipelines/WorkflowSidebar.svelte | 11 --- .../pipelines/WorkflowSteps.stories.svelte | 17 ---- .../repo/pipelines/WorkflowSteps.svelte | 13 --- .../pipelines/WorkflowView.stories.svelte | 13 --- .../repo/pipelines/WorkflowView.svelte | 2 - web/src/lib/components/repo/pipelines/logs.ts | 4 - .../lib/components/repo/pipelines/pipeline.ts | 11 --- .../repo/pulls/PullApproveCi.svelte | 17 ---- .../lib/components/repo/pulls/PullDiff.svelte | 3 +- .../repo/tickets/Ticket.stories.svelte | 2 - web/src/lib/components/repo/types.ts | 6 -- .../lib/components/settings/DocsButton.svelte | 2 - .../lib/components/settings/DrillDown.svelte | 3 - .../components/settings/FormActions.svelte | 2 - .../lib/components/settings/FormRow.svelte | 4 - .../components/settings/SettingsBlock.svelte | 4 - .../components/settings/SettingsEmpty.svelte | 2 - .../components/settings/SettingsEntry.svelte | 3 - .../components/settings/SettingsList.svelte | 5 -- .../settings/SettingsNav.stories.svelte | 4 - .../components/settings/SettingsNav.svelte | 4 - .../settings/SettingsPanel.stories.svelte | 2 - .../components/settings/SettingsPanel.svelte | 3 - .../components/settings/SettingsRow.svelte | 10 --- .../settings/SettingsSection.svelte | 2 - .../settings/SettingsToolbar.svelte | 1 - .../components/settings/ThemePicker.svelte | 2 - .../components/settings/ThemePreview.svelte | 12 --- .../settings/tabs/ProfileTab.svelte | 3 - web/src/lib/components/ui/Avatar.svelte | 6 -- web/src/lib/components/ui/Button.svelte | 11 +-- web/src/lib/components/ui/ButtonGroup.svelte | 7 -- web/src/lib/components/ui/ColorBall.svelte | 2 - web/src/lib/components/ui/Combobox.svelte | 11 --- web/src/lib/components/ui/CopyButton.svelte | 3 - web/src/lib/components/ui/Dropdown.svelte | 5 -- web/src/lib/components/ui/Field.svelte | 2 - web/src/lib/components/ui/Input.svelte | 15 ---- web/src/lib/components/ui/Link.svelte | 2 - .../lib/components/ui/MarkdownEditor.svelte | 2 - web/src/lib/components/ui/Modal.svelte | 9 +- web/src/lib/components/ui/MoreMenu.svelte | 8 -- web/src/lib/components/ui/MorphIcon.svelte | 4 - web/src/lib/components/ui/Select.svelte | 12 --- web/src/lib/components/ui/ShimmerText.svelte | 9 -- web/src/lib/components/ui/Tabs.svelte | 8 -- web/src/lib/components/ui/TagInput.svelte | 85 +------------------ web/src/lib/components/ui/Textarea.svelte | 10 +-- web/src/lib/components/ui/Tooltip.svelte | 22 +---- web/src/lib/components/ui/User.svelte | 3 - web/src/lib/components/ui/inputField.ts | 11 --- web/src/lib/components/ui/selectField.ts | 8 -- .../lib/components/welcome/FinishStep.svelte | 3 - .../lib/components/welcome/SocialStep.svelte | 1 - .../lib/components/welcome/StepHeader.svelte | 1 - web/src/lib/components/welcome/Steps.svelte | 5 -- .../lib/components/welcome/WelcomeCard.svelte | 6 -- web/src/lib/components/welcome/steps.ts | 1 - web/src/lib/format.ts | 2 - web/src/lib/motion/spring.ts | 18 ++-- web/src/lib/optimistic.svelte.ts | 1 - web/src/lib/popoverExit.ts | 2 - web/src/routes/+layout.svelte | 1 - .../[repo]/history/[ref]/[...path]/+page.ts | 5 -- .../[[range]]/PullViewPage.stories.svelte | 39 --------- .../[version]/[[range]]/PullViewPage.svelte | 17 ++-- .../[repo]/settings/hooks/new/+page.svelte | 2 +- .../[repo]/settings/sites/+page.svelte | 2 +- web/src/routes/favicon.svg/+server.ts | 2 - web/src/routes/notifications/+page.svelte | 5 -- web/src/routes/settings/+layout.svelte | 1 - .../settings/profile/handle/+page.svelte | 2 - web/src/routes/welcome/+page.svelte | 2 - 126 files changed, 27 insertions(+), 761 deletions(-) diff --git a/web/src/app.css b/web/src/app.css index 898558b6e..306d16cd9 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -3,8 +3,6 @@ @import "./pierre.css"; @import "./logs.css"; -/* dark follows the system unless an ancestor pins the theme, so Storybook (and - later the theme setting) can force either mode with data-theme on */ @custom-variant dark { @media (prefers-color-scheme: dark) { &:where(:not([data-theme="light"], [data-theme="light"] *)) { @@ -24,13 +22,6 @@ --font-sans--font-feature-settings: "kern" 1, "liga" 1, "cv05" 1, "tnum" 1; - /* ========================================================================= - Semantic color tokens — synced from Figma "Design System" › semantic colors - Names mirror the Figma variables verbatim (`/` → `-`). Light-mode values - here; dark-mode overrides live in the dark variant block below. - ========================================================================= */ - - /* --- background --- */ --color-background-default: #ffffff; --color-background-subtle: #f9fafb; --color-background-inset: #f3f4f6; @@ -61,7 +52,6 @@ --color-background-navigation-frame: #f9fafb; --color-background-navigation-item: #ffffff; - /* --- foreground --- */ --color-foreground-default: #111827; --color-foreground-muted: #4b5563; --color-foreground-subtle: #6b7280; @@ -94,7 +84,6 @@ --color-foreground-link-info: #4f46e5; --color-foreground-link-info-hover: #6366f1; - /* --- border --- */ --color-border-default: #e5e7eb; --color-border-subtle: #f3f4f6; --color-border-strong: #d1d5db; @@ -107,21 +96,18 @@ --color-border-danger-subtle: #fecaca; --color-border-navigation-item-active: #e5e7eb; - /* --- shadow (inner depth, eg.: for the button component) --- */ --color-shadow-inner-strong: #d1d5db; --color-shadow-inner-strong-hover: #d1d5db; --color-shadow-inner-subtle: #e5e7eb; --color-shadow-ambient-strong: var(--color-alpha-dark-10); --color-shadow-ambient-subtle: var(--color-alpha-dark-5); - /* --- shadow --- */ --shadow-small: 0 2px 4px var(--color-shadow-ambient-strong); --shadow-regular: 0 4px 12px var(--color-shadow-ambient-subtle), 0 2px 4px var(--color-shadow-ambient-subtle); --shadow-large: 0 6px 16px var(--color-shadow-ambient-subtle), 0 4px 6px var(--color-shadow-ambient-subtle); - /* --- alpha --- */ --color-alpha-light-5: color-mix(in srgb, var(--color-background-default) 5%, transparent); --color-alpha-light-10: color-mix(in srgb, var(--color-background-default) 10%, transparent); --color-alpha-light-15: color-mix(in srgb, var(--color-background-default) 15%, transparent); @@ -181,7 +167,6 @@ --color-ansi-bright-cyan: #04a5e5; --color-ansi-bright-white: #bcc0cc; - /* --- animations --- */ --animate-spin-step: spin-step 2.5s infinite; @keyframes spin-step { @@ -445,7 +430,6 @@ :root { @variant dark { - /* --- background (Dark) --- */ --color-background-default: #1f2937; --color-background-subtle: #374151; --color-background-inset: #374151; @@ -473,7 +457,6 @@ --color-background-navigation-frame: #1f2937; --color-background-navigation-item: #374151; - /* --- foreground (Dark) --- */ --color-foreground-default: #f3f4f6; --color-foreground-muted: #9ca3af; --color-foreground-subtle: #6b7280; @@ -505,7 +488,6 @@ --color-foreground-link-info: #6366f1; --color-foreground-link-info-hover: #818cf8; - /* --- border (Dark) --- */ --color-border-default: #374151; --color-border-subtle: #2d3643; --color-border-strong: #6b7280; @@ -517,7 +499,6 @@ --color-border-danger: #991b1b; --color-border-navigation-item-active: #4b5563; - /* --- shadow (Dark) --- */ --color-shadow-inner-strong: #030712; --color-shadow-inner-strong-hover: #1f2937; --color-shadow-inner-subtle: #111827; diff --git a/web/src/lib/api/collaborator.ts b/web/src/lib/api/collaborator.ts index 0b30bb04e..c3fb713dd 100644 --- a/web/src/lib/api/collaborator.ts +++ b/web/src/lib/api/collaborator.ts @@ -2,8 +2,6 @@ import type { Did } from "@atcute/lexicons/syntax"; import type { BobbinContext } from "./client"; import { items } from "./pagination"; -// the appview guards every write on a repo with `repo:push`, which the owner always -// holds and everyone else earns through a collaborator record export const resolvePushAccess = async ( ctx: BobbinContext, repo: { ownerDid: string; repoDid?: string }, diff --git a/web/src/lib/api/fileHistory.ts b/web/src/lib/api/fileHistory.ts index dc312a939..7f64df1aa 100644 --- a/web/src/lib/api/fileHistory.ts +++ b/web/src/lib/api/fileHistory.ts @@ -67,7 +67,6 @@ const seedOf = (key: string): number => { return hash >>> 0; }; -// mulberry32, so one path always invents the same history const random = (seed: number) => { let state = seed; return () => { @@ -80,10 +79,6 @@ const random = (seed: number) => { const DAY_MS = 86_400_000; -/** - * an invented history for one path: deterministic in `${repo}:${path}`, newest - * first, spread over enough months to group and often long enough to paginate - */ export const mockFileHistory = ( repo: string, path: string, diff --git a/web/src/lib/api/repo.ts b/web/src/lib/api/repo.ts index 8f882be07..3e4520156 100644 --- a/web/src/lib/api/repo.ts +++ b/web/src/lib/api/repo.ts @@ -151,10 +151,7 @@ export interface CommitSummary { body: string; authorName: string; authorEmail: string; - // a commit made through tangled signs with the author's did instead of an - // email, so unlike a git name that author is an account we can link to authorDid?: string; - // filled in by the loader, since resolving the did takes a round trip authorHandle?: string; when: string; changeId?: string; diff --git a/web/src/lib/api/repoIndex.ts b/web/src/lib/api/repoIndex.ts index 3fd79073f..646d3822c 100644 --- a/web/src/lib/api/repoIndex.ts +++ b/web/src/lib/api/repoIndex.ts @@ -123,7 +123,6 @@ export interface RepoIndexOptions { requireRef?: boolean; } -// a did-signed commit points at a real account, so trade the git author name // for the handle and the row reads like the rest of the site. a plain git // email that belongs to a verified signup resolves to that same did first, so // those rows get the identical treatment. diff --git a/web/src/lib/auth.svelte.ts b/web/src/lib/auth.svelte.ts index 2b6cda536..8a7e520e9 100644 --- a/web/src/lib/auth.svelte.ts +++ b/web/src/lib/auth.svelte.ts @@ -173,6 +173,7 @@ const resolveProfile = async ( } catch { // try local resolver next. } + } catch {} try { const identity = await identityResolver.resolve(identifier as ActorIdentifier); @@ -326,6 +327,7 @@ export const createAuth = ( } catch { // fall through to the inline error } + } catch {} } throw new Error(`${handle}'s session expired. Sign in again to act as them.`, { cause diff --git a/web/src/lib/components/comment/CommentCard.stories.svelte b/web/src/lib/components/comment/CommentCard.stories.svelte index 3fadebeae..376d9d818 100644 --- a/web/src/lib/components/comment/CommentCard.stories.svelte +++ b/web/src/lib/components/comment/CommentCard.stories.svelte @@ -61,7 +61,6 @@ }} /> - - - - // lucide carries no Bluesky mark, so this is the vector the appview already - // ships at appview/pages/static/icons/bluesky.svg — kept identical so both - // front ends draw the same butterfly. import type { SVGAttributes } from "svelte/elements"; let { class: className = "size-4", ...rest }: SVGAttributes = $props(); diff --git a/web/src/lib/components/icons/UserRoundArrowForward.svelte b/web/src/lib/components/icons/UserRoundArrowForward.svelte index 8ba3d47b7..77462c12d 100644 --- a/web/src/lib/components/icons/UserRoundArrowForward.svelte +++ b/web/src/lib/components/icons/UserRoundArrowForward.svelte @@ -1,7 +1,5 @@ - { void subject; clear(); }); - // clearing on close would swap the form back in behind the panel while it is - // still fading out, so a sent report keeps its confirmation and resets on the - // way back in let showing = false; $effect(() => { if (open && !showing && sent) clear(); diff --git a/web/src/lib/components/moderation/ReportItems.stories.svelte b/web/src/lib/components/moderation/ReportItems.stories.svelte index 4c9b1014f..2804ff650 100644 --- a/web/src/lib/components/moderation/ReportItems.stories.svelte +++ b/web/src/lib/components/moderation/ReportItems.stories.svelte @@ -20,7 +20,6 @@ }); - {#snippet template(args: ComponentProps)} @@ -29,7 +28,6 @@ - , out of the story canvas const dialog = await waitFor(() => { const el = screen.getByRole("dialog", { hidden: true }); expect(el).toBeVisible(); @@ -48,7 +45,6 @@ }} /> - - - diff --git a/web/src/lib/components/moderation/reporting.svelte.ts b/web/src/lib/components/moderation/reporting.svelte.ts index 6cb2479e3..f961baa51 100644 --- a/web/src/lib/components/moderation/reporting.svelte.ts +++ b/web/src/lib/components/moderation/reporting.svelte.ts @@ -6,7 +6,6 @@ export interface Reporting { canReport(authorDid: string): boolean; } -/** Call at component init: reads the auth context. */ export const createReporting = (labelerDid?: () => string | undefined): Reporting => { const auth = getAuth(); const labeler = $derived( diff --git a/web/src/lib/components/notifications/NotificationBell.svelte b/web/src/lib/components/notifications/NotificationBell.svelte index de85e787c..10a65f140 100644 --- a/web/src/lib/components/notifications/NotificationBell.svelte +++ b/web/src/lib/components/notifications/NotificationBell.svelte @@ -30,7 +30,6 @@ const auth = getAuth(); - // the appview preview serves five rows and sends the rest to the full page const PREVIEW_LIMIT = 5; let readFilter = $state("unread"); @@ -66,13 +65,9 @@ notifications.map((n) => (n.uri in overrides ? { ...n, read: overrides[n.uri] } : n)) ); - // the badge counts everything unread, not the rows this filter shows const unreadCount = $derived(totalUnread); const badge = $derived(unreadCount > 99 ? "99+" : String(unreadCount)); - // the unread tab filters on the data as it loaded, never on the local read - // state, so toggling a row restyles it in place instead of dropping it out of - // the list under the cursor. const unreadOnLoad = $derived(new Set(notifications.filter((n) => !n.read).map((n) => n.uri))); const filtered = $derived( @@ -107,7 +102,6 @@ await markAllNotificationsRead(deliberi).catch(() => {}); }; - // the popover survives a client-side navigation unless something closes it const dismiss = (event: MouseEvent & { currentTarget: HTMLAnchorElement }) => { const popover = event.currentTarget.closest("[popover]"); if (popover instanceof HTMLElement) popover.hidePopover(); @@ -133,7 +127,6 @@ {/if} {/snippet} -