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

Aberta
#3,912 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

@patrickballard já está trabalhando nisso.

Desde 6/11/2026.

  • #3913 de @patrickballard — aberto

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
25/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Estagnada
Stack de tecnologia
rust
Domínio
backend, desktop

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Rust
Estrelas
24.2k
Forks
2.2k
Merge médio
1d 10h
PRs com merge (30d)
684

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de CapSoftware/Cap

Todas as issues de CapSoftware/Cap

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.