Skip to content

Lab2: fix for project blocked ui bug - #74306

Merged
molly-moen merged 3 commits into
stagingfrom
molly/project-blocked-fix
Jul 31, 2026
Merged

Lab2: fix for project blocked ui bug#74306
molly-moen merged 3 commits into
stagingfrom
molly/project-blocked-fix

Conversation

@molly-moen

Copy link
Copy Markdown
Contributor

After I added profanity filtering to Sketch Lab, Eric hit an issue where the /levels/<level-id> url would block you from editing if you added anything we flagged as profanity. The reason was our getLabViewPageAction function didn't account for /levels urls, and therefore we assumed we were on some sort of share page.

Before

image

After

Screenshot 2026-07-31 at 8 38 04 AM

Links

Testing story

Tested locally and added unit tests.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes Lab2 “project blocked” UI behavior for level URLs (/levels/<id>), ensuring those pages are treated as level pages (not share pages) so editing is not incorrectly blocked when privacy/profanity filtering flags content.

Changes:

  • Extend getLabViewPageAction to recognize standalone /levels/... URLs as level.
  • Add unit tests covering project URLs, course level URLs, and standalone /levels/... URLs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
apps/src/lab2/utils/getLabViewPageAction.ts Updates URL parsing so /levels/<id> is categorized as level for downstream blocked-UI logic.
apps/test/unit/lab2/utils/getLabViewPageActionTest.ts Adds coverage for getLabViewPageAction across project, level, and non-matching URLs.

Comment thread apps/src/lab2/utils/getLabViewPageAction.ts Outdated
@molly-moen
molly-moen marked this pull request as ready for review July 31, 2026 15:47
@molly-moen
molly-moen requested a review from a team July 31, 2026 15:47
@molly-moen
molly-moen merged commit d9a16d6 into staging Jul 31, 2026
8 checks passed
@molly-moen
molly-moen deleted the molly/project-blocked-fix branch July 31, 2026 16:49
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