Skip to content

ui.copy

Centralized user-facing copy strings for all UI surfaces.

All text shown to the user in notifications, live status, and gap-fill prompts is defined in taskclf.ui.copy so that labeling conventions stay consistent and changeable in one place.

Surfaces

Surface Function Example output
Transition suggestion transition_suggestion_text "Was this Coding? 12:00–12:47"
Live status live_status_text "Now: Coding"
Gap-fill prompt gap_fill_prompt "You have 2h 30m unlabeled. Review?"
Gap-fill detail gap_fill_detail "Review unlabeled: 9:00–11:30"
Activity source setup title activity_source_setup_title "Activity source unavailable"
Activity source setup body activity_source_setup_message "Manual labeling still works, but activity summaries..."
Activity source setup steps activity_source_setup_steps ["Install and start ActivityWatch.", ...]
Activity source help URL activity_source_setup_help_url "https://activitywatch.net/"

Design conventions (Decision 6)

  • Action-oriented framing with concrete time ranges for transition suggestions.
  • Transition suggestion time ranges are rendered in the user's local timezone for display, while structured interval fields remain UTC elsewhere in the UI/API.
  • Present-tense statement for live status, no time range needed.
  • No hedging language ("We think you might have been...").
  • No numeric confidence on live status or transition surfaces.
  • Activity-source setup guidance is also centralized here so the backend can return the same copy to every frontend surface.

API

taskclf.ui.copy

Centralized user-facing copy strings for all UI surfaces.

All text shown to the user in notifications, live status, and gap-fill prompts is defined here so that labeling conventions (Decision 6) stay consistent and are easy to update in one place.

transition_suggestion_text(label, start, end)

Action-oriented transition prompt with a concrete time range.

Source code in src/taskclf/ui/copy.py
def transition_suggestion_text(label: str, start: str, end: str) -> str:
    """Action-oriented transition prompt with a concrete time range."""
    return f"Was this {label}? {start}\u2013{end}"

live_status_text(label)

Passive present-tense status for the current bucket.

Source code in src/taskclf/ui/copy.py
def live_status_text(label: str) -> str:
    """Passive present-tense status for the current bucket."""
    return f"Now: {label}"

gap_fill_prompt(duration_str)

Prompt surfaced at idle return or session start.

Source code in src/taskclf/ui/copy.py
def gap_fill_prompt(duration_str: str) -> str:
    """Prompt surfaced at idle return or session start."""
    return f"You have {duration_str} unlabeled. Review?"

gap_fill_detail(start, end)

Detail line for the gap-fill review surface.

Source code in src/taskclf/ui/copy.py
def gap_fill_detail(start: str, end: str) -> str:
    """Detail line for the gap-fill review surface."""
    return f"Review unlabeled: {start}\u2013{end}"

activity_source_setup_title()

Title shown when the configured activity source is unavailable.

Source code in src/taskclf/ui/copy.py
def activity_source_setup_title() -> str:
    """Title shown when the configured activity source is unavailable."""
    return "Activity source unavailable"

activity_source_setup_message()

Non-blocking guidance shown when activity summaries cannot be loaded.

Source code in src/taskclf/ui/copy.py
def activity_source_setup_message() -> str:
    """Non-blocking guidance shown when activity summaries cannot be loaded."""
    return (
        "Manual labeling still works, but activity summaries and automatic "
        "activity tracking are unavailable until this source is set up."
    )

activity_source_setup_steps(endpoint)

Step-by-step setup guidance for the current activity source endpoint.

Source code in src/taskclf/ui/copy.py
def activity_source_setup_steps(endpoint: str) -> list[str]:
    """Step-by-step setup guidance for the current activity source endpoint."""
    return [
        "Install and start ActivityWatch.",
        f"Confirm the local server is reachable at {endpoint}.",
        "If you use a custom host, update aw_host in config.toml and restart taskclf.",
    ]

activity_source_setup_help_url()

Public help page for activity-source setup.

Source code in src/taskclf/ui/copy.py
def activity_source_setup_help_url() -> str:
    """Public help page for activity-source setup."""
    return "https://activitywatch.net/"