Commit dd621f2
fix: feed image thumbnails + mobile layout regressions (#1332)
* fix(feed): repair broken article thumbnails from doubled image URLs
HackerNoon's RSS media:thumbnail/media:content URLs are malformed at the
source — an already-absolute CDN URL prefixed with their own origin
(https://hackernoon.com/https://cdn.hackernoon.com/…), which 404s. Our
ingestion stored them verbatim, and the redesigned cards SSR the <img>,
so the broken-image icon stuck: the error event fires before React
hydrates and attaches onError, so the fallback never runs.
- add unwrapDoubledUrl() (utils/url.ts) + unit tests
- card: unwrap at render and detect pre-hydration failures via a ref
callback, so a dead image collapses to no thumbnail (not a broken icon)
- sanitise URLs at ingestion (fetch-rss, admin/sync-feeds — media + OG)
- one-off scrub script for already-stored rows
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(mobile): resolve overflow, top-bar, filters and focus on small screens
The relaunch redesign had several mobile regressions:
- cards overflowed the viewport (byline meta line couldn't shrink) — now
truncates; card padding p-4 on mobile
- app-main side gutters reduced to 0.75rem and per-page content wrappers
drop px-4 py-8 → px-0 py-4 on mobile (parent already gutters), so text
gets full reading width without double padding
- top bar collapses to burger + logo + search icon ≤720px; Log in / Join
free move into the nav drawer; real search SVG replaces the tiny glyph
- feed filters drop to their own row below the tabs instead of cramming
under them, and no longer sit in an overflow container that clipped the
FilterPill dropdowns (they now open on mobile)
- command palette: Esc hint becomes an X close button on mobile
- search field active state is a subtle accent underline, not the global
(blue-resolving) focus ring
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(feed): anchor unwrapDoubledUrl to the host boundary
Code review caught that the naive lastIndexOf scan would truncate a URL
whose path legitimately contains http://https:// deeper down (path-based
image proxies, or a slug literally containing a scheme). Match only an
absolute URL sitting immediately after the host — the exact shape of the
upstream doubled-origin bug — and leave everything else untouched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 4678f5a commit dd621f2
25 files changed
Lines changed: 328 additions & 46 deletions
File tree
- app
- (app)
- [username]/[slug]
- admin
- moderation
- sources
- tags
- users
- company/[slug]
- draft/[id]
- feed
- s/[sourceSlug]
- [slug]
- tag/[slug]
- api/admin/sync-feeds
- components
- CommandPalette
- ContentDetail
- Feed
- Layout
- UnifiedContentCard
- scripts
- styles
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
166 | 171 | | |
167 | 172 | | |
168 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
0 commit comments