Skip to content

[codex] add Flux cover art skill#3388

Merged
matthiasn merged 2 commits into
mainfrom
feat/flux_skill
Jun 26, 2026
Merged

[codex] add Flux cover art skill#3388
matthiasn merged 2 commits into
mainfrom
feat/flux_skill

Conversation

@matthiasn

@matthiasn matthiasn commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a separate built-in Generate Cover Art (Flux) skill while keeping the original cover-art skill unchanged.
  • Builds compact Flux prompts from a short scene plus mood/task clues instead of full task JSON and related-task context.
  • Adds Melious black-forest-labs/flux-2-dev as the default image-generation model for new and untouched Melious profiles.
  • Updates AI docs, changelog, Flatpak metadata, and focused tests for skill availability, prompt construction, known models, FTUE setup, and profile upgrades.

Impact

Task-linked text notes and voice notes now show a Flux-specific cover-art action in the AI popup. Users can still choose the image model from the existing provider/model picker, and Melious defaults route image generation to Flux 2 Dev.

Validation

  • fvm dart format lib/features/ai/helpers/skill_prompt_builder.dart lib/features/ai/skills/built_in_skills.dart lib/features/ai/state/skill_trigger_providers.dart lib/features/ai/ui/settings/services/melious_ftue_setup.dart lib/features/ai/util/known_models.dart lib/features/ai/util/known_models_data.dart lib/features/ai/util/known_models_ftue.dart lib/features/ai/util/profile_seeding_service.dart test/features/ai/helpers/skill_prompt_builder_test.dart test/features/ai/skills/built_in_skills_test.dart test/features/ai/state/skill_trigger_providers_test.dart test/features/ai/ui/settings/services/melious_ftue_setup_test.dart test/features/ai/util/known_models_test.dart test/features/ai/util/profile_seeding_service_slots_test.dart test/features/ai/util/profile_seeding_service_test.dart
  • fvm flutter analyze lib/features/ai/helpers/skill_prompt_builder.dart lib/features/ai/skills/built_in_skills.dart lib/features/ai/state/skill_trigger_providers.dart lib/features/ai/ui/settings/services/melious_ftue_setup.dart lib/features/ai/util/known_models.dart lib/features/ai/util/known_models_data.dart lib/features/ai/util/known_models_ftue.dart lib/features/ai/util/profile_seeding_service.dart test/features/ai/helpers/skill_prompt_builder_test.dart test/features/ai/skills/built_in_skills_test.dart test/features/ai/state/skill_trigger_providers_test.dart test/features/ai/ui/settings/services/melious_ftue_setup_test.dart test/features/ai/util/known_models_test.dart test/features/ai/util/profile_seeding_service_slots_test.dart test/features/ai/util/profile_seeding_service_test.dart
  • fvm flutter test test/features/ai/helpers/skill_prompt_builder_test.dart test/features/ai/skills/built_in_skills_test.dart test/features/ai/state/skill_trigger_providers_test.dart test/features/ai/util/known_models_test.dart test/features/ai/util/profile_seeding_service_test.dart test/features/ai/util/profile_seeding_service_slots_test.dart test/features/ai/ui/settings/services/melious_ftue_setup_test.dart
  • git diff --cached --check
  • python3 -c "import sys, xml.etree.ElementTree as ET; ET.parse(sys.argv[1])" flatpak/com.matthiasn.lotti.metainfo.xml

Note: xmllint is not installed in this environment, so XML was checked with Python's standard-library parser.

Summary by CodeRabbit

  • New Features

    • Added a dedicated Flux cover-art generation option for task-linked notes and voice notes.
    • Melious.ai now includes Flux 2 Dev as the default image-generation model for new and untouched profiles.
    • Updated app release notes to highlight the new cover-art workflow and model defaults.
  • Bug Fixes

    • Improved cover-art prompt handling to use a shorter visual scene brief, reducing unrelated context in generated images.
    • Restricted cover-art actions to supported note types so the option appears only where it works.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The PR adds Flux 2 Dev as Melious.ai’s image-generation model, wires it into FTUE/default profile seeding and profile upgrades, introduces a new Flux cover-art skill with compact task-summary prompts, and updates docs, metainfo, changelog, and tests.

Changes

Melious Flux cover art and seeding

Layer / File(s) Summary
Melious model catalog and FTUE setup
CHANGELOG.md, lib/features/ai/README.md, lib/features/ai/util/known_models.dart, lib/features/ai/util/known_models_data.dart, lib/features/ai/util/known_models_ftue.dart, lib/features/ai/ui/settings/services/melious_ftue_setup.dart, test/features/ai/util/known_models_test.dart, test/features/ai/ui/settings/services/melious_ftue_setup_test.dart
Flux 2 Dev is added to the Melious model catalog and FTUE seeding path, with matching documentation and tests updated for the extra image-generation model.
Melious profile defaults and migration
CHANGELOG.md, lib/features/ai/README.md, lib/features/ai/util/profile_seeding_service.dart, test/features/ai/util/profile_seeding_service_test.dart, test/features/ai/util/profile_seeding_service_slots_test.dart
ProfileSeedingService now seeds and backfills imageGenerationModelId to Flux 2 Dev for untouched Melious profiles.
Flux cover-art skill and prompt path
CHANGELOG.md, flatpak/com.matthiasn.lotti.metainfo.xml, lib/features/ai/README.md, lib/features/ai/helpers/skill_prompt_builder.dart, lib/features/ai/skills/built_in_skills.dart, lib/features/ai/state/skill_trigger_providers.dart, test/features/ai/helpers/skill_prompt_builder_test.dart, test/features/ai/skills/built_in_skills_test.dart, test/features/ai/state/skill_trigger_providers_test.dart
A Flux cover-art skill is registered, imageGeneration availability is limited to task-linked notes/audio, and the prompt builder emits a compact scene/mood brief with matching tests and release notes.

Sequence Diagram(s)

sequenceDiagram
  participant JournalAudio
  participant availableSkillsForEntityProvider
  participant FluxSkill as "Generate Cover Art (Flux)"
  participant SkillPromptBuilder
  participant Flux2Dev as "Flux 2 Dev"
  JournalAudio->>availableSkillsForEntityProvider: requests imageGeneration skills for a task-linked voice note
  availableSkillsForEntityProvider->>FluxSkill: exposes the taskSummary cover-art skill
  FluxSkill->>SkillPromptBuilder: builds the compact Scene and Mood brief
  SkillPromptBuilder->>Flux2Dev: sends the cover-art prompt
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • matthiasn/lotti#3362 — Extends the same Melious.ai FTUE/model-seeding path that this PR continues with Flux 2 Dev and cover-art wiring.

Poem

I hopped through Flux-lit fields tonight,
and painted cover art just right.
A scene, a mood, no text in sight,
with whiskers twitching, bright and light.
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately highlights the main change: adding the Flux cover art skill.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/flux_skill

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

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.

Code Review

This pull request integrates the Flux 2 Dev image-generation model into Melious.ai, introducing a new 'Generate Cover Art (Flux)' skill that utilizes a compact task summary prompt instead of full task JSON. It updates the onboarding setup, profile seeding, and documentation to support this model. Feedback on the changes points out a potential performance bottleneck and string truncation issue with surrogate pairs in the prompt builder's text compaction helper, suggesting a safer and more efficient implementation.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread lib/features/ai/helpers/skill_prompt_builder.dart
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.20%. Comparing base (9519a59) to head (e78ba4b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3388      +/-   ##
==========================================
- Coverage   99.20%   99.20%   -0.01%     
==========================================
  Files        1679     1679              
  Lines      117621   117677      +56     
==========================================
+ Hits       116682   116737      +55     
- Misses        939      940       +1     
Flag Coverage Δ
glados 15.37% <31.14%> (+<0.01%) ⬆️
standard 98.92% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@matthiasn
matthiasn marked this pull request as ready for review June 26, 2026 20:40
@matthiasn
matthiasn merged commit d0975cf into main Jun 26, 2026
19 of 21 checks passed
@matthiasn
matthiasn deleted the feat/flux_skill branch June 26, 2026 20:45
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.

1 participant