Skip to content

Implement green/tan theme and add Smart Listening Sessions feature#560

Open
nomankhan0705 wants to merge 4 commits into
NeptuneHub:mainfrom
envwo-team:main
Open

Implement green/tan theme and add Smart Listening Sessions feature#560
nomankhan0705 wants to merge 4 commits into
NeptuneHub:mainfrom
envwo-team:main

Conversation

@nomankhan0705
Copy link
Copy Markdown

This pull request introduces two major new features—Smart Listening Sessions and a Listening History Timeline—along with several improvements to the frontend code for better theme consistency. The new blueprints add endpoints and UI pages to allow users to generate intelligent playlists and view their listening history with mood analysis. Additionally, CSS and JavaScript updates ensure more consistent use of CSS variables for colors, improving theming support across the app.

Major new features:

Smart Listening Sessions:

  • Added app_smart_sessions.py blueprint, providing endpoints for the Smart Listening Sessions UI, capabilities API, session preview, and playlist export, with input validation and error handling.
  • Registered the smart_sessions_bp blueprint in app.py to enable the new endpoints. [1] [2]

Listening History Timeline:

  • Added app_timeline.py blueprint, which fetches top played songs from the media server, enriches them with local mood/energy/tempo data, and provides endpoints for an interactive timeline page and timeline data API.
  • Registered the timeline_bp blueprint in app.py to enable the new timeline endpoints. [1] [2]

Frontend and theming improvements:

CSS/JS color theming:

  • Updated static/menu.css to replace hard-coded sidebar and menu colors with CSS variables, improving theme and dark mode support. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
  • Updated button and notification styling in static/collection_script.js, static/script.js, and static/setup.js to use CSS variables for background and text colors, ensuring consistency with the app's theme. [1] [2] [3] [4] [5]

eshatanvr and others added 4 commits May 19, 2026 13:37
Replace the previous blue-centric palette with a green/tan visual theme and centralize colors into CSS variables. Updated static/style.css to redefine color, background, border, status and shadow variables (and added --button-disabled-bg, --focus-ring, sidebar variables). Updated menu.css and various JS files (collection_script.js, script.js, setup.js) to consume the new variables for disabled buttons, message boxes, key buttons, and tooltips. Updated templates (alchemy, dashboard, path, provider_migration, setup, similarity, waveform) to use --color-primary / --color-primary-hover and adjusted charts/gradient colors to match the new palette. These changes unify theming and make it easier to tweak colors across the app.
Introduce a new Smart Listening Sessions feature: add a Flask blueprint (app_smart_sessions.py) and register it in app.py, include a UI template (templates/smart_sessions.html), client JS (static/smart_sessions.js), and navigation entry. Add a tasks/smart_session_builder.py skeleton with validation, capability reporting, preview/export helpers (preview currently returns a Day 1 placeholder and export delegates to voyager_manager). Include design and implementation plan docs (docs/SMART_LISTENING_SESSIONS_PLAN.md) and unit tests for the blueprint and builder (tests/unit/*).
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces two major features: "Smart Listening Sessions," a prompt-driven playlist builder, and a "Listening History Timeline" for visualizing listening trends and mood shifts. It includes new Flask blueprints, backend logic for request validation and data enrichment, and interactive frontend components using Chart.js. Additionally, the entire application's UI has been overhauled with a new earthy color palette and consistent use of CSS variables. Review feedback highlights an unused import in the timeline module, opportunities to optimize database queries by removing unused columns, and the need to replace developer-centric warning messages with user-facing text in the session builder.

Comment thread app_timeline.py
from psycopg2.extras import DictCursor

from app_helper import get_db
from tz_helper import to_local_str
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The import to_local_str from tz_helper is unused in this file and should be removed to keep the code clean.

Comment thread app_timeline.py
with db.cursor(cursor_factory=DictCursor) as cur:
placeholders = ','.join(['%s'] * len(item_ids))
cur.execute(
f"SELECT item_id, title, author, album, tempo, energy, mood_vector, key, scale "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The columns title, author, and album are selected from the database but are not used in the subsequent loop that builds the response entries. Removing them from the query will improve efficiency.

References
  1. Identify performance bottlenecks, optimize for efficiency, and avoid unnecessary calculations or data retrieval.

"playlist_name": playlist_name,
"tracks": [],
"warnings": [
"Smart Listening Sessions request validation is ready; candidate ranking is scheduled for Day 2 and Day 3."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The warning message contains a reference to a development schedule ('scheduled for Day 2 and Day 3'). This should be updated to a user-facing message explaining that the ranking feature is currently in a preview/skeleton state.

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