Problem
The detect_list_names() function in things_jxa.py currently assumes that Things 3 lists are returned in a fixed order and maps them by index:
# things_jxa.py:69-77
english_keys = ["inbox", "today", "upcoming", "anytime", "someday", "logbook"]
detected_mapping = {}
for i, english_key in enumerate(english_keys):
if i < len(list_names):
detected_mapping[english_key] = list_names[i]
Risks:
- If Things 3 changes the list order in a future update, mappings will be incorrect
- If a list is missing or hidden, all subsequent mappings shift
- No way to verify that the detected list actually corresponds to the expected type
Current Implementation
Location: things_jxa.py:42-105
The function queries all lists via JXA and assumes:
- Lists are always returned in order: Inbox, Today, Upcoming, Anytime, Someday, Logbook
- All 6 lists are always present
- The order never changes
Proposed Solution
Option 1: Use list IDs or properties (Recommended)
Query additional properties from Things 3 lists to identify them reliably:
const things = Application("Things3");
const lists = things.lists();
const result = [];
for (let i = 0; i < lists.length; i++) {
result.push({
name: lists[i].name(),
id: lists[i].id(), // If available
// Or other distinguishing properties
});
}
Then match lists by their stable IDs rather than position.
Option 2: Match by known translations
Build a comprehensive translation database and match detected names:
KNOWN_TRANSLATIONS = {
"inbox": ["Inbox", "Eingang", "Bandeja", "Boîte de réception", ...],
"today": ["Today", "Heute", "Hoy", "Aujourd'hui", ...],
# ...
}
def detect_list_names():
# Query list names
# Match each name against KNOWN_TRANSLATIONS
# Build mapping
Pros: Works even if order changes
Cons: Requires maintaining translation database for all supported languages
Option 3: Hybrid approach
- Try to use IDs/properties first (most reliable)
- Fall back to translation matching
- Fall back to index-based mapping as last resort
Impact
Priority: High - affects reliability of auto-detection for all users
Affected code: things_jxa.py:42-105
Breaking changes: None (internal implementation only)
Acceptance Criteria
Additional Context
This issue was identified during post-implementation review of #1 (multi-locale support).
Problem
The
detect_list_names()function inthings_jxa.pycurrently assumes that Things 3 lists are returned in a fixed order and maps them by index:Risks:
Current Implementation
Location:
things_jxa.py:42-105The function queries all lists via JXA and assumes:
Proposed Solution
Option 1: Use list IDs or properties (Recommended)
Query additional properties from Things 3 lists to identify them reliably:
Then match lists by their stable IDs rather than position.
Option 2: Match by known translations
Build a comprehensive translation database and match detected names:
Pros: Works even if order changes
Cons: Requires maintaining translation database for all supported languages
Option 3: Hybrid approach
Impact
Priority: High - affects reliability of auto-detection for all users
Affected code:
things_jxa.py:42-105Breaking changes: None (internal implementation only)
Acceptance Criteria
Additional Context
This issue was identified during post-implementation review of #1 (multi-locale support).