Project

General

Profile

Actions

Feature #16

open

Kommentall - Feature #4: Proof of concept

Kommentall - Feature #15: Add Notebooks

Implement Notebooks feature in FE

Added by Tomislav Pleše 29 days ago.

Status:
New
Priority:
Immediate
Start date:
11/06/2025
Due date:
% Done:

0%

Estimated time:

Description

Use the fe-notebook-list branch in the fe_kommentall repository for this.

I currently have an app that is used for chatting with an AI model. And in the frontend flutter app, data on the current chat thread is held in:

  • Map<String, Point> threadMap - heare are all the Points
  • List flatTreeList - this list is used to correctly show the nodes (Prompts/Responses from Points) on the screen

Now I'd like to create a List that holds the data on current and past chat threads by holding the list of notebook objects (List notebookList), where each one stores threadMap and flatTreeList.
And this list should be shown on the left half of the screen when the hamburger icon (which should be in the left top corner is tapped/clicked.

And when the user taps/clicks on one of the elements (selects it) from the notebookList, the flutter application should use the threadMap of that element to fetch each Point from the java backend (there's already a method getPointById() in BackendService class that fetches a Point by it's id). And then when it fetches all the points, it should use the existing code to show the chat thread correctly by using the flatTreeList from the notebookList's selected element.

analyse the existing code. see how much you understnd of what needs to be done to implement the desired new behavior into the do flutter application. let me know if you need some clarification. and then suggest how to implement it. if possible, show me what you would like to do before you do any implementation and ask me for permission to implement it.


These are my answers to your questions:

  1. Add an unique String id to each Notebook object. The Notebook objects will later be stored in the MongoDB database, so make the id's compatible with storing in MongoDB ObjectId format.
  2. Local Persistance:
    2.1. Yes, I'd like you to implement persistance using Isar.
    2.2. Make sure that it can be run in the Android Studio's android phone emulator.
    2.3. Implement Save/load notebookList on app start/exit.
    2.4. Store lightweight metadata.
  3. Notebook title:
    3.1. should be auto-generated: Notebook+id (e.g. Notebook-0935718590fndoar3820)
    3.2. user should be able to edit it later - by long-pressing on it (or right-clicking on it) there should be a small popup just below that Notebook's title that has a button "Rename". When the Rename is tapped/clicked, a centered popup card is shown to the user, with the Notebook's title in the text input field and below it options buttons: "Cancel" and "Rename".
  4. Auto-save Timing: every new message.
  5. Storage Strategy: persist notebookList to local storage between app sessions.
  6. Drawer Behavior: Close automatically after selection.
  7. Empty State: The list should be empty, and the drawer should just open empty.
  8. Drawer should be of a semi-dark gray color.
  9. Delete/Archive: Yes, there should be option to Delete a Notebook (conversation) from the list.
  10. Copy conversation: there should be an option to duplicate Notebook (conversation), but with a new unique id.

Adjust your suggested solutions to these instructions/answers. If still something is unclear, ask me. And if everything is clear, you can implement your adjusted solution.


I tested with your suggested tests and all three behaved correctly.

But please make these small changes to the behavior:

  1. Change the name of the Conversations to Notebooks. Also, change the name of "New Conversation" to "New Notebook".
  2. The problem I've notices is with the positioning of the Notebook: when I tap on a notebook (e.g. titled: "wild world song"), it moves one position down (e.g., if it was 2nd from the top in the list of notebooks in the drawer, when I tap it, and later open drawer again, it will now be in the 3rd position from the top). But actually, it should stay in the same position. It should only move one position down if a new Notebook is created. This new Notebook should go at the top (1st position). And every other Notebook in the list should be moved one position down. Use whichever method is quicker: adding at the end of a reversed list, and showing that list from the end, or inserting into the first position in the list.

No data to display

Actions

Also available in: Atom PDF