diff --git a/docs/AGENT_BOARD.md b/docs/AGENT_BOARD.md index 1ef896c..f041d3f 100644 --- a/docs/AGENT_BOARD.md +++ b/docs/AGENT_BOARD.md @@ -78,11 +78,14 @@ chunks. Without the feature, posts have no files and the app shows Feed as befor ### Answers to ideas Ideas also carry `answer`: `yes` (Let's do it), `goal` (Make it a goal), `not now` -(hidden) or `none`: +(hidden) or `none`, and `answeredAt` (Unix seconds; 0 with no answer). The app lists +ideas answered `yes` under Completed on Ideas, with that time. - **Let's do it** calls `board/accept` with the idea's `itemId` (see below), then - opens a chat with the message `Yes, go ahead with this idea: “”.` The id - never goes into the chat. Apps from before `board/accept` send only the message. + sends "Let's do it!" with the idea attached as a card: a block before the message, + `[Idea (<section>): "<title>"]`, the idea's text, then `[End of idea]`. The id + never goes into the chat. Apps from before `board/accept` sent only the message + `Yes, go ahead with this idea: “<title>”.` For them, the board's `pre_llm_call` observer marks the newest visible idea with that title `yes`. When a visible idea with that title is already `yes`, the observer does nothing, so a same-title twin never gets a second yes. diff --git a/loopdy_plugin/agent_board.py b/loopdy_plugin/agent_board.py index 5d75c3f..5d33500 100644 --- a/loopdy_plugin/agent_board.py +++ b/loopdy_plugin/agent_board.py @@ -577,7 +577,9 @@ def _item(row) -> dict: for index, file in enumerate(json.loads(row["files"]))], "liked": row["rating"] == 1, "dismissed": bool(row["dismissed"]), "rating": {-1: "down", 1: "up"}.get(row["rating"], "none"), "reason": row["reason"], - "read": bool(row["read"]), "answer": row["answer"] or "none", "category": row["category"], + "read": bool(row["read"]), "answer": row["answer"] or "none", + # When the person answered; 0 for none. The app shows "Started today" under Completed. + "answeredAt": int(row["answered"]) if row["answer"] else 0, "category": row["category"], "createdAt": int(row["created"]), "updatedAt": int(row["updated"]), } diff --git a/tests/test_agent_board.py b/tests/test_agent_board.py index 21f4ff1..4c8f6cc 100644 --- a/tests/test_agent_board.py +++ b/tests/test_agent_board.py @@ -169,6 +169,9 @@ def test_lets_do_it_by_id_marks_that_idea_even_with_a_same_title_twin(self): with self.store._db() as db: rows = dict(db.execute("SELECT id, answered FROM items WHERE kind='idea'").fetchall()) self.assertEqual(rows, {"older": 300, "newer": 0}) + # The app shows when under Completed. + listed = {row["id"]: row["answeredAt"] for row in self.store.items(("idea",))} + self.assertEqual(listed, {"older": 300, "newer": 0}) # The chat message the app still sends must not mark the twin too. recorder = ActivityRecorder(lambda: self.store) recorder.observe("pre_llm_call", session_id="s1", turn_id="t1",