Skip to content

Conversation

@dbieber
Copy link
Owner

@dbieber dbieber commented Apr 13, 2025

Summary

  • Implement a centralized mapping system for handling case sensitivity in NOTE_TAKING_SYSTEM values
  • Create utility functions normalize_system_name() and get_display_name() to standardize system name handling
  • Replace scattered lowercase conversions with a maintainable mapping system

Original task

the key for Roam Research for the NOTE_TAKING_SYSTEM is roam, not 'Roam Research' -- current the settings server is setting Roam Research instead / looking for that and not showing the right thing when it finds 'roam' instead; pls fix. same for Dropbox vs dropbox etc.

This PR offers a more elegant and maintainable solution than the approach in PR #97 by centralizing the mapping logic in the settings module instead of having scattered lowercase conversions and multiple switch statements with similar conditions.

🤖 Generated with Claude Code

dbieber and others added 2 commits April 13, 2025 19:55
- Update App.tsx to normalize system names before comparison
- Update runner.py to normalize system names in make_uploader
- Update system_commands.py to handle both formats (e.g., "Roam Research" and "roam")
- Update blob_uploader.py to normalize BLOB_STORAGE_SYSTEM value

This resolves inconsistencies between UI representation and backend handling of system names like "Roam Research" vs "roam" and "Dropbox" vs "dropbox".

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add centralized mapping system and normalization functions in settings.py
- Implement NOTE_TAKING_SYSTEM_MAP and DISPLAY_NAME_MAP dictionaries
- Add normalize_system_name() and get_display_name() utility functions
- Replace direct lowercase conversions with normalized lookups
- Update frontend and backend to use the normalized system names

This provides a more elegant, maintainable solution to handle case sensitivity issues between UI display names ("Roam Research") and internal identifiers ("roam").

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
@dbieber dbieber closed this Apr 13, 2025
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