Files
kleinanzeigen-bot/tests
Jens 28da3865c6 refactor: simplify humanizer behavior (#1200)
## ℹ️ Description

- Related issue(s): none.
- Simplifies the humanizer after PR #1199 by removing premature feature
surface that was either speculative or default-off, while keeping the
useful behavior: baseline pacing, typing jitter, and post-open viewport
randomization.

## 📋 Changes Summary

- Remove mouse-movement, idle-action, and long-pause humanizer
configuration and implementation.
- Keep plain click behavior plus baseline web_sleep pacing.
- Keep typing jitter default-on with bounded per-character delays.
- Keep post-open viewport resize default-on, preserving user-supplied
--window-size behavior and no launch-time bot --window-size.
- Update config defaults, generated schema/default config, German
translations, and unit tests.
- Delete the weak viewport integration test that asserted private state
instead of user-observable behavior.

### ⚙️ Type of Change

Select the type(s) of change(s) included in this pull request:
- [ ] 🐞 Bug fix (non-breaking change which fixes an issue)
- [ ]  New feature (adds new functionality without breaking existing
usage)
- [x] 💥 Breaking change (changes that might break existing user setups,
scripts, or configurations)

Removed config keys: mouse_movement, idle_action_probability,
long_pause_probability, long_pause_min_ms, long_pause_max_ms.

##  Checklist

Before requesting a review, confirm the following:
- [x] I have reviewed my changes to ensure they meet the project
standards.
- [x] I have tested my changes and ensured that all tests pass (pdm run
test).
- [x] I have formatted the code (pdm run format).
- [x] I have verified that linting passes (pdm run lint).
- [x] I have updated documentation where necessary.

Validation: pdm run format && pdm run lint && pdm run test — 1468
passed, 4 skipped.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Simplified browser interactions to use direct clicks and per-character
typing more consistently.
* Updated viewport handling so browser size is applied after opening,
using screen metrics when available.
* Improved resizing behavior to skip invalid or unsupported cases
without interrupting browsing.
  * Adjusted humanization timing defaults for smoother, lighter pacing.

* **Refactor**
* Narrowed the humanization settings to focus on pacing, typing jitter,
and viewport behavior.
* Removed unused idle and movement-related behavior from the browsing
flow.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-03 21:52:07 +02:00
..