fix(web): remove dead UI affordances and fabricate-free dashboard stats - #290
fix(web): remove dead UI affordances and fabricate-free dashboard stats#290usehoplite[bot] wants to merge 10 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Extract the duplicated NEXT_PUBLIC_DOCS_URL fallback into @/lib/constants and use it from the dashboard sidebar, homepage navbar, footer, and hero (review feedback on #290). Regenerate bun.lock with bun 1.2.21: the committed lockfile was stale (deps for the removed apps/video workspace, media bundlers, and module federation tooling), which made 'bun install --frozen-lockfile' in CI fail instantly and red every check. Co-authored-by: Yash Dewasthale <yashdev.yvd@gmail.com>
🤖 Supercode AI ReviewSummaryThis PR audits and cleans up dead UI affordances across the Walkthrough
Changes table
Findings
Risk assessmentLow — All changes are UI/UX removals or additive real-query replacements; no schema migrations, no auth changes, no new external dependencies. The Prisma query additions are read-only Test plan
Suggested PR descriptionWhat Audited
Why Dead UI elements erode trust and create false expectations. Fabricated analytics data (random reviews, hardcoded repo counts) would mislead users about their actual usage. The stale lockfile was causing every CI run to fail at the install step. How tested
Automated review by Supercode · leave a 👍/👎 reaction to rate this review |
|
Addressed all findings from the Supercode AI Review; fixes are on the branch head (
All three failing CI checks are addressed and verified locally with the exact CI commands (bun 1.2.21): |
- login: drop non-functional Moon toggle, fix 'Supecode' typo, disable unimplemented GitLab/AzureDevOps/Bitbucket buttons with 'Soon' badge, replace dead SIGN UP/Terms/Privacy '#'' links with static text - sidebar: unlock working Logs page, drop dead 'Refer a Friend' item, point Documentation at DOCS_URL instead of /dashboard - header: remove dead Tips button and 'Refer and Earn' dropdown item - dashboard home: remove dead Repositories/Authors filter buttons, fix 'Acitvity Caldendar' typo - dashboard stats: replace hardcoded repos/reviews and random sample activity with real Prisma queries; rename toatalReviews typo - PR list: remove sort-by-score toggle that no code consumed - PR workspace: remove button-less Preview toolbar button - providers: remove dead Filter and Add Repo buttons Co-authored-by: Yash Dewasthale <yashdev.yvd@gmail.com>
Extract the duplicated NEXT_PUBLIC_DOCS_URL fallback into @/lib/constants and use it from the dashboard sidebar, homepage navbar, footer, and hero (review feedback on #290). Regenerate bun.lock with bun 1.2.21: the committed lockfile was stale (deps for the removed apps/video workspace, media bundlers, and module federation tooling), which made 'bun install --frozen-lockfile' in CI fail instantly and red every check. Co-authored-by: Yash Dewasthale <yashdev.yvd@gmail.com>
- Rename getMontlyActivity -> getMonthlyActivity across actions and all four consumers (dashboard-content, metric cards). - Use setUTCHours for the six-month activity window boundary so it does not depend on the server's local timezone. - Suppress the accent-stripe hover animation on disabled provider buttons and drop the false hover affordance on static Terms/Privacy text in login-ui. - cli-client lint: replace html <a> with next/link in studio page and login form, escape apostrophes in payment copy, make the sidebar skeleton width deterministic (useId) instead of Math.random in render, and justify the hydration mounted-gate in particle-background. Co-authored-by: Yash Dewasthale <yashdev.yvd@gmail.com>
- cortex-sdk: align the 'ai' peer with the v7 API the gateway code actually uses (LanguageModelUsage.inputTokenDetails, V3-protocol models). The previous ^4||^5||^6 range resolved to ai@5 whose types reject the code, failing the TypeScript Check job. - permission-prompt tests: probe commands (echo/ls) are auto-allowed by READONLY_COMMAND_PATTERNS so the prompt path never fired; switch to non-allowlisted safe commands that genuinely exercise prompting. - speech.ts: check SMALLEST_API_KEY config before ffmpeg availability so the missing-key reason is reported on platforms without ffmpeg (Linux CI), matching the test contract. Co-authored-by: Yash Dewasthale <yashdev.yvd@gmail.com>
…tall - connectors command: drop calls to a MergeConnectorManager API that never existed (getConnectorList/setConfig/connect/disconnect/ setupInstructions); build the list from isConfigured and persist the interactive config via process.env + loadConfigFromEnv, so the command no longer throws at runtime. - question.ts/todowrite.ts: resolve strict-null errors (capture narrowed options, guard indexed access). - model-access.test.ts: call bun's mock.module through a typed alias so tsc accepts it. - postinstall: generate packages/db, db-terminal, and superdesign-db Prisma clients with a fallback DATABASE_URL so typecheck works in CI without a live database (previously superdesign's typecheck could never pass on a fresh install). Co-authored-by: Yash Dewasthale <yashdev.yvd@gmail.com>
Unix-entity escape 56 prose apostrophes/quotes in JSX, type 20 explicit anys (octokit/github graphql/recharts payloads), and resolve the React hooks compiler errors: module-load epoch for Date.now labels, useId-based skeleton widths, useSyncExternalStore for useMounted, prev-tracking for the sidebar/profile-form state resets, module-scope countdown init, and justified suppressions for motion's Slot pattern and react-tooltip cloneElement dataset attrs. Web lint now exits clean (0 errors). Co-authored-by: Yash Dewasthale <yashdev.yvd@gmail.com>
2cbb85c to
898f80c
Compare
…down icons Co-authored-by: Yash Dewasthale <yashdev.yvd@gmail.com>
The CI workflow has failed before its first step on every run (main pushes and PRs alike) for over a month: jobs are created and die within seconds with zero steps recorded. Branch content is exonerated (install/typecheck/ lint/test all pass in a pristine clone with bun 1.2.21), and the only third- party action every job depends on is oven-sh/setup-bun@v2. Replace it with an equivalent plain-shell download of the exact pinned binary so job provisioning no longer depends on that action being resolvable. Co-authored-by: Yash Dewasthale <yashdev.yvd@gmail.com>
Co-authored-by: Yash Dewasthale <yashdev.yvd@gmail.com>
…ntent) Co-authored-by: Yash Dewasthale <yashdev.yvd@gmail.com>
CONFIRMED root cause: the GitHub account is locked due to a billing issue — no repository change can fix thisUpdate (Sep 3, 09:05 UTC): the exact failure is now confirmed from GitHub's own annotation on the probe run (run 33736571769, job "probe"):
The snippet below is the annotation as rendered by GitHub's UI (DOM text of the run summary page): Evidence trail
Current branch stateBoth experimental commits (bun-download variant, probe workflow) were reverted. Head Action needed from the repo owner: resolve the billing/account lock in GitHub settings. Once the lock clears, this workflow and branch content will produce green checks without further changes. |
Summary
Audited the main web flows (login, dashboard home, PR list/workspace, providers, settings/sidebar) for common UX papercuts and fixed the highest-impact ones with small, focused changes. No new behavior was invented — dead/redundant UI was removed and fabricated analytics data was replaced with real database queries.
Fixes by flow
Login (
modules/components/login-ui.tsx)title="Coming soon"; the accent-stripe hover animation is suppressed for disabled buttons.href="#") with static "SIGN IN WITH GITHUB" text; Terms/Privacyhref="#"links are plain non-interactive text (hover affordance removed).Sidebar (
components/dashboard/sidebar.tsx)locked: truedespite being a working page — unlocked it./dashboard/./dashboard; now uses the sharedDOCS_URLconstant.Dashboard header (
components/dashboard/dashboard-header.tsx)/dashboard/referroute.Dashboard home (
components/dashboard/dashboard-content.tsx)main(which now includes feat: enhance dashboard functionality and improve webhook handling: #291, where those two controls were implemented into working searchable filter dropdowns over the analytics data), the branch keeps the functional version rather than regressing the feature. The "Acitvity Caldendar" → "Activity Calendar" typo is fixed.authorOptionseffect (which calledsetStatesynchronously insideuseEffect, failing the lint gate) into the React-sanctioned render-time prev-tracking pattern with identical semantics.Dashboard stats (
modules/dashboard/actions/index.ts)totalReposwas hardcoded5→ realprisma.repository.count()scoped to the user.toatalReviewswas hardcoded50(and typo'd) → realprisma.review.count(), renamedtotalReviews; retains feat: enhance dashboard functionality and improve webhook handling: #291'sstatus: "completed"filter after the merge.getMontlyActivity(typo'd) → renamedgetMonthlyActivity; the 45 random sample review dates are now a real Prisma query over the last 6 months, with the window boundary on UTC midnight.PR list (
app/dashboard/pull-requests/page.tsx) — removed the dead "sort by score" toggle (ReviewItemhas noscorefield; list is already sortedupdatedAt desc).PR workspace (
modules/pull-requests/components/pr-workspace.tsx) — removed the unclickable "Preview" toolbar button.Providers (
app/dashboard/providers/page.tsx) — removed the dead "Filter" and "Add Repo" buttons (search box and per-row actions already cover both).Review feedback addressed (Supercode AI review + tembo)
prs.tsx,total-commits.tsx,total-repositories.tsx) runs its ownuseQuery(["dashboard-stats"], getDashboardStats)and rendersstats?.totalPRs/totalCommits/totalRepos. The duplicate query removed fromdashboard-contentwas genuinely unused.getMontlyActivity→ renamed togetMonthlyActivityeverywhere.setUTCHours(0,0,0,0).cursor-default, no hover color.DOCS_URL→ extracted to@/lib/constants.ts(tembo), used by sidebar + navbar + footer + hero.Repository-level CI repairs included in this PR
This repo's CI job bodies had been failing for days for every PR and main push. The content-level root causes are fixed here:
bun.lockdescribed a deletedapps/videoworkspace, sobun install --frozen-lockfilefailed instantly in every job. A clean frozen install now passes.supercode-cortexused the ai v7 API (LanguageModelUsage.inputTokenDetails, V3-protocol providers) but declaredai: ^4||^5||^6; the peer range is now^7, resolving to the same ai@7.0.77 web/api use. Fixedapps/supercode-cli/servertype errors (connectors command called a never-existingMergeConnectorManagerAPI and would throw at runtime; strict-null errors inquestion.ts/todowrite.ts; bunmock.moduletyping). Madesuperdesigntypecheck work on fresh installs by generating all Prisma clients in postinstall with a fallbackDATABASE_URL(previously its generated client never existed in CI and its typecheck could not pass).apps/supercode-cli/client(html links →next/link, escaped apostrophes, deterministic skeleton width, justified hydration-gate suppression) and cleared the 86 pre-existing web lint errors (56 prose-apostrophe entity escapes, 20 explicitanys typed, and the React-hooks-compiler errors: module-load epoch for relative-time labels,useId-based skeleton widths,useSyncExternalStoreforuseMounted, render-time prev-tracking for sidebar/profile-form state resets, module-scope countdown initialization, and two justified suppressions for motion's Slot pattern and react-tooltipdata-*attrs).supercode-cli/serverpermission tests (probe commands were auto-allowed byREADONLY_COMMAND_PATTERNS, so the prompt path never fired) andcanVoiceCapture(config check now precedes the ffmpeg check, matching its test contract).Conflict resolution after rebase onto #291
The merge-conflict rebase (automatic attempt 1) surfaced three files where #291 had also changed scope:
dashboard-content.tsx,modules/dashboard/actions/index.ts,modules/dashboard/actions/analytics.ts. Resolutions kept both sides: #291'sauthorparameter and author filtering (ContributorMetric, 3-arggetAnalyticsData), itsstatus: "completed"review-count filter, and this PR'sPrItemtyping,totalReviewsrename, and import cleanup. The #291 code inherited one lint-blocking bug (setStateinsideuseEffectfor the author catalog) and two missing icon imports (Box,User), all fixed in the follow-up commit.Verification
bun install --frozen-lockfilefrom a cleannode_modulespasses (bun 1.2.21, the CI-pinned version).turbo run typecheck --force: 18/18 packages pass.turbo run lint --force: 17/17 pass (web lint: 0 errors).bun test: 219 pass, 0 fail — re-run in full after the rebase.ci.ymlrun — onmainpushes and on PRs alike — has failed for over a month before its first step (jobs created, zero steps recorded, no log produced), including a minimal probe workflow containing onlyrun: echo probe-ok. Diagnosis and evidence are in the PR comments (comment by usehoplite[bot], Sep 3). Recommendation: check the org/repo Actions settings and billing; if hosted runners are restored, this workflow runs the verified-green content as written./and/loginreturn HTTP 200 on a cold start; login page inspected in the browser — zero anchors, GitHub enabled, GitLab/AzureDevOps/Bitbucket disabled with "Soon" badges, brand text corrected. Dashboard internals are GitHub-OAuth-gated, so those were verified by typecheck plus code review.Pixel-level verification of the login screenshot was not performed (no image-inspection route); the rendered DOM/text was verified instead.