Skip to content

Write username as slug into the URL#50

Merged
trueberryless merged 3 commits into
mainfrom
copilot/write-username-as-slug-into-url
Mar 27, 2026
Merged

Write username as slug into the URL#50
trueberryless merged 3 commits into
mainfrom
copilot/write-username-as-slug-into-url

Conversation

Copilot AI commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

The selected GitHub username had no presence in the URL — navigating directly or sharing a link always loaded the default user, and browser history was unused.

Changes

  • PageWrapper.tsx

    • toSlug(username): normalizes to lowercase, strips non-[a-z0-9-] chars, collapses/trims hyphens — aligned with GitHub's username rules
    • getUsernameFromUrl(): reads ?user= query param on init, falls back to "trueberryless"
    • useState initializer reads from URL instead of a hardcoded string
    • handleUserSelect slugifies the chosen username, updates state, and pushes ?user=<slug> into history
    • popstate listener keeps state in sync with browser back/forward navigation
  • src/.gitignore: added package-lock.json (pnpm workspace)

Example

Selecting user Trueberryless updates the URL to:

https://example.com/?user=trueberryless

Navigating directly to that URL loads that user's activity on mount.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/github-activity/github-activity/src/node_modules/.bin/astro build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

@netlify

netlify Bot commented Mar 27, 2026

Copy link
Copy Markdown

Deploy Preview for trueberryless-github-activity ready!

Name Link
🔨 Latest commit e65b9f2
🔍 Latest deploy log https://app.netlify.com/projects/trueberryless-github-activity/deploys/69c64fc11b4c54000828fa37
😎 Deploy Preview https://deploy-preview-50--trueberryless-github-activity.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot

changeset-bot Bot commented Mar 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e65b9f2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI and others added 2 commits March 27, 2026 09:36
Agent-Logs-Url: https://github.com/trueberryless-org/github-activity/sessions/25b5fd9d-d8a1-45e2-b71e-402044a2e428

Co-authored-by: trueberryless <99918022+trueberryless@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement username slug in URL Write username as slug into the URL Mar 27, 2026
Copilot AI requested a review from trueberryless March 27, 2026 09:40
@trueberryless trueberryless marked this pull request as ready for review March 27, 2026 10:12
@trueberryless trueberryless merged commit ca4226f into main Mar 27, 2026
7 checks passed
@trueberryless trueberryless deleted the copilot/write-username-as-slug-into-url branch March 27, 2026 10:14
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