# Aether Journals: Configuration & Settings Map

**Last Updated:** 2026-06-12

This document tracks all available settings across the three levels of the Journals module.

## 1. Module Level (Global)
*   **Scope:** Applied across the entire journals application for the current site/user.
*   **Storage:** Browser Local Storage (via `journals_loc` persisted store).
*   **UI Location:** Journals Landing Page -> Settings Icon (Top Right).

| Setting | Type | Description | Save Type |
| :--- | :--- | :--- | :--- |
| `datetime_format` | enum | Preferred display for date/time strings. | Manual (Save Changes) |
| `time_format` | enum | Preferred display for time-only strings. | Manual (Save Changes) |
| `entry.auto_save` | boolean | If true, entry edits are debounced and saved to DB. | Manual (Save Changes) |
| `show_id_random` | boolean | Display technical UUIDs in metadata footers. | Manual (Save Changes) |
| `enable_session_passcode_cache`| boolean | If true, private passcodes are held in session store. | Manual (Save Changes) |

## 2. Journal Level (Specific Journal)
*   **Scope:** Applied to a specific journal object and its metadata.
*   **Storage:** Remote MariaDB (via `update_ae_obj__journal`).
*   **UI Location:** Journal View -> Menu -> Edit Journal.

| Setting | Type | Description | Save Type |
| :--- | :--- | :--- | :--- |
| `name` | string | Display name of the journal. | Manual (Save Changes) |
| `description` | markdown | Detailed purpose/notes for the journal. | Manual (Save Changes) |
| `type_code` | enum | Category of journal (Diary, Log, etc.). | Manual (Save Changes) |
| `group` | string | Sorting group for the journal list. | Manual (Save Changes) |
| `sort` | integer | Manual sort order weight. | Manual (Save Changes) |
| `priority` | boolean | Flag for "Starred" or "Pinned" status. | Manual (Save Changes) |
| `enable` | boolean | Global activation flag for the journal. | Manual (Save Changes) |
| `hide` | boolean | If true, journal is hidden from standard views. | Manual (Save Changes) |
| `passcode` | string | Module-level encryption passcode. | Manual (Save Changes) |
| `private_passcode`| string | User-specific secondary encryption secret. | Manual (Save Changes) |
| `cfg_json.*` | JSON | UI/UX overrides (colors, default viewers, etc.). | Manual (Save Changes) |

## 3. Journal Entry Level (Specific Entry)
*   **Scope:** Applied to an individual entry within a journal.
*   **Storage:** Remote MariaDB (via `update_ae_obj__journal_entry`).
*   **UI Location:** Entry View -> Settings Button.

| Setting | Type | Description | Save Type |
| :--- | :--- | :--- | :--- |
| `name` | string | Entry title. | Auto-Save (if enabled) |
| `content` | markdown | Main text body. | Auto-Save (if enabled) |
| `category_code` | enum | User-defined category for the entry. | Auto-Save / Manual |
| `tags` | string | Comma-separated list of tags. | Auto-Save / Manual |
| `priority` | boolean | If true, entry is pinned or highlighted. | Manual (Done) |
| `enable` | boolean | Activation flag for the entry. | Manual (Done) |
| `hide` | boolean | If true, entry is hidden from standard lists. | Manual (Done) |
| `sort` | integer | Manual sort order weight. | Manual (Done) |
| `archive_on` | datetime | Scheduled date for automatic archiving. | Manual (Done) |
| `private` | boolean | Trigger for E2EE (Encryption). | Manual (Done) |
| `content_encrypted` | encrypted string | Encrypted entry content written during a full save when `private` is enabled. | Generated on save |
| `history_encrypted` | encrypted string | Encrypted entry history when history encryption is available. | Generated on save |
| `passcode_hash` | string | Entry-level secondary-auth field; comparison logic is not yet implemented. | Manual (Done) |
| `alert` | boolean | Trigger for visual "Alert" state. | Manual (Done) |
| `group` | string | Grouping key for the list view. | Manual (JSON only) |

## Encryption Behavior and Gaps

1. Full entry saves combine the journal `passcode` and `private_passcode` to encrypt
	plaintext content when the entry's `private` flag is enabled.
2. Decryption prefers a passcode typed in the current session, then falls back to the
	journal `private_passcode`; the journal `passcode` is combined with that private key.
3. `passcode_hash` secondary-auth comparison is pending and must not be described as enforced.
4. Quick Add currently forces `private: false`, and bulk import creates plaintext entries
	without encryption fields. Use the full editor to enable encryption until those workflows
	are updated.

## 📐 Data Normalization Rules
To prevent infinite reactivity loops and trivial save cycles, the following normalizations are applied before comparison:
1.  **Strings:** Trimmed and `null` treated as `""`.
2.  **Booleans:** Forced to `true/false` (no nulls).
3.  **JSON:** Deep stringification comparison (`JSON.stringify`).
