Skip to content

Show anonymous user banner on assignment viewer page - #2920

Merged
cqnykamp merged 6 commits into
mainfrom
claude/modest-franklin-8iBLw
Aug 24, 2026
Merged

Show anonymous user banner on assignment viewer page#2920
cqnykamp merged 6 commits into
mainfrom
claude/modest-franklin-8iBLw

Conversation

@cqnykamp

@cqnykamp cqnykamp commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #2862

  • Adds a fixed informational banner below the assignment header in AssignmentViewer when a student is logged in as an anonymous user
  • Banner says: "You are working on this assignment as an anonymous user."
  • The banner does not direct students to sign in (instructors may intentionally want anonymous students)
  • Adjusts headerHeight from static "80px" to "120px" when the banner is shown, so content is not obscured

Test plan

  • Create an assignment with a class code as an instructor
  • Visit /code/<classCode> as an anonymous user — banner should appear below the assignment title bar
  • Visit /code/<classCode> as a named (non-anonymous) user — banner should not appear
  • New e2e test: "Anonymous user sees banner; non-anonymous user does not" in assignmentWorkflow.cy.ts (@Group1)

https://claude.ai/code/session_01E8aWuAxKotiEZKkwwtwB3p


Generated by Claude Code

claude and others added 2 commits May 25, 2026 06:18
When a student accesses an assignment via a class code as an anonymous
user, display a fixed warning banner below the assignment header
informing them their work is only saved in the current browser.

The banner is shown at the /code/:classCode route (AssignmentViewer)
when user.isAnonymous is true. The header height is adjusted to
accommodate the extra 40px banner so content is not obscured.

Adds an e2e test verifying the banner appears for anonymous users and
does not appear for authenticated users.

Closes #2862

https://claude.ai/code/session_01E8aWuAxKotiEZKkwwtwB3p
@cqnykamp

Copy link
Copy Markdown
Contributor Author

The text is incorrect. Work IS saved when you are an anonymous user.

Anonymous users have real server-side accounts, so their work IS saved.
The actual risk is losing access to the account, since it is tied to the
browser session.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KkMxgaY3EpFQF5hYspMVdy
@cqnykamp

Copy link
Copy Markdown
Contributor Author

Good catch — fixed. Anonymous accounts are real server-side users, so the work is saved; the actual risk is losing access to the account since it's tied to the browser session. New wording:

You are logged in as an anonymous user. Your work is saved, but this account is tied to this browser, so you will lose access to it if you clear your browser data or switch devices.

cqnykamp and others added 3 commits August 24, 2026 14:56
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KkMxgaY3EpFQF5hYspMVdy
The fixed-position banner overlaid the top 40px of the scrolling content,
covering the "New attempt" button and breaking the brittle2 assignment
workflow test. Giving it a real grid row reserves the space so content
flows below it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KkMxgaY3EpFQF5hYspMVdy
@cqnykamp
cqnykamp merged commit dddd8f6 into main Aug 24, 2026
16 checks passed
@cqnykamp
cqnykamp deleted the claude/modest-franklin-8iBLw branch August 24, 2026 20:39
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.

Show banner informing students they are logged in anonymously

2 participants