Skip to content

Conversation

@simonw
Copy link
Owner

@simonw simonw commented Dec 1, 2025

When toggling to "hide other replies" mode, the username is now hidden
on continuation posts (those after the first), while keeping the date
stamp and "View on Bluesky" link visible. Usernames reappear when
toggling back out of hide mode.


For bluesky-thread in “hide other replies” mode hide the repeated username after the first displayed post but keep the date stamp and view on Bluesky links
Make those visible again when toggling back out of that mode

When toggling to "hide other replies" mode, the username is now hidden
on continuation posts (those after the first), while keeping the date
stamp and "View on Bluesky" link visible. Usernames reappear when
toggling back out of hide mode.
@cloudflare-workers-and-pages
Copy link

Deploying tools with  Cloudflare Pages  Cloudflare Pages

Latest commit: 89ae17f
Status: ✅  Deploy successful!
Preview URL: https://29f287a3.tools-b1q.pages.dev
Branch Preview URL: https://claude-hide-usernames-thread.tools-b1q.pages.dev

View logs

@claude
Copy link
Contributor

claude bot commented Dec 1, 2025

Claude finished @simonw's task —— View job


PR Review: Hide repeated usernames in hide-other-replies mode

I'll provide a comprehensive review of this pull request focusing on code quality, potential issues, performance, and security.

Todo List:

  • Examine the modified bluesky-thread.html file
  • Analyze code quality and best practices
  • Check for potential bugs or issues
  • Evaluate performance considerations
  • Review security concerns
  • Assess test coverage implications
  • Provide constructive feedback summary

Code Quality & Implementation

Positive aspects:

  • Clean, targeted solution: The implementation is minimal and focused—just 4 lines of CSS that precisely target the specific use case
  • Good selector specificity: Uses a well-structured selector #threadContainer.hide-other-replies .post.depth-1.root-author-post.author-continuation .author that ensures the rule only applies in the exact intended context
  • Follows existing patterns: The CSS follows the same naming conventions and structure as the existing hide-other-replies functionality
  • Informative comment: The CSS comment clearly explains both what is hidden and what remains visible

Potential Issues

No significant bugs identified, but some considerations:

  1. CSS Specificity: The selector has high specificity (ID + 4 classes). While appropriate here, it's worth noting that overriding this rule in the future would require equal or higher specificity.

  2. Graceful degradation: The feature degrades gracefully—if CSS fails to load or the classes aren't applied properly, usernames would simply remain visible, which is acceptable behavior.

Performance Considerations

Excellent performance characteristics:

  • Zero JavaScript overhead: This is a pure CSS solution that doesn't add any runtime JavaScript processing
  • Efficient CSS selector: While specific, the selector is still efficient as it relies on class-based matching
  • No layout recalculation: Uses display: none which removes elements from the document flow cleanly
  • Minimal CSS footprint: Only adds 4 lines of CSS to the existing stylesheet

Security Concerns

No security issues identified:

  • The change is purely cosmetic CSS with no security implications
  • No user input processing or data manipulation involved
  • No external resources or scripts added

Test Coverage Implications

Considerations for testing:

  • This appears to be a standalone HTML application, so traditional unit testing frameworks may not apply
  • Manual testing scenarios that should be verified:
    1. Toggle to "hide other replies" mode with multi-post threads by the same author
    2. Verify usernames are hidden on continuation posts but dates/links remain
    3. Toggle back to normal mode and verify usernames reappear
    4. Test with single-post threads (toggle shouldn't appear)
    5. Test with threads that have no continuation posts

Code Context Analysis

The implementation leverages the existing infrastructure well:

  • Uses the pre-existing .author-continuation class that's already applied to continuation posts (bluesky-thread.html:783)
  • Builds on the existing .hide-other-replies toggle mechanism
  • Maintains the existing behavior for date stamps and "View on Bluesky" links in the .meta element

Overall Assessment

This is a well-implemented, targeted enhancement that achieves the stated goal efficiently. The solution is:

  • Minimal and focused - Only adds what's necessary
  • Performance-friendly - Pure CSS with no runtime overhead
  • Maintainable - Follows existing code patterns and conventions
  • Safe - No security concerns or breaking changes
  • User-friendly - Graceful degradation and intuitive behavior

Recommendation: Approve and merge - This is a clean implementation that enhances the user experience without introducing any technical debt or risks.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants