Skip to content

Comments and docs/design.md describe a four-screen first run and a six-character class code; the flow has five steps and new class codes are eight characters #157

Closed

Description

@lumenpearson

What is broken.

Comments in the Android app and a section of docs/design.md describe the first-run flow and the class code as they used to be:

  • The flow now has five steps. OnboardingScreen.kt:73 says so ("The five screens a new install opens with"), and OnboardingStep is WELCOME, ACKNOWLEDGEMENT, PREFERENCES, PERMISSIONS, JOIN. Several comments and the design document still count four, and the design document's step list leaves out the permissions step entirely.
  • New class codes are eight characters (server/app/security.py:42, JOIN_CODE_LENGTH = 8, "Eight, not six."). The same field also takes the ten-character personal code from «📱 Подключить телефон» (services/device_invites.py:63). Two comments still call the class code six characters.

Nothing fails at runtime. The cost is in the next change: CLAUDE.md sends the reader to these comments and to docs/design.md for the reasoning, and here they give the wrong structure.

The failure scenario.

  1. A maintainer reads the KDoc of JoinScreen's onBack (JoinScreen.kt:80-81). It says the screen "is one of four screens and the other three are worth being able to go back to". There are five, and four steps are behind it: «Добро пожаловать», the acknowledgement, the preferences, and the permissions step PermissionsStep.
  2. They read OnboardingActions (OnboardingParts.kt:71). It says its two ends "stay in the same place on all four screens". The row is drawn on five: OnboardingScreen.kt:274, 423, 450, 562 and JoinScreen.kt:199.
  3. They open docs/design.md, «First run is four screens, not one field» (line 227). The list goes Welcome → Acknowledgement → Properties → «The class code» and never mentions the permissions step. Line 256 says the "introduction shown" flag is written "on entering the fourth step". goTo(OnboardingStep.JOIN) writes it on entering the fifth. A reader who trusts the document puts a new step "before the fourth" and gets the order and the flag's trigger wrong.
  4. The header of JoinScreen (line 66) says the screen turns "a six-character code from the classroom whiteboard" into a session. backup_rules.xml:8 justifies excluding everything from backup because "Re-entering the six-character class code is cheaper". The bot has issued eight-character codes since JOIN_CODE_LENGTH became 8. The field accepts 4–16 characters, and the same field also takes the ten-character personal invite code. data_extraction_rules.xml:2 inherits the same reasoning ("API 31+ equivalent of backup_rules.xml; same reasoning").

Where. (HEAD 42fdf0a)

  • android/app/src/main/kotlin/com/lumenpearson/lessons/ui/join/JoinScreen.kt:66: "a six-character code"
  • android/app/src/main/kotlin/com/lumenpearson/lessons/ui/join/JoinScreen.kt:80-81: "one of four screens and the other three"
  • android/app/src/main/kotlin/com/lumenpearson/lessons/ui/onboarding/OnboardingParts.kt:71: "on all four screens"
  • android/app/src/main/res/xml/backup_rules.xml:8: "the six-character class code"
  • docs/design.md:227 (heading), :234–253 (numbered list without the permissions step), :256 ("the fourth step")
  • For comparison, what the code actually does: OnboardingScreen.kt:73 and :92-98, server/app/security.py:42, server/app/services/device_invites.py:63, android/app/src/main/kotlin/com/lumenpearson/lessons/ui/common/AppDefaults.kt:32

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions