A custom date format chrono can't render stops every recording from starting

Ouverte
#3,912 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@patrickballard y travaille déjà.

Depuis le 6/11/2026.

  • #3913 par @patrickballard — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
25/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
rust
Domaine
backend, desktop

Piste de recherche

Start by reading format_recording_project_name and cap_utils::moment_format_to_chrono, then inspect the existing recording_project_names_preserve_random_placeholder_in_window_title test for related behavior. Reproduce with {moment:YYYY 100%} and check how an unrenderable placeholder and placeholders in window titles are handled. Done means recording starts and the expected placeholder text is preserved; linked pull request #3913 is already open.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Description

The default project name template accepts custom formats such as {date:DD/MM/YYYY} and {moment:YYYYMMDD}, and Cap's support assistant lists {moment:...} among the placeholders. format_recording_project_name turns the format into a chrono one with cap_utils::moment_format_to_chrono and renders it with datetime.format(&format).to_string(). That passes a % straight through, so a format chrono can't render, such as one ending in % or containing %Q, makes to_string() panic. The panic lands in the recording start task, so no recording can start until the template is changed.

Window titles reach the same code. {target_name} is substituted before the date placeholders are expanded, so a window titled "Notes {date}" makes a project named "Notes 2026-11-06 …", and a title containing {time:100%} fails the start the same way. {random} in a window title is already kept as it reads (recording_project_names_preserve_random_placeholder_in_window_title).

Reproduction
  1. Set Settings → General → Default project name to {moment:YYYY 100%}.
  2. Start a Studio recording.
  3. The recording doesn't start. The log shows recording start task died: task … panicked with message "a Display implementation returned an error unexpectedly: Error".

Seen with a debug build of main (da2c85eed) on macOS.

Expected

The recording starts, and the placeholder that can't be rendered is left as typed, as an unknown placeholder is. Placeholders inside a window title stay as they read.

Langage dominant
Rust
Étoiles
24.2k
Forks
2.2k
Merge moyen
1 j 10 h
PR mergées (30 j)
684

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de CapSoftware/Cap

Toutes les issues de CapSoftware/Cap

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.