Skip to content

[Tool #108] CIDR Calculator leaves the previous calculation visible after Clear #372

Description

@baixiangcpp

Summary

CIDR / Subnet Calculator clears the input field but retains the previous calculation in the result area.

Affected tool: CIDR / Subnet Calculator
Route: https://byteflow.tools/en/cidr-calculator
Observed during browser acceptance: 2026-08-18

Reproduction

  1. Open the affected route with a valid CIDR:
192.168.1.42/24
  1. Confirm that the subnet result is populated.
  2. Click Clear.
  3. Inspect the input, result fields, and Copy control.

Actual output

  • The input field is empty.
  • The old calculation for 192.168.1.42/24 remains visible.
  • The result state does not represent the empty input.

Expected output

Clear should reset the complete tool state:

  • input empty;
  • network, broadcast, host range, mask, and counts empty or returned to the documented placeholder;
  • Copy disabled because there is no current calculation.

Impact

The page displays a calculation for an input that no longer exists and may allow users to copy stale network information after clearing the tool.

Regression coverage

Clear after different valid CIDRs and after invalid input. Assert that all derived fields and Copy state are reset together with the input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions