Commit 80bbc3d
authored
style: reading width, shell layout, and prose typography (#1337)
* chore: prettier-format OG card files
* chore: add CLAUDE.md, remove internal planning docs, gitignore AI config
- Add CLAUDE.md orienting contributors; flags the repo as public and sets a high
bar for code that must pass open-source review.
- Remove docs/plans/* internal design/planning notes (not appropriate for a
public repo) and drop their references from code comments.
- gitignore .claude/ and other local AI assistant config.
* feat: personalized 'For you' feed (topic follow/mute + affinity)
Adds opt-in feed personalization built on the topic vocabulary:
- Schema (migration 0039, additive): user_topic_pref (follow/mute) and
user_topic_affinity (implicit interest, time-decayed).
- feedRanking: pure, unit-tested scoring — a transparent weighted blend of
recency, quality, and topic affinity, with muted topics filtered out.
- topicAffinity: derive per-user affinity from votes/bookmarks/comments through
post_topic edges with decay; recomputed for active users by the nightly cron.
- profile.getTopicPrefs / setTopicPref: manage follows and mutes.
- content.getForYouFeed: re-rank a recent candidate window for the user; cold
start (no signal) falls back to recency, so the existing feed is untouched.
Also trims verbose comments across the content-pipeline modules.
* style: reading width, shell layout, and prose typography
- Widen app shell to 1300px (right rail 300→280px); fold breakpoint moved to
1300px so the center column holds its ~672px reading measure at all sizes
- Narrow article/discussion/link readers to max-w-prose (672px), unifying all
content surfaces and matching the readability sweet spot (~70 chars/line)
- Remove double-up side padding from content wrappers; shell grid gap and
mobile shell gutter (bumped to 1rem) now own all horizontal breathing room
- Re-key prose overrides onto design tokens (bg-inset, border-hairline,
text-accent-soft, color-muted/fg) so styles flip correctly in dark mode;
inline code selector narrowed to :not(pre)>code to avoid touching fenced blocks
* fix: prose color/line-height review findings
- Restore line-height: 1.62 on .prose :where(p,ul,ol) so it explicitly
overrides prose-lg's own paragraph rule at lg+ (inherited value was silently
losing to the plugin's direct p selector)
- Add .tiptap :where(p,ul,ol) { color: inherit } so the muted body-copy color
does not bleed into the article editor's contenteditable
- Switch inline code from text-accent-soft to text-fg: accent-soft on bg-inset
in light mode was 2.30:1 contrast, failing WCAG AA1 parent d1ad53f commit 80bbc3d
4 files changed
Lines changed: 49 additions & 17 deletions
File tree
- app/(app)
- [username]/[slug]
- s/[sourceSlug]/[slug]
- components/ContentDetail
- styles
| 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 | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
282 | 284 | | |
283 | 285 | | |
284 | | - | |
| 286 | + | |
285 | 287 | | |
286 | 288 | | |
287 | 289 | | |
| |||
293 | 295 | | |
294 | 296 | | |
295 | 297 | | |
296 | | - | |
| 298 | + | |
297 | 299 | | |
298 | 300 | | |
299 | 301 | | |
| |||
327 | 329 | | |
328 | 330 | | |
329 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
330 | 354 | | |
331 | 355 | | |
332 | 356 | | |
| |||
344 | 368 | | |
345 | 369 | | |
346 | 370 | | |
347 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
348 | 379 | | |
349 | 380 | | |
350 | 381 | | |
| |||
360 | 391 | | |
361 | 392 | | |
362 | 393 | | |
363 | | - | |
| 394 | + | |
364 | 395 | | |
365 | 396 | | |
366 | | - | |
367 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
368 | 401 | | |
369 | 402 | | |
370 | 403 | | |
| |||
376 | 409 | | |
377 | 410 | | |
378 | 411 | | |
379 | | - | |
380 | | - | |
| 412 | + | |
381 | 413 | | |
382 | 414 | | |
383 | 415 | | |
| |||
0 commit comments