Skip to content

feat: notes folder setting in Settings#7

Merged
TheZupZup merged 1 commit intomainfrom
claude/fix-gray-screen-I13Ww
Apr 11, 2026
Merged

feat: notes folder setting in Settings#7
TheZupZup merged 1 commit intomainfrom
claude/fix-gray-screen-I13Ww

Conversation

@TheZupZup
Copy link
Copy Markdown
Owner

Summary

  • Added a "Dossier de notes" section in the Settings screen where users can specify the folder where notes are saved on disk
  • Fixed the /storage backend endpoint (was unreachable — defined after return app in routes.py)
  • Updated nexanote.sh to read DATA_DIR from ~/.nexanote-config and pass it via --data-dir to the Python backend
  • Added getStorageInfo() to ApiClient to fetch current data directory and DB size from the backend

What the feature does

In Settings → Dossier de notes, the user can:

  • See the current notes folder path and database size (fetched live from the backend)
  • Type a new folder path
  • Save it — the path is written to ~/.nexanote-config so nexanote.sh picks it up on next launch
  • A banner informs the user that a restart is required for the change to take effect

Test plan

  • Open Settings and confirm the "Dossier de notes" card shows the current path and DB size
  • Enter a new path and tap Save — confirm ~/.nexanote-config is updated
  • Restart the app with nexanote.sh — confirm the backend starts with the new data directory

- routes.py: fix unreachable /storage endpoint (was after return app),
  now correctly exposes data_dir, db_path and db_size_mb
- nexanote.sh: read DATA_DIR from ~/.nexanote-config at startup,
  pass as --data-dir to python main.py
- api_client.dart: add getStorageInfo() method calling GET /storage
- settings_screen.dart: add "Dossier de notes" section showing
  current data directory, DB size, and a text field to set a new
  path — saves to ~/.nexanote-config for next restart

https://claude.ai/code/session_01DrMeeXsyuHucgvtcwtJoLN
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d969b17716

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread nexanote.sh
# Lire le dossier de données depuis ~/.nexanote-config (si existant)
DATA_DIR="$HOME/.nexanote"
if [[ -f "$CONFIG_FILE" ]]; then
SAVED_DIR=$(grep -E '^data_dir=' "$CONFIG_FILE" | cut -d'=' -f2-)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Tolerate missing data_dir in config parsing

Because the script runs with set -euo pipefail, the grep pipeline in SAVED_DIR=$(...) exits non-zero when ~/.nexanote-config exists but does not contain a data_dir= line, which aborts nexanote.sh before the backend starts. This is a startup regression for users with an empty/legacy config file or any config missing that key.

Useful? React with 👍 / 👎.

@TheZupZup TheZupZup merged commit 5f1ba5f into main Apr 11, 2026
1 check passed
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