Skip to content

Should be able to delete notes.. - #26

Merged
ayyshim merged 6 commits into
mainfrom
canopy/should-be-able-to-delete-notes
Nov 21, 2026
Merged

ayyshim merged 6 commits into
mainfrom
canopy/should-be-able-to-delete-notes

Conversation

@ayyshim

@ayyshim ayyshim commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Handover: Should be able to delete notes (G-28)

What you asked

You couldn't find a button to delete notes.

The hub could already delete notes. The only Delete button was at the bottom of a note after you opened it, so it was easy to miss. Sticky notes on the board and the notes list had no Delete button, and deleting never asked you to confirm.

What changed

Delete is now in three places (T-162, Tommy):

  • Sticky notes on the board. There is a Delete button next to Edit at the top of the sticky. There is also one in the form you get when you edit a sticky in place.
  • The notes list (top bar menu, then "Notes and decisions"). Each note you're allowed to delete has a red Delete button on its row.
  • An open note. The Delete button at the bottom is still there.

Every Delete asks first: "Delete N-12 'title'?" Nothing is removed until you say yes.

Who can delete is the same as before:

  • The person who wrote the note.
  • A workspace admin, for shared notes. This includes plans and summaries written by agents.
  • Nobody else, not even an admin, can delete someone's private note.

People who can't delete a note now see "Only the author or a workspace admin can delete this note." in its place. The screen and the hub now follow the same rule. Before, the open-note view could show Delete on notes the hub would refuse.

The hub is safe when a goal's plan or summary note is deleted (T-163, Trevor). The code already handled it: the next time the manager adds tasks or writes a summary, Canopy starts a new note. No production code changed here. Only tests were added.

Files changed (5 commits, plus a merge):

  • frontend/src/lib/stickies.ts: one rule for who can delete (canDeleteNote), with tests in stickies.test.ts
  • frontend/src/components/board/Sticky.tsx: Delete on stickies
  • frontend/src/components/board/panels/NotesPanel.tsx: Delete on list rows, the confirm step and the hint
  • hub/internal/api/sticky_notes_test.go: tests for who can delete
  • hub/internal/api/assign_tasks_test.go: a test that the manager can still add tasks after the plan note is deleted

How to check it

  1. Open a board and add a sticky note. Click Delete on it, confirm, and check that it's gone.
  2. Open the top bar menu, then Notes and decisions. Click Delete on a row, then click Cancel and check that the note is still there. Do it again and confirm, and check that the note is gone.
  3. Open a note and use Delete at the bottom. The panel should go back to the list.
  4. Keep a second browser tab open on the same board. Notes you delete should vanish there without a reload.
  5. Sign in as someone who isn't an admin. There should be no Delete button on other people's notes, and the hint should show.
  6. As an admin, delete a goal's plan note. Then add a request to that goal for the manager and check that it still hands out tasks.
  7. Look at the notes list on a phone-sized screen (about 390px wide), in both light and dark mode.

What isn't done, and the risks

  • No one has clicked through it in a browser. The type check, lint and the 82 frontend tests pass. Trevor's new hub tests passed against a temporary database. The review (T-164) couldn't start a database or a browser, so steps 1 to 7 above haven't been done by anyone. Please do them, or have someone do them, before merging.
  • The notes list on a phone. Each row now has a red Delete button beside it. On a narrow screen this may squeeze long titles. Nobody has looked yet.
  • The Delete button on a sticky looks the same as Edit. It's the same small pale pill. There is a style name for it (st-del), but no style is written for it, so it isn't red. The confirm step stops accidental deletes, but you may want it to look different.
  • Admins see a lot of red. For an admin, almost every row in the notes list has a Delete button, including every plan and summary written by agents.
  • Deleting can't be undone. The note and its edit history are removed for good. The confirm step is the only safety net. There is no trash or undo.
  • Agents can't delete notes. They can only write and edit them. You didn't ask for that, so nothing changed.

What you need to decide

  1. Who can delete agent-written plans and summaries? Right now only workspace admins can. Should the person who created a goal be able to delete that goal's notes too?
  2. Is confirm enough, or do you want undo? An "Undo" option shown for a few seconds after a delete would need a bigger change on the hub, because notes are removed for good today.
  3. Should the Delete buttons be quieter? For example, make Delete on stickies red, and move the Delete on list rows into a small menu that shows when you hover over the row, so the list isn't full of red buttons.
  4. Can this merge once someone has done the browser checks above?

@ayyshim
ayyshim merged commit e7b8c18 into main Nov 21, 2026
2 checks passed
@ayyshim
ayyshim deleted the canopy/should-be-able-to-delete-notes branch November 21, 2026 12:16
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.

1 participant