Skip to content

fix: align sidebar controls, fix nav padding jump, add theme toggle - #2433

Closed
aaniya22 wants to merge 958 commits into
utksh1:mainfrom
aaniya22:fix/sidebar-layout-alignment-2362
Closed

fix: align sidebar controls, fix nav padding jump, add theme toggle#2433
aaniya22 wants to merge 958 commits into
utksh1:mainfrom
aaniya22:fix/sidebar-layout-alignment-2362

Conversation

@aaniya22

@aaniya22 aaniya22 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes multiple sidebar alignment/consistency issues:

  • Unified nav item padding between expanded (py-2.5py-3) and collapsed states so icons no longer visually shift position when the sidebar is toggled.
  • Fixed a JSX syntax bug on the Registry nav item ("Registry"isExpanded — missing space) that was silently breaking props.
  • Added a theme toggle button (previously missing from the sidebar, only present in Settings) next to the collapse button in the bottom actions area, wired to the existing useTheme() context. Both controls now sit in a consistently aligned, evenly spaced row/column depending on expanded state.

Related Issues

Fixes #2362

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Ran npm run dev, toggled the sidebar between expanded/collapsed states and confirmed nav icons no longer jump. Clicked the new theme toggle and confirmed the icon swaps between moon/sun and the theme context updates correctly. Tested in Chrome.

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

tmdeveloper007 and others added 30 commits July 1, 2026 21:59
…odule (utksh1#1524)

The extract_target helper in executor.py is a pure function but lives in
a heavy import chain (FastAPI, cache, config). Per the maintainer's
approved extraction pattern (used for routes_json_helpers), this extracts
extract_target into a small import-safe executor_target_helpers module
and re-exports it from executor.py so existing call sites keep working.

Closes utksh1#1389.

Co-authored-by: tmdeveloper007 <[email protected]>
NaitikVerma6776 and others added 9 commits July 22, 2026 08:16
…ne-standardize-9bb6

fix(backend): standardize timezone handling to UTC ISO-8601
…t-metadata-ssrf

Fix utksh1#1748: make cloud-metadata/private-range denylist non-overridable
Fix: add auth and owner isolation to saved views API (closes utksh1#1743)
Cover the scapy_recon plugin parser.py with targeted behavioural tests:

- Metadata contract: file existence, valid JSON, required fields, engine
  binary, target/type field declarations
- ARP output: host count, IP+MAC extraction, finding keys, category,
  severity, description content, metadata consistency, remediation
- ICMP output: host count, IP extraction, Unknown-MAC default
- Single-host edge case: IP+MAC in result and description
- Malformed/empty input: empty string, whitespace-only, no UP: lines,
  mixed noise lines, malformed UP: lines, missing MAC separator

No changes to backend source; test file only.
* fix: stop dashboard polling after health failure and add manual retry

* fix: skip pre-existing upstream auth tests that cannot pass with mocked auth

* fix: update postcss to resolve GHSA-r28c-9q8g-f849 high severity vulnerability

* fix: document localhost-only Docker binding, add opt-in network override
Resolves formatting-hygiene CI check failure (git diff --check).
- Sidebar.tsx now consumes SidebarContext (useSidebar) instead of
  local useState, fixing the corrupted/non-boolean localStorage bug
  (JSON.parse crash and '[object Object]' aria-expanded value) and
  enabling other components to react to sidebar width changes,
  resolving the nav padding jump.
- Toggle button now has a proper dynamic aria-label ('Collapse
  sidebar' / 'Expand sidebar') instead of relying on title only.
- Added missing focus-ring classes to the toggle button.

Fixes 8 failing Sidebar.test.tsx tests surfaced by the
formatting-hygiene / frontend-run-checks CI jobs.

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes: this patch removes the existing Sign Out action and Workflows navigation while fixing sidebar layout/theme controls. Those are unrelated functional regressions. Restore both existing actions, keep the layout change focused, and add a sidebar regression test for the retained navigation and authentication actions.

@utksh1 utksh1 added area:frontend Frontend React/UI work level:intermediate 35 pts difficulty label for moderate contributor PRs type:bug Bug fix work category bonus label labels Aug 4, 2026
AnzalKhan16 and others added 9 commits August 4, 2026 15:22
* Fix risk scoring defaults

* Update risk scoring tests
…low runs (utksh1#2396)

POST /workflows/{id}/run and WorkflowScheduler._run_workflow now apply the
same exploit-validation gate as start_task: exploit-level plugins and
validation_mode=CONTROLLED_EXTRACT steps require a target policy with
allow_exploit_validation=True, otherwise the step is skipped with a warning.

Fixes utksh1#2395
…h1#2367)

Closes utksh1#1845

Escape was a no-op outside text fields. useShortcuts had:

    if (e.key === 'Escape') {
        // Could emit global event to close modals
        return
    }

so nothing was ever emitted and no popover had anything to listen for.

useShortcuts now broadcasts a CustomEvent, and useEscapeToClose is the
subscriber side. Keeping the single window-level keydown listener in
useShortcuts and fanning out via one event means the listener count does
not grow with the number of overlays on a page, and every overlay closes
the same way.

Wired into both affected surfaces. The Saved Views panel is the one named
in the issue; the bulk-export dropdown on the Findings page had the same
problem and is fixed with it.

useEscapeToClose only subscribes while its overlay is open, so a closed
popover neither reacts nor keeps a listener alive.

Escape while typing keeps its existing behaviour: useShortcuts blurs the
focused field and returns without broadcasting. A field inside a panel
therefore takes two presses — one to leave the field, one to close the
panel — so a stray Escape mid-typing cannot discard what was being
entered. That is pinned by a test rather than left implicit.

Verified by mutation: dropping the broadcast fails the useShortcuts test,
and dropping the subscriber fails the SavedViewsPanel test.
* Add retry support for notification delivery

* Remove trailing whitespace
@aaniya22

aaniya22 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Request changes: this patch removes the existing Sign Out action and Workflows navigation while fixing sidebar layout/theme controls. Those are unrelated functional regressions. Restore both existing actions, keep the layout change focused, and add a sidebar regression test for the retained navigation and authentication actions.

Restored the Sign Out action and Workflows nav link that were accidentally dropped in the layout refactor — both now match main's original behavior. Added regression tests covering: Workflows/Reports/Settings nav retained, Sign Out visibility tied to auth state, signOut() firing on click, and the theme toggle still present alongside them. Layout/theme changes are otherwise untouched.

aaniya22 and others added 5 commits August 5, 2026 04:16
* test: add unit tests for _validate_lengths field length guard

Covers valid/boundary/over-limit cases for name, description, and
notes fields, plus custom resource_type substitution and None
handling for optional fields. Closes utksh1#2307.

* fix: bump undici to patch high-severity vulnerability (GHSA-8xcm-r25x-g524 and related)
* fix(theme): persist dark mode in localStorage and sync html class

* fix(deps): override undici to resolve npm audit vulnerability

* fix(deps): bump undici override to ^8.10.0 to resolve high severity audit vulnerability

* fix(deps): update jsdom to v25 and override undici for CI compatibility
…#2446) (utksh1#2451)

* test: add tests for rate_limiter.check_scan_rate_limit (closes utksh1#2446)

* test: fix sys.modules pollution in rate_limiter check_scan_rate_limit tests (closes utksh1#2446)

---------

Co-authored-by: Mavis Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Frontend React/UI work level:intermediate 35 pts difficulty label for moderate contributor PRs type:bug Bug fix work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] : Improve Sidebar Layout, Spacing, and Control Alignment