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

Đang mở
#3,912 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@patrickballard đang làm issue này rồi.

Từ ngày 6/11/2026.

  • #3913 của @patrickballard — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
backend, desktop

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
24.2k
Fork
2.2k
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
684

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CapSoftware/Cap

Tất cả issue của CapSoftware/Cap

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.