Files
Jens 2f7695c136 chore: log page layout hints to debug Astro redesign issues (#1330)
## ℹ️ Description
Adds debugging output that shows whether and how far a user is affected
by the redesigned (Astro) Kleinanzeigen pages.

- Related issue: #1329 (category selection fails with `No HTML element
found with ID 'cat_185'`); no behavior change, diagnostics only.
- Motivation: reporters currently only see the timeout message.
Diagnostic HTML dumps may contain PII, so users hesitate to share them.

## 📋 Changes Summary

- New `WebScrapingMixin.page_layout_summary()` returns URL,
`astro-island` count, logged-in marker presence, offered `cat_*` IDs,
category picker presence, viewport width and `readyState`. It never
raises.
- `set_category`: DEBUG log of the layout before selection; WARNING with
the layout when a `cat_<id>` element is missing.
- `has_logged_in_marker`: DEBUG log of the layout when no marker is
found.
- `_extract_island_props`: DEBUG log when no Astro island with ad data
exists.
- Publish diagnostics JSON (`capture_on.publish`) now contains
`page_layout`, so no HTML dump is needed to tell the layouts apart.
- German translation for the new warning, docs note in
`CONFIGURATION.md`, unit test for the helper.

Checked the probe against a live logged-in session: start page has 31
islands and the marker, the classic category page has 0 islands and
lists `cat_185`.

### ⚙️ Type of Change
- [ ] 🐞 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (adds new functionality without breaking existing
usage)
- [ ] 💥 Breaking change (changes that might break existing user setups,
scripts, or configurations)

Diagnostics/logging only, none of the above applies.

## ✅ Checklist
- [x] I have reviewed my changes to ensure they meet the project's
standards.
- [x] I have tested my changes and ensured that all tests pass (`pdm run
utest`; `pdm run test` additionally launches real browsers and was not
run locally).
- [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.

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

* **Improvements**
* Failed-publish diagnostics now include a page layout summary, helping
distinguish redesigned pages from classic ones without including the
full HTML.
* Additional layout details are recorded when login checks or category
selection encounter problems.
  * Added clearer German translations for category selection errors.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-08 20:48:25 +02:00
..