Skip to content

fix(action-center): show added, renamed and deleted tasks in an action's history - #1078

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:fix/action-history-task-events
Oct 17, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:fix/action-history-task-events

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

The Action Center drawer's History tab renders each event from actionCenter.actionsPage.drawer.events.<event>. The server actions in web/src/lib/actions/action-center.ts log task_added (addTask), task_renamed (updateTaskTitle) and task_deleted (deleteTask), but none of the three had a message, so adding, renaming or deleting a task left a History line with next-intl's missing-message text.

  • en.json: adds the three messages. Added and renamed tasks are named as they were typed, with the same curly quotes the Action Center uses for a prompt:
    • task_added → Task added: “{title}”
    • task_renamed → Task renamed to “{title}”
    • task_deleted → Task deleted (this event logs only the task id, so there is no name to show)
  • action-drawer.tsx: passes the event's title to the message, next to the values it already passes.
  • display.test.ts: a test reads the events the server actions log from action-center.ts and formats each one with createTranslator (namespace actionCenter.actionsPage, throwing on any error). An event added there without copy now fails the test instead of showing up broken in the drawer. I checked that it fails when task_deleted is removed from en.json.

Note: #1070 moves this t() call into actionEventText in display.ts. Whichever of the two merges second needs title: String(event.data.title ?? '') added there. It's a one-line conflict.

Related issue

None. Found while reviewing the History tab.

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. Open Action Center → Actions and open any action's drawer.
  2. On the Tasks tab, add a task, rename it, then delete it.
  3. Open the History tab. It shows "Task added: “…”", "Task renamed to “…”" and "Task deleted" instead of the raw message keys.
  4. cd web && yarn test src/lib/action-center/display.test.ts

I checked this in the browser at 1024px, in light and dark themes.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/) (0 errors; the 7 warnings are in files this PR doesn't touch)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

yarn test (666 tests) and yarn build also pass. npm run version:check fails on main already (docker-compose images 0.2.0 vs 0.3.0); this PR doesn't change it.

🤖 Generated with Claude Code

…n's history

The task_added, task_renamed and task_deleted events had no message under
drawer.events, so the History tab showed next-intl's missing-message text
for them. Added and renamed tasks are named as they were typed.

A test reads the events the server actions log and checks each one formats.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, approving. task_added, task_renamed and task_deleted are already logged by action-center.ts; this gives them their text.

@gkhngyk
gkhngyk merged commit 0751e96 into ansvisor:main Oct 17, 2026
6 checks passed
gkhngyk added a commit to cihan-gyk/ansvisor that referenced this pull request Oct 17, 2026
…tcome-event

main now carries ansvisor#1078 as a squash; this branch keeps only its own outcome_measured change on top.
gkhngyk added a commit to cihan-gyk/ansvisor that referenced this pull request Oct 17, 2026
The History line now comes from actionEventText, so the title (ansvisor#1078) and outcome (ansvisor#1079) values that main added inline move into it, with a test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants