Skip to content

fix: use title case for manifest display names#521

Open
srtaalej wants to merge 2 commits intomainfrom
ale-fix-display-name-casing
Open

fix: use title case for manifest display names#521
srtaalej wants to merge 2 commits intomainfrom
ale-fix-display-name-casing

Conversation

@srtaalej
Copy link
Copy Markdown
Contributor

@srtaalej srtaalej commented May 4, 2026

Summary

  • Manifest display names (display_information.name, bot_user.display_name, and Deno SDK Manifest({ name })) now use title case (e.g. "My App") instead of the kebab-case directory name (e.g. "my-app")
  • package.json and pyproject.toml names remain kebab-case per npm/Python conventions
  • Added kebabToTitleCase helper using golang.org/x/text/cases (already in go.mod)

Test plan

  • Unit tests pass for kebabToTitleCase conversion
  • Test_App_UpdateDefaultProjectFiles validates manifest files get title case while package.json/pyproject.toml keep kebab-case
  • Test_RegexReplaceAppNameInManifest updated to reflect title-cased input
  • Removed redundant "WriteFile error" test case that was identical to "manifest.json file exists"
  • Manual: slack create a new app → verify manifest display name is title-cased, directory and package.json stay kebab-cased

The display_information.name and bot_user.display_name fields in manifest
files were set to the kebab-case directory name (e.g. "my-app") instead of
a human-readable title case name (e.g. "My App").
@srtaalej srtaalej requested a review from a team as a code owner May 4, 2026 20:04
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.26%. Comparing base (7c7394c) to head (af8e3f4).

Files with missing lines Patch % Lines
internal/pkg/create/create.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #521   +/-   ##
=======================================
  Coverage   71.26%   71.26%           
=======================================
  Files         222      222           
  Lines       18682    18683    +1     
=======================================
+ Hits        13314    13315    +1     
  Misses       4188     4188           
  Partials     1180     1180           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

@srtaalej Thanks for getting this started 👾 ✨

I'm hesitant on this approach and am wondering if we instead separate how arguments and flags are parsed at this point?

Some issues I ran into are in comments but I'd like to share how I think about the "create" command:

$ slack create           # Generates a random app name as current
$ slack create my-app    # Keeps path "my-app" and manifest "my-app"
$ slack create "my App"  # Uses path "my-app" and manifest "my App"

🧰 Additional cases might complicate this but it's a good time to untangle this perhaps? I'm curious also if adding the --outdir flag makes parts of this more clear, while still supporting the happiest path simple cases?

Comment thread internal/app/app.go Outdated

// UpdateDefaultProjectFiles should update any project specific files if any
func UpdateDefaultProjectFiles(fs afero.Fs, dirPath string, appDirName string) error {
displayName := kebabToTitleCase(appDirName)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🔍 issue: We might want to avoid changing the app name format altogether if this is provided in flags? Forgive me if I'm not understanding requirements right, but this app manifest for example might break with replacements:

Translator - Translate Languages

🔗 https://slack.com/marketplace/A8KHN4EDV-translator-translate-languages

Comment thread internal/app/app.go Outdated

// UpdateDefaultProjectFiles should update any project specific files if any
func UpdateDefaultProjectFiles(fs afero.Fs, dirPath string, appDirName string) error {
displayName := kebabToTitleCase(appDirName)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🐍 ramble: Apps I keep might not fare well for additional example: "TIM", "TOM", or "snaek" have strange cases.

…ebab

Addresses review feedback — instead of converting the kebab-case
directory name to title case (which mangles names like "TIM" or
"Translator - Translate Languages"), pass the original user-provided
app name through to manifest display fields. This preserves the
user's exact casing and formatting.
@srtaalej srtaalej self-assigned this May 5, 2026
@srtaalej srtaalej added semver:minor Use on pull requests to describe the release version increment bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented enhancement M-T: A feature request for new functionality semver:patch Use on pull requests to describe the release version increment and removed semver:minor Use on pull requests to describe the release version increment labels May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented enhancement M-T: A feature request for new functionality semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants