Skip to content

feat: app-named slugs and ls current-directory indicator#7

Merged
willisrocks merged 6 commits intomainfrom
app-named-slugs
Mar 9, 2026
Merged

feat: app-named slugs and ls current-directory indicator#7
willisrocks merged 6 commits intomainfrom
app-named-slugs

Conversation

@willisrocks
Copy link
Copy Markdown
Contributor

Summary

  • Slugs now include the app name derived from git remote origin (directory name fallback), formatted as {random-slug}-{app-name} (e.g. swift-penguin-devproxy)
  • devproxy ls marks the current directory's project with *
  • Dynamic column width for long URLs, colored output preserved
  • DNS label length enforced (63 char max for composite slug)
  • 13 new unit tests for app name detection, sanitization, and slug composition
  • E2e tests updated with git repo fixtures for predictable app names

Test plan

  • 68 unit tests pass, 11 e2e tests pass
  • cargo clippy clean (0 warnings)

🤖 Generated with Claude Code

chris-4d and others added 6 commits March 9, 2026 14:52
Add implementation plan for changing URL format from
{slug}.{domain} to {slug}.{app-name}.{domain} where app-name
is derived from the git remote origin repo name, and for
adding a * indicator in devproxy ls for the current directory's
project.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change URL format from {slug}.{appname}.{domain} (two subdomain
levels) to {slug}-{appname}.{domain} (single level) because RFC
6125 wildcard certs only match one DNS label. This eliminates the
need for cert changes entirely and simplifies the daemon side —
the composite slug is used as the Docker Compose project name,
so the existing com.docker.compose.project label already carries
the full routing key.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move truncation from sanitize_subdomain into a new compose_slug
function that joins {random_slug}-{app_name} and truncates the
composite result to 63 chars (RFC 1035 DNS label limit). Prevents
overflow when the app name is long, since the composite could
otherwise exceed 63 chars.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
URLs now include the app/repo name: https://{slug}-{app-name}.{domain}
where app-name is derived from git remote origin (falling back to dir
name). The ls command marks the current directory's project with *.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use char-based truncation in compose_slug to avoid potential panic
  on multi-byte UTF-8 (composite[..63] -> chars().take(63))
- Restore colored (.cyan()) output in ls route lines
- Use dynamic column width in ls based on longest URL
- Use starts_with("* ") in tests instead of fragile contains("*")
- Move format_route_line into test module since run() inlines the
  logic for colored output support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@willisrocks willisrocks merged commit 274ea17 into main Mar 9, 2026
1 of 2 checks passed
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.

2 participants