---
suivi: 1403
date: 2026-09-02
sujet: selecteur_programme_limite_format
chantier: programmes
type: feature
statut: poussé
hash: 3a2f66ca
fichiers:
  - app/Support/ProgrammeSaisieSelectPresenter.php
  - app/Http/Controllers/ProgrammeController.php
  - resources/js/Components/Programmes/ProgrammeSearchSelect.vue
  - tests/Unit/ProgrammeSelectLimiteFormat1403SourceTest.php
  - tests/Unit/ProgrammeHorsErp1392SourceTest.php
  - database/data/journal_mises_a_jour_post_2026_06_12.php
  - docs/suivi/SUIVI_1403_selecteur_programme_limite_format.md
---

## PROMPT ENVOYÉ

SUIVI #1403 — lever limite 40 sur `/programmes/search`, format label `[CODE] - [COMMUNE] - [LIBELLÉ]`, retirer pastille Hors ERP du sélecteur, recherche par commune. Arbitrages #1400 : périmètre 3 écrans, limite globale, marqueur texte seul.

## FICHES LUES

- `SUIVI_1392_depot_facture_programme_hors_erp.md` — pastille sélecteur + case hors ERP ; pastille retirée ici, case inchangée.
- `SUIVI_1391_programme_hors_erp_socle.md` — pastilles liste/fiche conservées.

## SYNTHÈSE

- `ProgrammeController::search` : plus de `$limit` / `truncated` ; `orWhere('commune')` ; tri `libelle` conservé.
- `ProgrammeSaisieSelectPresenter::buildLabel` : segments omis si vides ; `HORS ERP` si hors ERP sans `code_envol` ; tiret simple `-`.
- `ProgrammeSearchSelect` : hints troncature et pastille ambre retirés.
- `#1401` absent de `origin/main` → pas de rebase.

## DÉPLOIEMENT-TEST

```bash
git pull origin main
php artisan optimize:clear
php artisan view:clear
php artisan journal:sync
```

1. Dépôt facture : ouvrir sélecteur → ~98 entrées (selon filtre enseigne).
2. Labels : HECTARE / ENVOL / hors ERP id 102.
3. Case hors ERP décochée : aucun hors ERP.
4. Pastille absente du sélecteur ; présente sur `/programmes` et fiche.
5. Recherche libellé / commune / code / analytique.

## LEÇON

Limite d’affichage back (`limit(40)`) ≠ filtre enseigne. Changer le presenter/label du search impacte tous les consommateurs du même endpoint — arbitrage périmètre obligatoire avant code.
