refactor(i18n): remove the unused i18n layer - #2465
Closed
Subramaniyajothi6 wants to merge 952 commits into
Closed
Conversation
- New reportTemplates.ts service with ReportTemplate type, three built-in templates (executive, technical, compliance), and render/preview/export. - ReportTemplatePicker.tsx slide-over component with type filtering, inline preview, and .md export. - Integrate Templates button into Reports.tsx report cards. - 21 unit tests covering template lifecycle, edge cases, and output.
…tksh1#1547) * Resolves issue-utksh1#1413 * test: remove trailing whitespace
…1546) Co-authored-by: tmdeveloper007 <[email protected]>
Co-authored-by: tmdeveloper007 <[email protected]>
Co-authored-by: tmdeveloper007 <[email protected]>
…h1#1542) Co-authored-by: tmdeveloper007 <[email protected]>
Co-authored-by: tmdeveloper007 <[email protected]>
Co-authored-by: tmdeveloper007 <[email protected]>
Co-authored-by: tmdeveloper007 <[email protected]>
Co-authored-by: tmdeveloper007 <[email protected]>
Co-authored-by: tmdeveloper007 <[email protected]>
…ksh1#1527) * Resolves issue-utksh1#1427 * Removes white spaces.
…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]>
…1520) * Resolves issue-utksh1#1425 * Removed white spaces.
Co-authored-by: Tomeshwari-02 <[email protected]>
…ile, and workflow endpoints (utksh1#1557)
The debug default was changed from True to False in the security fix. Update the test to match the new secure default.
The saved_views_router now has require_api_key dependency. Override it in tests to bypass authentication for unit testing.
Add shared time_utils helpers and use timezone-aware UTC with an explicit offset for generated_at and discovered_at across reports, findings API responses, and report generation. Closes utksh1#1882
Default to_utc_iso to timespec=auto so finding intelligence tests can compare against datetime.now(UTC). Update TLS verification mocks for crawler client.stream() and stub crawl_target in API scanner tests.
…idable _init_default_policies() built the entire network denylist from the single Pydantic field settings.network_denylist. Pydantic replaces (rather than merges) a list field's default when SECUSCAN_NETWORK_DENYLIST is set via env var, so any operator adding even one custom denylist entry silently dropped the built-in protection for cloud metadata (169.254.169.254), loopback, RFC1918/CGNAT ranges, and IPv6 link-local/ULA space -- reopening SSRF to the metadata endpoint despite the code comment claiming the denylist was 'always enforced'. Fix: move those ranges into a new MANDATORY_DENYLIST module constant that is not read from settings and is applied unconditionally in _init_default_policies before any operator-configured entries. The operator-facing network_denylist setting is now purely additive. Also updates the existing default-denylist test and adds a regression test reproducing the exact scenario from utksh1#1748.
…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
* 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
Co-authored-by: Soujanya S H <[email protected]>
* 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
utksh1
approved these changes
Aug 6, 2026
utksh1
left a comment
Owner
There was a problem hiding this comment.
Removes unused i18n layer. Clean refactor.
…#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]>
I18nContext exported useTranslation and t(), but nothing ever called them. The only reference anywhere in the frontend was App.tsx importing I18nProvider to wrap the tree. Every UI string is hardcoded English, only an 'en' locale exists, translations carries just 'common' and 'nav', and setLocale is exposed through context with no UI able to reach it. So the layer is scaffolding for a feature that was never built. Removing it rather than wiring it in: reintroducing i18n properly when localisation is actually planned is easier than maintaining a half-present abstraction that looks supported but is not, and whose presence implies strings are already translatable when they are not. Deletes the context and its test, and unwraps the provider from App.tsx. No other module referenced it, so nothing else changes. Verified: no i18n reference remains anywhere in src, tests, docs or configs; tsc clean; quality gate 13 passed / 0 failed; full vitest 64 files / 566 tests pass -- 9 fewer than main's 575, which is exactly the deleted file.
Subramaniyajothi6
force-pushed
the
refactor/remove-dead-i18n-1864
branch
from
August 6, 2026 09:20
4f1c02c to
7793420
Compare
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.
Closes #1864
What I found
The issue offers two directions — wire i18n in as a pilot, or remove the layer. Surveying it first:
App.tsximportingI18nProviderto wrap the tree.useTranslationhas zero call sites.enlocale exists;translationscarries justcommonandnav.setLocaleis exposed through context, but no UI can reach it — there is no locale switcher.So this is scaffolding for a feature that was never built, not a partially-adopted one.
(Small correction to the issue text: the file is at
frontend/src/components/I18nContext.tsx, notfrontend/src/context/.)Why removal rather than a pilot
Reintroducing i18n properly when localisation is actually planned is easier than maintaining a half-present abstraction in the meantime. The current state is worse than having nothing: a provider in the tree and a
useTranslationexport imply strings are already translatable, when adopting it would still mean migrating every page, adding the missing keys, and building the switcher.That said, this is a product call as much as a code one. If localisation is on the roadmap and you would rather keep the scaffolding, say so and I will close this in favour of the pilot instead — the survey above is the same either way.
Changes
frontend/src/components/I18nContext.tsxfrontend/testing/unit/components/I18nContext.test.tsx(tests for the deleted module)I18nProviderfromApp.tsxNothing else referenced it, so nothing else changes.
Verification
i18n,useTranslation,setLocale,I18nProvider— acrosssrc,testing,docs, and configs includingquality-gate.cjs. Zero references remain.tsc --noEmit— cleanquality-gate.cjs— 13 passed, 0 failed (its 1 warning is a pre-existing 2000ms animation)vitest run— 64 files, 566 tests passedThat last number is worth stating precisely:
mainruns 65 files / 575 tests. The difference is exactly the one deleted test file and its 9 tests, which is what confirms nothing else depended on the layer.