feat(extension): OP highlighting in the side panel (Phase 1)#7
Merged
Conversation
Continue Phase 1 with the next roadmap item after clean reading mode. The parser already detects each post's role (op/mod/admin), following the OP through the whole thread, and render set a `data-role` attribute plus a generic badge — but every role looked identical and OP posts didn't stand out. This adds the visual treatment that is the feature: - render.ts maps roles to readable badge text (OP / Mod / Admin) and drops the badge for the unmarked "user" default. - sidepanel.html gives OP / mod / admin posts a colored left edge and a faint tint, plus a colored badge — signaled by text as well as color, so it doesn't rely on color alone. Docs (ROADMAP, Initial Plan checklist, app README) updated to mark OP highlighting done. render tests updated for the new badge text and a case asserting "user" posts get no badge. Verification: pnpm -r typecheck passes; pnpm test 76 pass (1 new); pnpm --filter @forumforge/extension build bundles dist/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WMZRs1b1oGfUuWrgzpStdm
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb479db43c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The mod role badge used white 11px text on #16a34a (~3.3:1 contrast), below the WCAG AA 4.5:1 threshold for small text. Since the badge text is the non-color signal for OP highlighting, low-vision users could miss it. Use green-700 (#15803d, ~5:1). OP (#2563eb) and admin (#9333ea) badges already clear AA, so only the mod badge changes. Raised in PR review. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WMZRs1b1oGfUuWrgzpStdm
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Continues Phase 1 with the next roadmap item after clean reading mode
(#6): OP highlighting.
The parser already detects each post's role (
op/mod/admin) and followsthe OP through the whole thread, and
render.tsalready set adata-roleattribute plus a generic badge. But every role looked identical — the same grey
pill — and OP posts didn't stand out from the rest of the thread. This PR adds
the visual treatment that is the feature.
What changed
src/render.ts— maps roles to readable badge text (OP/Mod/Admin) and drops the badge for the unmarkeduserdefault, so it's signal,not noise.
public/sidepanel.html— OP / mod / admin posts get a colored left edgeand a faint background tint, plus a colored badge. The role is signaled by
text as well as color, so the highlight doesn't rely on color alone.
No new dependencies; no data-model or parser changes (role detection already
landed in #3).
Roadmap (Phase 1)
Docs synced in the same change:
ROADMAP.md, the canonicalInitial Plan.mdchecklist, and the app
README.md.Verification
pnpm -r typecheck— passes (core + parser + storage + extension)pnpm test— 76 tests pass (1 new: highlighted roles get a readablebadge,
userposts get none)pnpm --filter @forumforge/extension build— bundlesdist/Intentionally not done
browser); the render logic is unit-tested against a DOM and the styling is
plain CSS.
list) need the local-notes feature first, so they're a later Phase 1 follow-up.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WMZRs1b1oGfUuWrgzpStdm
Generated by Claude Code