Skip to content

Conversation

@fisher-alice
Copy link
Contributor

@fisher-alice fisher-alice commented Feb 10, 2026

This follows up #70696 which added the instructions drawer to AI Tutor panel in Web Lab 2. This PR sets the initial resource panel tab to AI Tutor on weblab2 levels.
It also includes minor styling updates to the instructions drawer.

After update

Screencast of user on music and pythonlab, initial tab is Instructions. But then user navigates to weblab2, initial tab is AI Tutor.

Screen.Recording.2026-02-10.at.3.38.55.PM.mov

Screencast of updated styling of AI tutor panel with instructions drawer. Note that there is now an inset in the chat workspace for both collapsed and expanded instructions drawer.

Screen.Recording.2026-02-10.at.3.37.22.PM.mov

Links

Testing story

I confirmed locally that initial tab on weblab2 is AI tutor, but check on on other labs (music, aichat, pythonlab) that initial tab is still Instructions.

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Creation Checklist:

  • Tests provide adequate coverage
  • Privacy impacts have been documented
  • Security impacts have been documented
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Follow-up work items (including potential tech debt) are tracked and linked

@fisher-alice fisher-alice marked this pull request as ready for review February 10, 2026 21:42
@fisher-alice fisher-alice requested review from a team and molly-moen February 10, 2026 21:42

.collapsedInstructionsDrawerInset {
height: 50px;
.instructionsDrawerInset {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inset for both collapsed and expanded instructions drawer state.

>
<div className={styles.instructionsScrollArea}>
<div ref={instructionsContentRef}>{instructionsContent}</div>
{!isCollapsed && (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This div even with height 0 was impacting spacing when collapsed.

Copy link
Contributor

@molly-moen molly-moen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. We'll have to figure out long-term the best solution for cases where web lab 2 does not have ai tutor on (thinking about csp), but I think tying the default tab to having the drawer makes sense for now, and may solve that in the long-term too.

}, [levelId, viewAsUserId]);
// Reset current tab to instructions when switching levels or viewAsUserId unless there is an instructions drawer.
// If there is an instructions drawer, we set initial tab to the AI Tutor tab.
if (hasInstructionsDrawer) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know right now you won't have instructions drawer set to true without ai tutor, but we should probably verify that there is an ai tutor tab here before setting it as the current tab.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

And I wait until current URL contains "http://studio.code.org/courses/allthethingscourse/units/1/lessons/50/levels/2"
# Check that progress has been updated for the previous level
Then I verify progress in the header of the current page is "perfect" for level 1
And I wait until element "#resource-panel-tab-validation" is visible
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This UI test has been flaky in general so adding a wait step here.

@fisher-alice fisher-alice merged commit 025b696 into staging Feb 11, 2026
5 checks passed
@fisher-alice fisher-alice deleted the alice/drawer-followup branch February 11, 2026 18:07
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