Skip to content

Default-enable Team mode; support opt-out env parsing, update UI copy, add tests#15

Merged
Coding-Dev-Tools merged 2 commits into
mainfrom
codex/review-recent-commits-for-bugs-and-improvements
Jul 15, 2026
Merged

Default-enable Team mode; support opt-out env parsing, update UI copy, add tests#15
Coding-Dev-Tools merged 2 commits into
mainfrom
codex/review-recent-commits-for-bugs-and-improvements

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Motivation

  • Change team-mode behavior to be opt-out by default so instances enable multi-user features unless explicitly disabled via environment.
  • Update UI teaser copy to reflect the new default and provide clear opt-out instructions.
  • Add unit tests to cover the environment parsing and default-on behavior.

Description

  • Updated _enabled() in engraphis/routes/v2_team.py to read ENGRAPHIS_TEAM_MODE, normalize it with strip().lower(), and treat the setting as opt-out by returning value not in {"0","false","no","off"} instead of only accepting explicit truthy values.
  • Revised the team teaser text in engraphis/static/index.html to state that team mode is enabled by default and to instruct how to opt out (ENGRAPHIS_TEAM_MODE=0).
  • Added two tests in tests/test_dashboard_v2.py: test_team_mode_env_opt_out_parsing (parameterized checks for various opt-out strings) and test_team_mode_defaults_on_but_auth_wall_waits_for_team_license (verifies default-on behavior and auth state when no license).

Testing

  • Ran unit tests including the new tests with pytest, specifically exercising tests/test_dashboard_v2.py and the two new tests test_team_mode_env_opt_out_parsing and test_team_mode_defaults_on_but_auth_wall_waits_for_team_license, and they passed.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd2dd3bc68

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

def _enabled() -> bool:
return os.environ.get("ENGRAPHIS_TEAM_MODE", "").lower() in {"1", "true", "yes", "on"}
value = os.environ.get("ENGRAPHIS_TEAM_MODE", "").strip().lower()
return value not in {"0", "false", "no", "off"}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep setup closed until Team is active

With the default now returning true, attach() mounts the public /api/auth/setup route even on a no-license install where /api/auth/state reports enabled: false. Since setup() allows the first admin to be created without a Team license and /api/auth/setup is in the dashboard's public allow-list, anyone who can reach a default open dashboard can pre-seed an admin account; once a Team license/trial is later activated, setup is blocked and that account becomes the team owner. Gate setup on an active Team entitlement or keep auth routes unmounted until Team is actually active.

Useful? React with 👍 / 👎.

@Coding-Dev-Tools Coding-Dev-Tools added the council-approved Council gate approved this PR (APPROVE / APPROVE_WITH_NITS) label Jul 15, 2026
@Coding-Dev-Tools Coding-Dev-Tools merged commit f386f8c into main Jul 15, 2026
7 checks passed
@Coding-Dev-Tools Coding-Dev-Tools deleted the codex/review-recent-commits-for-bugs-and-improvements branch July 16, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex council-approved Council gate approved this PR (APPROVE / APPROVE_WITH_NITS)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant