Skip to content

fix(dash): confirm copied approval details - #506

Open
lKolabrodl wants to merge 1 commit into
DobermanCore:mainfrom
lKolabrodl:fix/dash/copied-feedback
Open

fix(dash): confirm copied approval details#506
lKolabrodl wants to merge 1 commit into
DobermanCore:mainfrom
lKolabrodl:fix/dash/copied-feedback

Conversation

@lKolabrodl

Copy link
Copy Markdown

Pull Request

Slice

What this PR does

After a pending card's redacted JSON is written to the clipboard, the copy button now displays Copied! for 1.5 seconds and then restores Copy details. Repeated successful copies restart the timer, while clipboard failures leave the button text unchanged.

The existing dashboard polish regression test now verifies the success text and timeout without changing the copied JSON fields. The README describes the visible confirmation.

Closes #503

Tests added (run in CI)

  • Updated tests/unit/test_dash_polish.py::test_pending_card_can_copy_only_redacted_details to cover the transient success label and 1.5-second reset.
  • pytest tests/unit/test_dash_polish.py -q — 18 passed.
  • Full Windows run: 3366 passed, 7 skipped, coverage 91.55%; one unrelated existing integration test failed because its nested temporary virtualenv could not import doberman (test_real_plugin_install_discovery.py). The same test was rerun alone and reproduced the environment-only ModuleNotFoundError.
  • ruff check . and ruff format --check .
  • lint-imports
  • python scripts/check_markdown_links.py
  • python -m tools.parity.generate_parity --check

Public-release safety (doberman-core only)

  • Contains nothing from the "not allowed" list: no enterprise/hosted code, no proprietary detection, no customer data, no secrets, no commercial-license code
  • Core still builds/tests/runs with NO enterprise package installed

Security checklist

  • Fails closed on error / uncertainty (this UI-only change does not alter decision execution; clipboard failure changes no approval state)
  • No secret, full file, or unredacted prompt logged or committed
  • Any guardrail/learning change is raise-only (no guardrail or learning behavior changed)
  • Every BLOCK/AUTH carries reason codes + a human explanation (unchanged)
  • doberman-core does not import doberman_enterprise

Edge cases covered / Deviations from plan / Risks introduced

  • Repeated successful copies clear the previous timer before starting a new one.
  • Clipboard rejection stays on the existing catch path and does not show a false success state.
  • No deviations or new security risk; copied fields remain the existing redacted allowlist.

AI assistance

This change was implemented with AI assistance and manually reviewed. All commands and verification results above were run locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dash: show a transient "Copied!" label on the pending-card copy button

1 participant