Skip to content

Add visual indicator for pending word count recalculation#1434

Closed
drusepth wants to merge 939 commits intomasterfrom
claude/review-table-of-contents-ooM1U
Closed

Add visual indicator for pending word count recalculation#1434
drusepth wants to merge 939 commits intomasterfrom
claude/review-table-of-contents-ooM1U

Conversation

@drusepth
Copy link
Copy Markdown
Member

@drusepth drusepth commented Apr 2, 2026

The word count circle now turns gray while typing and transitions
back to teal when the count updates (after 500ms debounce), giving
users feedback that the displayed count is stale during active typing.

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

drusepth and others added 30 commits January 3, 2026 19:33
The word count circle now turns gray while typing and transitions
back to teal when the count updates (after 500ms debounce), giving
users feedback that the displayed count is stale during active typing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added missing closing </div> tag for the diff display container,
which was causing each revision to nest inside the previous one.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Moved Books tab to 3rd position and Actions to 4th position
in the document editor sidebar for better UX prioritization.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Allow Books to be linked via @mentions in the document editor,
alongside existing linkable types (Documents, Timelines, etc.).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Show more revisions per page to reduce pagination clicks
when reviewing document history.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add dropdown to select 24h, 7d, or 30d time periods
- Link dashboard stats (Today, This Week) to filtered views
- Update all labels and empty states to reflect selected period
- Improve chart date format for better readability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Hide edit/remove action buttons until hover on book headers
- Style chapter position numbers as rounded circles (teal for current, gray for others)
- Add left border accent to highlight current document row
- Remove redundant "In X books" header since panel title provides context
- Standardize on teal color scheme for document highlighting (was inconsistent blue/teal)
- Make drag handles appear on hover only

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove card containers from book sections for cleaner tree menu style
- Add book icon (menu_book) with emerald color before each book title
- Remove horizontal padding for full-width layout
- Fix document row alignment by adding transparent border to inactive rows
- Fix position number update after drag-drop (remove trailing period)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove edit/remove buttons from book header hover state
- Add "Edit book" and "Remove from book" as menu items at bottom of expanded section
- Style actions with icons and full-width hover states like other menu items
- Simplify book header by removing group hover logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add .includes(:universe) to public_content method for eager loading
- Cache current_user following IDs to prevent N+1 on mutual connection checks
- Update community view to use cached IDs instead of querying per follower

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Send users a congratulatory notification when they hit their daily word
goal for the first time each day. The notification includes a trophy
icon and links to the writing goals page.

Uses an after_commit callback on WordCountUpdate to trigger the check,
so any code path that saves a word count update will automatically
check for goal completion.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace white icons on colored background circles with icons using each
content type's text_color class. Fixes white-on-white visibility issue
in light mode.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Preload users in a single batch query instead of fetching each user
individually in the view loop. Reduces queries from 6 to 2.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix ApplicationHelper#get_preview_image to use pinned? predicate method
- Fix routes.rb gallery redirect to extract resource type from req.path
  instead of nil params[:controller]
- Remove brittle flash message string assertion from FoldersControllerTest
- Remove obsolete gallery tests (endpoint is now a redirect)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use pre-fetched image caches instead of calling random_image_including_private
directly in loops. The controller already batch-loads image_uploads and
basil_commissions, but the Tailwind view was bypassing these caches.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Convert dashboard from MaterializeCSS to TailwindCSS with dark mode support
- Add configurable time range selector (1d, 7d, 30d, 90d) defaulting to 30 days
- Fix nil errors when content types have no records (use safe navigation)
- Use application layout instead of admin layout for dashboard

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use Thredded's posts_count counter cache instead of calling
thread.posts.count which executes a COUNT query for each thread.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The home page "Editing Streak" and Writing Activity page used different
data sources, causing inconsistent streak counts. The home page used
content page updated_at timestamps while Writing Activity used
WordCountUpdate records.

Changes:
- Rename calculate_editing_streak to calculate_writing_streak
- Use WordCountUpdate.words_written_on_date instead of updated_at
- Add "skip today if empty" fallback logic (matches WritingActivityController)
- Rename "Editing Streak" to "Writing Streak" in UI
- Update data attributes and tooltips to show words written

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Delete redundant admin layout (Chartkick already in asset pipeline)
- Remove layout declarations from AdminController
- Redesign churn page with card-based layout and proper sections
- Redesign notifications page with comprehensive analytics:
  - Summary stats with avg time-to-click
  - Notification trend chart
  - Reference code cards with sample messages
  - Link performance table
  - Recent activity feed
- Add new admin hub page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace Materialize CSS with Tailwind styling for both the mass
unsubscribe form and results pages, adding dark mode support,
improved form layout, and better visual feedback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add :image_uploads to public_content includes (UsersController#show)
- Add :user to content type actions includes (UsersController#characters, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…lity

Replace Materialize CSS with Tailwind styling for the spam watch page,
adding dark mode support and improved table layout. Also fix ILIKE
query to use Arel matches() for cross-database compatibility with
both PostgreSQL and SQLite.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add summary stats (posts scanned, flagged, clean rate)
- Card-based layout for flagged messages
- Highlighted triggers with mark tags
- Scrollable content preview
- Empty state for clean results
- Dark mode support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Override the Thredded controller to add includes for user avatar
attachments, preventing N+1 queries when rendering forum posts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace Materialize CSS with Tailwind styling featuring a responsive
image grid, lazy loading, content type and privacy badges, smart
pagination with disabled states, and dark mode support.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Guard against nil when calling BasilFeedback.minimum(:updated_at)
to prevent NoMethodError when there are no feedback records.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace MaterializeCSS styling with Tailwind to match other redesigned
admin pages. Add summary stats cards, implement the previously TODO'd
"attributes per content type" feature, and add controller action to
precompute stats.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add search box with autocomplete to quickly find reference codes, make
reference code cards clickable, and create a dedicated analytics page
showing comprehensive metrics for each reference code including click
rates, time-to-click statistics, campaign timeline, and link performance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
drusepth and others added 26 commits March 27, 2026 14:23
Update hardcoded JavaScript API paths (/image_uploads/:id) to use ERB
route helpers (image_upload_path and basil_commission_update_path).
This ensures the paths remain accurate and resilient to future routing
changes, such as the 'scope /plan' configuration.
- Replaced explicit boolean checks for user moderation state with a broader check for early rendered/redirected responses via `performed?`
Update the recently edited pages component to use the page's
`first_public_image` (rendered as a 40x40 object-cover square)
if available, with the original colored icon block as a fallback.
Carves out the padding surrounding the thumbnails by moving it to the content
body, and switches to a flex-stretch layout. This allows the image or colored
icon block to seamlessly push to the left boundary and fill the entire height
of the row component, resulting in a much larger visible thumbnail area
without increasing the row's total height.
The dashboard iterates over generic ContentPage objects for its recently
edited pages list. These objects do not include the HasImageUploads
concern, so the image fallback check failed. Expanding this method into
ContentPage allows the dashboard thumbnail feature to properly identify
custom user images (both uploaded and generated) without raising exceptions
or returning the default placeholder.
Updates the unified "Recent Activity" page to use the newly created
custom_thumbnail_url logic rather than random_image_including_private.
This stops the controller from setting `has_image: true` when the result
is only the generic fallback placeholder, allowing the views to accurately
dispense customized thumbnails or the colorful semantic category icons
within the List and Timeline view modes.
The `_card.html.erb` partial is frequently used in public areas to show
content, meaning it safely relied strictly on `first_public_image`.
This commit introduces an optional `show_private_images` local flag
that allows private dashboard views (like /my/content/recent's Grid View)
to leverage `random_image_including_private`, safely rendering custom user
graphics while keeping public-facing behavior intact.
Wire up the previously unfinished Table of Contents as a public-facing
landing page for universes at /universes/:id/contents. Rewrites the
controller to load universes by ID with privacy enforcement (only public
universes are visible), replaces the buggy content_list approach (which
couldn't filter by universe_id) with proper has_many associations and
is_public scoping. Fixes the view to use real data instead of hardcoded
placeholders, removes the non-functional email subscription form and
nav tabs, adds a Stimulus-based page type filter, and wires up animated
stats cards with actual page count, word count, and content type count.

https://claude.ai/code/session_01DUjQpL3cB9hqZaJ9j4wJwx
@railway-app
Copy link
Copy Markdown

railway-app bot commented Apr 2, 2026

🚅 Deployed to the notebook-pr-1434 environment in Notebook.ai Feature Review

Service Status Web Updated (UTC)
notebook 🕛 Waiting for status checks (View Logs) Web Apr 2, 2026 at 2:37 am

@railway-app railway-app bot temporarily deployed to Notebook.ai Feature Review / notebook-pr-1434 April 2, 2026 02:38 Destroyed
@drusepth drusepth closed this Apr 2, 2026
@drusepth drusepth deleted the claude/review-table-of-contents-ooM1U branch April 3, 2026 01:44
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.

2 participants