Repository navigation
fix(apps): align app name limit to 64 chars - #1048
Open
rohan-chaturvedi wants to merge 1 commit into
Open
rohan-chaturvedi wants to merge 1 commit into
rohan-chaturvedi wants to merge 1 commit into
Conversation
The create app dialog capped names at 32 chars, while the app settings rename, the REST API, the DB column and the public API docs all allow 64. The GraphQL createApp mutation had no name check, so blank names were accepted and names over 64 chars failed at the database. - Console: use a 64-char MAX_APP_NAME_LENGTH for create and rename. MAX_INPUT_STRING_LENGTH (32) is unchanged for other inputs. - createApp: reject blank names and names over 64 chars, matching updateAppInfo. - Add tests for the createApp name checks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔍 Overview
App name limits were inconsistent:
MAX_INPUT_STRING_LENGTH)App.namecolumnPOST /v1/apps/,PUT /v1/apps/<id>/updateAppInfocreateAppcreateAppaccepted blank names, and names over 64 chars failed at the database instead of returning a clear error.💡 Proposed Changes
MAX_APP_NAME_LENGTH = 64, used by the create dialog and the settings rename input.MAX_INPUT_STRING_LENGTH(32) is unchanged for its other uses (team name in onboarding).createApp: reject blank names and names over 64 chars, with the same checks and messages asupdateAppInfo.No REST API, model or docs changes: they already use 64.
🖼️ Screenshots or Demo
N/A
📝 Release Notes
❓ Open Questions
N/A
🧪 Testing
backend/tests/graphene/mutations/test_app.py: blank and whitespace names rejected, 65 chars rejected, 64 chars accepted. The rejection tests fail without the fix.pytest tests/passes excepttests/utils/test_secret.py::test_file_read_permission_error, which also fails onmainwhen run as root (chmod 000does not block root). Unrelated.yarn test(459 passed), eslint, prettier andtsc --noEmitclean.🎯 Reviewer Focus
backend/backend/graphene/mutations/app.py(CreateAppMutation.mutate).➕ Additional Context
N/A
✨ How to Test the Changes Locally
createAppwith a blank name or a name over 64 chars. It returns a GraphQL error and no app is created.💚 Did You...
tsc --noEmit)🤖 Generated with Claude Code
https://claude.ai/code/session_01VZnEgPhtLy7nNZvyxispob
Generated by Claude Code