Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 93 additions & 17 deletions daiv/accounts/locale/pt/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-21 15:27+0100\n"
"POT-Creation-Date: 2026-07-22 07:26-0500\n"
"PO-Revision-Date: 2026-04-04 22:34+0100\n"
"Last-Translator: \n"
"Language-Team: Portuguese <pt@li.org>\n"
Expand Down Expand Up @@ -111,6 +111,9 @@ msgid_plural "you have %(n)s"
msgstr[0] "tens %(n)s"
msgstr[1] "tens %(n)s"

msgid "caught up"
msgstr "em dia"

msgid "Feed"
msgstr "Feed"

Expand Down Expand Up @@ -146,6 +149,19 @@ msgstr "Problema de ferramenta"
msgid "needs your attention"
msgstr "precisa da tua atenção"

# Story 5.1 — Finding -> Fix scope/intent preview
msgid "Fix it"
msgstr "Corrigir"

msgid "Retry"
msgstr "repetir"

msgid "Review this"
msgstr "Rever isto"

msgid "Re-run"
msgstr "repetir agora"

msgid "mark seen"
msgstr "marcar como visto"

Expand Down Expand Up @@ -183,6 +199,42 @@ msgstr "próxima verificação %(sweep)s"
msgid "No scheduled runs yet."
msgstr "Ainda não há execuções agendadas."

msgid "Start a fix"
msgstr "Iniciar uma correção"

msgid "Review what will run before starting it. Nothing happens until you confirm."
msgstr "Reveja o que será executado antes de iniciar. Nada acontece até confirmar."

msgid "Close"
msgstr "Fechar"

msgid "Scope"
msgstr "Âmbito"

msgid "default branch"
msgstr "ramo predefinido"

msgid "What will be attempted"
msgstr "O que será tentado"

msgid "Instruction"
msgstr "Instrução"

msgid "Cancel"
msgstr "Cancelar"

msgid "This finding is no longer actionable — nothing to start."
msgstr "Esta deteção já não é acionável — nada para iniciar."

msgid "Fix started"
msgstr "Correção iniciada"

msgid "A change session is on its way."
msgstr "Uma sessão de alteração está a caminho."

msgid "View session"
msgstr "Ver sessão"

msgid "today"
msgstr "hoje"

Expand Down Expand Up @@ -345,20 +397,14 @@ msgstr "rever"
msgid "Fix"
msgstr "corrigir"

msgid "Retry"
msgstr "repetir"

msgid "View run"
msgstr "ver execução"

msgid "DAIV checked your work — nothing is waiting on you."
msgstr "O DAIV verificou o teu trabalho — nada está à tua espera."

#, python-format
msgid "checked %(counter)s run · last checked %(checked)s"
msgid_plural "checked %(counter)s runs · last checked %(checked)s"
msgstr[0] "verificada %(counter)s execução · última verificação %(checked)s"
msgstr[1] "verificadas %(counter)s execuções · última verificação %(checked)s"
msgid "checked %(counter)s run"
msgid_plural "checked %(counter)s runs"
msgstr[0] "verificada %(counter)s execução"
msgstr[1] "verificadas %(counter)s execuções"

msgid "No runs yet."
msgstr "Ainda não há execuções."
Expand Down Expand Up @@ -441,6 +487,12 @@ msgstr "90 dias"
msgid "All time"
msgstr "Desde sempre"

msgid "Retry started…"
msgstr "Repetição iniciada…"

msgid "Re-run started…"
msgstr "Reexecução iniciada…"

msgid "Welcome to DAIV"
msgstr "Bem-vindo ao DAIV"

Expand Down Expand Up @@ -509,14 +561,38 @@ msgstr "Autorizar"
msgid "Authorizing will grant this application access to your DAIV account"
msgstr "Ao autorizar, irá conceder a esta aplicação acesso à sua conta DAIV"

msgid "caught up"
msgstr "em dia"
msgid "This finding is no longer actionable — nothing was started."
msgstr "Esta deteção já não é acionável — nada foi iniciado."

msgid "Repository not found or not accessible."
msgstr "Repositório não encontrado ou não acessível."

msgid "Could not start the fix. Please try again in a moment."
msgstr "Não foi possível iniciar a correção. Tente novamente daqui a instantes."

msgid "Retry this run?"
msgstr "Repetir esta execução?"

msgid "This run can no longer be retried — nothing was started."
msgstr "Esta execução já não pode ser repetida — nada foi iniciado."

msgid "This run can no longer be retried — nothing to start."
msgstr "Já não é possível repetir esta execução — nada para iniciar."

msgid "Could not start the run. Please try again in a moment."
msgstr "Não foi possível iniciar a execução. Tente novamente daqui a instantes."

msgid "Re-run schedule?"
msgstr "Repetir agendamento?"

#~ msgid "DAIV checked your work — nothing is waiting on you."
#~ msgstr "O DAIV verificou o teu trabalho — nada está à tua espera."

#, python-format
msgid "checked %(counter)s run"
msgid_plural "checked %(counter)s runs"
msgstr[0] "verificada %(counter)s execução"
msgstr[1] "verificadas %(counter)s execuções"
#~ msgid "checked %(counter)s run · last checked %(checked)s"
#~ msgid_plural "checked %(counter)s runs · last checked %(checked)s"
#~ msgstr[0] "verificada %(counter)s execução · última verificação %(checked)s"
#~ msgstr[1] "verificadas %(counter)s execuções · última verificação %(checked)s"

#~ msgid "stale"
#~ msgstr "parado"
Expand Down
85 changes: 83 additions & 2 deletions daiv/accounts/templates/accounts/_feed_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,19 @@

Story 2.4 adds a per-user seen/unread layer keyed on ``item.read_at`` (NULL = unread), orthogonal to
``data-status``: an unread neutral wash + SR-labelled dot, the drill-through marks-seen, and a
resolved-only dismiss control. Neutral tokens ONLY — never a status/teal/violet color. Still NO Epic
5 action button (fix/review/retry).
resolved-only dismiss control. Neutral tokens ONLY — never a status/teal/violet color.

Story 5.1 adds the ONE Epic-5 action button: a ``fix it`` affordance on a still-actionable
found-issues item that carries a fix-able finding (``item.fixable`` — computed server-side via the
``offered_action == FIX`` + ``still_actionable`` + non-empty ``fix_prompt`` gate). It sits OUTSIDE
the card ``<a>`` and ``hx-get``s the scope/intent preview into ``#fix-preview-mount`` — it NEVER
POSTs / launches; only the preview's explicit confirm does. Inline amber, byte-identical to the
Queue's.

Story 5.2 completes the action slot: ``retry`` (a failed, retryable, still-actionable run — a
confirm-trigger like ``fix``, red), ``review this`` (a needs-attention item — a PLAIN navigate: MR
link-out / report drill, cyan), plus a low-emphasis teal ``re-run`` secondary control gated on
``item.can_rerun`` (a resolvable owned schedule), sibling to dismiss.
{% endcomment %}
<article id="feed-item-{{ item.run.id }}"
data-testid="feed-item"
Expand Down Expand Up @@ -75,6 +86,76 @@

<span class="mt-0.5 shrink-0 text-text-faint" aria-hidden="true">{% icon "chevron-right" "h-4 w-4" %}</span>
</a>
{% comment %} Epic-5 action slot (one primary status verb). Story 5.1 wired ``fix``; Story 5.2 adds
``retry`` (a failed, still-actionable, retryable run) and ``review this`` (a needs-attention
item). ``fix`` / ``retry`` ``hx-get`` the confirm dialog into the persistent mount — they NEVER
POST / launch; only the dialog's explicit confirm does. ``review this`` launches nothing: it is
a plain navigate (MR link-out new tab / else report drill). Colors bind to the verb (AC7): fix
amber, retry red (byte-identical to the Queue's retry), review cyan. Outside the card ``<a>`` so
an action click never marks-seen-navigates. {% endcomment %}
{% if item.status_slug == "found-issues" and item.offered_action == "fix" and item.fixable %}
<div class="flex shrink-0 items-center self-center py-4 pr-2 pl-2">
<button type="button" id="fix-btn-feed-{{ item.run.id }}"
data-testid="feed-item-action" data-action="fix"
hx-get="{% url 'feed_item_fix' item.run.id %}?surface=feed"
hx-target="#fix-preview-mount" hx-swap="innerHTML"
class="inline-flex min-h-[44px] items-center gap-1.5 rounded-md px-2.5 py-1.5 text-[12px] font-medium transition-opacity hover:opacity-80 md:min-h-0"
style="color: var(--color-status-found); background-color: color-mix(in srgb, var(--color-status-found) 12%, transparent); border: 1px solid color-mix(in srgb, var(--color-status-found) 28%, transparent)">
{% icon "bolt" "h-3.5 w-3.5" %}<span>{% translate "Fix it" %}</span>
</button>
</div>
{% elif item.offered_action == "retry" %}
{% comment %} RETRY confirm-trigger — red (``--color-status-fail``), byte-identical to the Queue's
retry button (see _queue_item.html). {% endcomment %}
<div class="flex shrink-0 items-center self-center py-4 pr-2 pl-2">
<button type="button" id="retry-btn-feed-{{ item.run.id }}"
data-testid="feed-item-action" data-action="retry"
hx-get="{% url 'feed_item_retry' item.run.id %}?surface=feed"
hx-target="#fix-preview-mount" hx-swap="innerHTML"
class="inline-flex min-h-[44px] items-center gap-1.5 rounded-md px-2.5 py-1.5 text-[12px] font-medium transition-opacity hover:opacity-80 md:min-h-0"
style="color: var(--color-status-fail); background-color: color-mix(in srgb, var(--color-status-fail) 12%, transparent); border: 1px solid color-mix(in srgb, var(--color-status-fail) 28%, transparent)">
{% icon "arrow-path" "h-3.5 w-3.5" %}<span>{% translate "Retry" %}</span>
</button>
</div>
{% elif item.offered_action == "review" %}
{% comment %} REVIEW this — a PLAIN navigate (launches nothing, writes nothing): an open MR links
out in a new tab; a non-MR needs-attention item drills to the retained report. Cyan
(``--color-status-attn``). Sibling to the mark-seen card ``<a>``. {% endcomment %}
<div class="flex shrink-0 items-center self-center py-4 pr-2 pl-2">
{% if item.merge_request_web_url %}
<a data-testid="feed-item-action" data-action="review"
href="{{ item.merge_request_web_url }}" target="_blank" rel="noopener"
class="inline-flex min-h-[44px] items-center gap-1.5 rounded-md px-2.5 py-1.5 text-[12px] font-medium transition-opacity hover:opacity-80 md:min-h-0"
style="color: var(--color-status-attn); background-color: color-mix(in srgb, var(--color-status-attn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--color-status-attn) 28%, transparent)">
{% icon "magnifying-glass" "h-3.5 w-3.5" %}<span>{% translate "Review this" %}</span>
</a>
{% else %}
<a data-testid="feed-item-action" data-action="review"
href="{% if item.link_url %}{{ item.link_url }}{% else %}{% url 'session_detail' thread_id=item.run.session.thread_id %}{% endif %}"
class="inline-flex min-h-[44px] items-center gap-1.5 rounded-md px-2.5 py-1.5 text-[12px] font-medium transition-opacity hover:opacity-80 md:min-h-0"
style="color: var(--color-status-attn); background-color: color-mix(in srgb, var(--color-status-attn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--color-status-attn) 28%, transparent)">
{% icon "magnifying-glass" "h-3.5 w-3.5" %}<span>{% translate "Review this" %}</span>
</a>
{% endif %}
</div>
{% endif %}
{% comment %} Story 5.2 — the low-emphasis teal ``re-run`` secondary control. Gated on
``item.can_rerun`` (a resolvable, owned ``run.session.scheduled_job``) — independent of envelope
status, so it stays available (quietly) even on a collapsed all-clear card. Sibling to dismiss;
``hx-get``s the confirm dialog into the persistent mount — it NEVER POSTs / launches, only the
dialog's confirm does. Text-only teal (``text-accent``) so it never competes with the primary
status verb (UX-DR8). {% endcomment %}
{% if item.can_rerun %}
<div class="flex shrink-0 items-center self-center py-4 pr-1 pl-1">
<button type="button" id="rerun-btn-feed-{{ item.run.id }}"
data-testid="feed-item-rerun" data-action="re-run"
hx-get="{% url 'feed_item_rerun' item.run.id %}?surface=feed"
hx-target="#fix-preview-mount" hx-swap="innerHTML"
class="inline-flex min-h-[44px] items-center gap-1 rounded-md px-2 py-1.5 text-[12px] font-medium text-accent transition-colors hover:text-accent-bright md:min-h-0">
{% icon "arrow-path" "h-3.5 w-3.5" %}<span>{% translate "Re-run" %}</span>
</button>
</div>
{% endif %}
{% comment %} Dismiss (mark-seen) — resolved-only, unread-only. A seen-state control, NOT an Epic 5 action.
Single accessible name (aria-label); 44px touch target; inherits the global teal focus ring.
The swap replaces this <article> with its seen version (which has NO dismiss button), so focus
Expand Down
9 changes: 9 additions & 0 deletions daiv/accounts/templates/accounts/_fix_notice.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% load i18n %}
{% comment %}
Inline notice (Story 5.1) — a calm no-launch message retargeted INTO the open preview dialog's
``#fix-preview-error`` sink (revoked access, stale/tampered state, or a transient submit failure).
No region swap, no ``fix:started`` trigger; the dialog stays open so the user sees why nothing ran.
``message`` is a view-authored, already-translated string.
{% endcomment %}
<p data-testid="fix-notice" class="border-t border-border px-6 py-3 text-[13px]"
style="color: var(--color-status-fail)">{{ message }}</p>
Loading