Skip to content

Configure Louis chatbot for the Python SICP textbook - #4208

Draft
yiilinzhang wants to merge 5 commits into
masterfrom
yilin/louis-chatbot
Draft

Configure Louis chatbot for the Python SICP textbook#4208
yiilinzhang wants to merge 5 commits into
masterfrom
yilin/louis-chatbot

Conversation

@yiilinzhang

@yiilinzhang yiilinzhang commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

Refer to pull request #4085 which was reverted in [#4202]
Additional Changes:

  1. Stop sending system prompts from FE as per comments on Configure Louis chatbot for the Python SICP textbook #4085

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Code quality improvements

Checklist

  • I have tested this code
  • I have updated the documentation

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 560ddd1f-4189-4f1f-9685-ce3992810525

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added course settings to enable or disable the Louis chatbot.
    • Added a customizable Louis chatbot prompt field in the course configuration panel.
    • Added Louis chatbot support to the SICP Python learning experience.
  • Changes

    • Moved chatbot availability from the SICP JavaScript experience to the Python experience.
    • Chat conversations now use the configured course instructions.

Walkthrough

Adds Louis chatbot configuration fields and admin controls, moves chatbot rendering from SICP JS to SICP Python, and updates chatbot callbacks and request documentation.

Changes

Louis chatbot integration

Layer / File(s) Summary
Course configuration and admin controls
src/commons/application/types/SessionTypes.ts, src/new_routes/courses/[courseId]/adminpanel.tsx, src/features/adminPanel/subcomponents/CourseConfigPanel.tsx
Adds optional Louis chatbot fields, synchronizes them from session state, and provides prompt and enable controls in the course configuration panel.
SICP Python chatbot integration
src/new_routes/sicpjs/_layout.tsx, src/new_routes/sicpy/_layout.tsx
Removes chatbot mounting from SICP JS and adds conditional chatbot rendering to SICP Python with section and visible-text callbacks.
Chat initialization and continuation
src/pages/sicp/subcomponents/chatbot/Chatbot.tsx, src/features/sicp/chatCompletion/api.ts
Memoizes chat initialization, adds dependencies to the send callback, and documents backend-owned system prompt loading.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description has summary, type, and checklist, but it omits the required How to test section and concrete test steps. Add a How to test section with reproducible steps and environment details, and include any issue or dependency context.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: configuring the Louis chatbot for the Python SICP textbook.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@yiilinzhang

yiilinzhang commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Resolved comments in #405 @sayomaki. The frontend no longer sends system prompts to the BE

@yiilinzhang
yiilinzhang marked this pull request as ready for review July 30, 2026 19:07
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@RichDom2185

Copy link
Copy Markdown
Member

@sayomaki I've fixed and force-pushed this branch, could you review?

@RichDom2185 RichDom2185 linked an issue Aug 11, 2026 that may be closed by this pull request
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.

Pixel: minimize broken

4 participants