Conversation
- 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
There was a problem hiding this comment.
💡 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".
| # 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-) |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
/storagebackend endpoint (was unreachable — defined afterreturn appinroutes.py)nexanote.shto readDATA_DIRfrom~/.nexanote-configand pass it via--data-dirto the Python backendgetStorageInfo()toApiClientto fetch current data directory and DB size from the backendWhat the feature does
In Settings → Dossier de notes, the user can:
~/.nexanote-configsonexanote.shpicks it up on next launchTest plan
~/.nexanote-configis updatednexanote.sh— confirm the backend starts with the new data directory