Skip to content

fix: Add project chips to notebooks including private projects#3935

Merged
cemreinanc merged 6 commits intomainfrom
claude/issue-3924-20251215-1338
Jan 23, 2026
Merged

fix: Add project chips to notebooks including private projects#3935
cemreinanc merged 6 commits intomainfrom
claude/issue-3924-20251215-1338

Conversation

@SylvainChevalier
Copy link
Contributor

@SylvainChevalier SylvainChevalier commented Dec 15, 2025

Fixes #3924

Notebooks were missing project chips (tournaments, question series, etc.) while question-posts displayed them correctly. This fix adds all project types as chips to notebooks, matching the behavior of question-posts.

This includes private project chips which were completely missing from notebooks but are now displayed consistently with how they appear on question-posts.

Changes

  • Updated front_end/src/app/(main)/notebooks/[id]/[[...slug]]/page_compotent.tsx to display project chips
  • Added support for all project types: tournaments, question_series, communities, categories, index, leaderboard_tag
  • Used consistent styling with question-posts (olive for taxonomy, orange for other projects)

Generated with Claude Code

Summary by CodeRabbit

  • Improvements

    • Notebook editor now shows all related projects as compact chips, aggregating multiple sources into one list.
    • Chips use color-coding by project type and include navigation links.
  • UI Changes

    • Leaderboard-tagged projects display a trophy emoji prefix.
    • Category display on the notebook page has been removed.

✏️ Tip: You can customize this high-level summary in your review settings.

Notebooks were missing project chips (tournaments, question series, etc.)
while question-posts displayed them correctly. This fix adds all project
types as chips to notebooks, matching the behavior of question-posts.

This includes private project chips which were completely missing from
notebooks but are now displayed consistently with how they appear on
question-posts.

Fixes #3924

Co-authored-by: Sylvain <SylvainChevalier@users.noreply.github.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

Removed category display from the notebook page and refactored notebook editor to aggregate multiple project sources and render them as Chip components with type-based coloring and custom chip text.

Changes

Cohort / File(s) Summary
Notebook page cleanup
front_end/src/app/(main)/notebooks/[id]/[[...slug]]/page_compotent.tsx
Removed import POST_CATEGORIES_FILTER and deleted the UI block that rendered postData.projects.category and related links — category display removed from notebook page.
Notebook project chips
front_end/src/app/(main)/notebooks/components/notebook_editor/index.tsx
Replaced single-default-project rendering with aggregation of multiple project arrays (index, tournament, question_series, community, category, leaderboard_tag), excluding default project. Render all as Chip components (size xs) with dynamic color based on TaxonomyProjectType. Added helper getChipText (adds trophy emoji for leaderboard tags) and use of getProjectLink. New imports: Chip, TaxonomyProjectType, getProjectLink. Review attention: aggregation logic, exclusion of default project, chip text formatting, and color mapping.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I nibble at code, add chips with cheer,

Tournaments and tags now hop into view near.
No more hidden badges, they gleam and play,
Olive and orange brighten the day.
A rabbit's small tweak—now notebooks display.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: Add project chips to notebooks including private projects' clearly summarizes the main change—adding project chips to notebooks with support for private projects, which aligns with the primary changeset objective.
Linked Issues check ✅ Passed The PR successfully addresses issue #3924 by displaying project chips on notebook pages, including private projects, making notebook behavior consistent with question-posts for all project types.
Out of Scope Changes check ✅ Passed All changes are directly related to the stated objective of adding project chips to notebooks; both modified files focus on rendering project chips and removing outdated category display logic.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 300542e and adcd902.

📒 Files selected for processing (2)
  • front_end/src/app/(main)/notebooks/[id]/[[...slug]]/page_compotent.tsx
  • front_end/src/app/(main)/notebooks/components/notebook_editor/index.tsx
💤 Files with no reviewable changes (1)
  • front_end/src/app/(main)/notebooks/[id]/[[...slug]]/page_compotent.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
front_end/src/app/(main)/notebooks/components/notebook_editor/index.tsx (1)
front_end/src/utils/navigation.ts (1)
  • getProjectLink (76-97)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build Docker Image / Build Docker Image
  • GitHub Check: integration-tests
  • GitHub Check: Frontend Checks
  • GitHub Check: Backend Checks
🔇 Additional comments (3)
front_end/src/app/(main)/notebooks/components/notebook_editor/index.tsx (3)

8-12: Imports look consistent with the new chip rendering.


101-118: Chip rendering looks aligned with question-posts (type color + link).


84-98: According to the type definition in front_end/src/types/post.ts (lines 125-135), default_project is a required, non-optional field on the projects object:

projects: {
  category?: Category[];
  topic: Topic[];
  default_project: Tournament;  // No `?` — required
  tournament?: Tournament[];
  // ...
}

The code correctly assumes postData.projects.default_project is always present. No defensive guards are needed for a required field according to the type contract. The current implementation is correct.

Likely an incorrect or invalid review comment.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

🧹 Preview Environment Cleaned Up

The preview environment for this PR has been destroyed.

Resource Status
🌐 Preview App ✅ Deleted
🗄️ PostgreSQL Branch ✅ Deleted
⚡ Redis Database ✅ Deleted
🔧 GitHub Deployments ✅ Removed
📦 Docker Image ⚠️ Retained (auto-cleanup via GHCR policies)

Cleanup triggered by PR close at 2026-01-23T16:44:30Z

- Removed unused project chip rendering logic from IndividualNotebookPage.
- Consolidated project chip display in NotebookEditor, ensuring default and other projects are shown correctly.
- Updated imports to reflect the removal of unused components and functions.
@cemreinanc cemreinanc merged commit 8409821 into main Jan 23, 2026
11 of 12 checks passed
@cemreinanc cemreinanc deleted the claude/issue-3924-20251215-1338 branch January 23, 2026 16: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.

notebooks are missing private project chips

2 participants