Repository navigation
fix: platform API compliance, UI/input bugs, and security hardening (25 confirmed findings) - #8
Merged
Merged
Conversation
Delete unused command modules (login/repos/filter/theme), an unused ThemedBox component, and an unused useFuzzy hook, found via automated dead-code analysis and cross-verified by hand. Un-export types/consts that are only used within their own module and drop the now-unused figures/ink-text-input/react-dom deps.
…, UI, and security 25 findings confirmed by a consensus-critic pass (3 skeptical reviewers per finding) over a prior deep multi-agent analysis, all fixed: API compliance: - Send the sort query param to the backend (Zalando-style +/-field, mapped to real Mongo field names) — sort_by/sort_dir were computed client-side but never reached the API. - Stop flooring CVSS filter bounds to integers. - Tolerate null nickname/uri/title/date/repo_id in API responses instead of throwing on parse. - Null-guard getScmRepos' per-provider response mapping and fix its pagination to check the raw (not null-filtered) page size. - Document why WS auth token and language/category filter casing can't be fixed client-side (backend-only query-param support / no stable casing convention across scanner tools). UI/input handling: - Gate StatusModal's Escape handler by inputMode, matching the isActive pattern used elsewhere (it was firing unconditionally). - Stop SCMConnectFlow's repo-search textbox from racing with its own j/k/space navigation handler; add scroll windowing past 12 repos. - Wire up the gg/G jump-to-top/bottom shortcuts in the repo and findings lists (handlers existed in useKeymap but nothing called them). - Add the missing "ready" status to the filter modal's checklist. - Fix Tab not submitting SmartTextInput fields. - Use the theme accent color in DiffModal instead of a hardcoded yellow. - Remove KeybindingsHelp's redundant any-key dismiss handler now that App's inputMode==='help' gate already owns it. - Remove dead activePanel/Panel/helpOpen state that mirrored inputMode. Security: - Warn when --token is passed on argv (CWE-214: visible via ps/procfs) and point users at PLEXICUS_TOKEN instead. - Make the login-redirect CSRF nonce single-use. Consistency/maintainability: - Apply friendlyError() at all 16 user-facing error sites instead of 1. - Extract createApiClient()/useFindingActions() to remove the loadConfig+PlexicusApi construction and suppress/false-positive logic duplicated across 8+ call sites.
… remediation-shape normalization The existing plexicusApi.test.ts only exercises MOCK_PLEXICUS=1 fixture paths, so fetch()'s error handling, buildFilterQuery()'s query-param construction, and getRemediations()'s several response- shape normalizations had zero coverage. Mock global fetch directly (bypassing MOCK_MODE via a cache-busting dynamic import) to test the real code paths: 401/error/network-failure handling, severity/status/ CVSS/sort query serialization, remediation envelope normalization, the 2FA login branch, getScmRepos' per-provider field mapping and null-guarding, and the new nullable-field schema fallbacks.
jpalanco
pushed a commit
that referenced
this pull request
Oct 24, 2026
… flow, keychain storage, revoking logout' (#8) from auth-v1-login into main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Result of a full compliance + quality pass on the TUI: verified against the live Platform API backend (Gitea source + a running FastAPI pod, not just the docs site, which had gaps), live-tested the built binary against staging across every screen, ran a multi-agent codebase analysis (144 agents across 6 dimensions), and put the findings through a consensus-critic pass (3 skeptical reviewers per finding) to discard false positives before fixing anything. 25 findings confirmed and fixed.
sortquery param now actually reaches the backend (was computed client-side and silently dropped); CVSS filter bounds no longer floored to integers; nullablenickname/uri/title/date/repo_idno longer crash response parsing;getScmReposnull-guards per-provider mappings and fixes a pagination bug where the null-filtered count (instead of the raw page size) was used to decide whether to fetch another page.StatusModal's Escape now respectsinputModeinstead of firing unconditionally; the SCM repo-picker's search box no longer races its own j/k/space navigation handler (two independentuseInputhooks were both consuming the same keystrokes);gg/Gjump shortcuts are wired up; the filter modal's status list was missingready;DiffModaluses the theme accent instead of a hardcoded yellow; removed a redundant any-key dismiss handler and some dead state (activePanel/Panel/helpOpen) that just mirroredinputMode.--tokenis passed on argv (CWE-214, visible viaps/procfs) and point atPLEXICUS_TOKEN; made the login-redirect CSRF nonce single-use. WS-auth-token-in-URL and language/category filter casing were investigated and documented as backend-only constraints (confirmed via the platform repo's source) rather than faked with a client-side fix that wouldn't actually be correct.friendlyError()is now applied at all 16 user-facing error sites (was 1); extractedcreateApiClient()/useFindingActions()to remove API-client-construction and suppress/false-positive duplication across 8+ call sites.fetch()'s error handling,buildFilterQuery()'s query serialization,getRemediations()'s response-shape normalization, the 2FA login branch, andgetScmRepos' field mapping — none of this had coverage before (the existing suite only exercisedMOCK_PLEXICUS=1fixture paths).Test plan
bun run typecheck— cleanbun test— 80/80 passing (27 new)readystatus visible), help open/dismiss,gg/Gnavigation, finding detail drill-in — all confirmed working against real data