Skip to content

feat(webui): shortener UI — links, collections, analytics (B6)#64

Open
PenguinzTech wants to merge 3 commits into
fix/frontend-infra-hardeningfrom
feature/shortener-webui
Open

feat(webui): shortener UI — links, collections, analytics (B6)#64
PenguinzTech wants to merge 3 commits into
fix/frontend-infra-hardeningfrom
feature/shortener-webui

Conversation

@PenguinzTech

Copy link
Copy Markdown
Contributor

Feature (Track B) — shortener React UI

Stacked on #59 (base = fix/frontend-infra-hardening, so it builds on the cookie-auth/helmet hardening). Targets release/v0.1.x. Consumes the shortener API (#63 + redirect/analytics PR).

  • Links — tenant links table (copyable short URL, clicks, status), create/edit modals with validation, soft-delete, on-demand QR via GET /urls/:id/qr, pagination + search + collection/active filters. Create/edit/delete gated to Admin/Maintainer; Viewer read-only.
  • Collections — nested (parent_id) tree, CRUD, role-gated.
  • Analytics — tenant summary (total links/clicks + clicks-over-time chart), top links, per-link drill-down. Advanced breakdowns (referer/device/browser) degrade gracefully to an Enterprise feature card on 402/403.
  • Routes + Shortener nav group; API centralized in useApi.shortenerApi (axios withCredentials cookie auth); sanitized [Component] logging.

Vite build passes; new files TypeScript-strict clean.

⚠️ Pre-existing tsc errors in Login.tsx/Users.tsx (inherited from v1.x, unrelated to this change) will fail the new webui CI typecheck gate — flagged for a separate fix PR.

🤖 Generated with Claude Code

React/TypeScript UI on the hardened cookie-auth webui:
- Links page: tenant links table (copyable short URL, click count, status), create/edit
  modals with validation, soft-delete, QR display via GET /urls/:id/qr, pagination +
  search + collection/active filters. Create/edit/delete role-gated (Admin/Maintainer);
  Viewer read-only.
- Collections page: nested (parent_id) collection tree, CRUD, role-gated.
- Analytics page: tenant summary (total links/clicks, clicks-over-time inline chart),
  top links, per-link drill-down. Advanced breakdowns (referer/device/browser) degrade
  gracefully to an 'Enterprise feature' card on 402/403.
- Routes in App.tsx, Shortener nav group in Sidebar, API calls centralized in
  useApi shortenerApi (withCredentials cookie auth). Sanitized [Component] logging.

Vite build passes. Note: pre-existing (v1.x) tsc errors in Login.tsx/Users.tsx are
unrelated to this change and flagged for a separate fix.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@PenguinzTech PenguinzTech added this to the v0.1.x milestone Jul 14, 2026
@PenguinzTech PenguinzTech added the type:feature New feature label Jul 14, 2026

@sourcery-ai sourcery-ai 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.

Sorry @PenguinzTech, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

PenguinzTech and others added 2 commits July 14, 2026 17:12
…to feature/shortener-webui

# Conflicts:
#	services/webui/src/client/hooks/useApi.ts
…ixes

Merge typecheck fixes from #59 into #64:
- Removed unused onToggle prop from Sidebar + Layout
- Removed unused imports: externalApi from useApi, setTokens/clearTokens/getAccessToken from useAuth
- Fixed unused parameter 'get' in useAuth zustand store
- Removed unused 'login' import from Login page
- Fixed user property mapping and GDPRConfig in Login
- Fixed role type narrowing in Users form

Additional #64 fixes:
- Remove unused ShortLink import from Analytics
- Remove unused barWidth variable from chart renderer
- Remove unused RoleGuard import from Links
- Remove unused user destructuring from Links

All tsc errors now resolved; npm run typecheck passes clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant