mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 17:05:56 +03:00
[PR #385] [MERGED] Normalize today-workflow task dependencies to arrays and backfill legacy string values #687
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#687
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AJaySi/ALwrity/pull/385
Author: @AJaySi
Created: 3/6/2026
Status: ✅ Merged
Merged: 3/7/2026
Merged by: @AJaySi
Base:
main← Head:codex/update-task-creation-dependencies-handling📝 Commits (1)
c3f478aNormalize today workflow task dependencies as arrays📊 Changes
3 files changed (+71 additions, -5 deletions)
View changed files
📝
backend/api/today_workflow.py(+15 -2)📝
backend/services/today_workflow_service.py(+20 -1)📝
frontend/src/stores/workflowStore.ts(+36 -2)📄 Description
Motivation
dependenciesas a JSON-encoded string which is incompatible with consumers expectingstring[], so new tasks should storedependenciesas native arrays.dependenciesare still string values, so reads must be backward-compatible and migrate those rows to the new array format.Description
coerce_dependencies(value: Any) -> List[str]inbackend/services/today_workflow_service.pyto normalize inputs that may belist, JSON strings, or plain strings intoList[str]and used it when creatingDailyWorkflowTaskso new rows store arrays instead of JSON-encoded strings.backend/api/today_workflow.pyto importcoerce_dependencies, to usecoerce_dependencies(t.dependencies)when serializing API responses, and to run_normalize_legacy_dependencies(executed off the request thread) which parses string-valued legacy rows into arrays and persists the normalized values back to the DB.frontend/src/stores/workflowStore.tsby addingnormalizeDependenciesandnormalizeServerWorkflowso any server payload (legacy string or array) is coerced tostring[]before being stored in client state.DailyWorkflowTask.dependencies) while ensuring new writes are arrays and existing string rows are migrated on read.Testing
python -m py_compile backend/services/today_workflow_service.py backend/api/today_workflow.pywhich passed with no syntax errors.npm run -s typecheckreturned a non-zero exit in this environment andCI=1 npm run buildfailed becausereact-scriptsis not installed in the environment, so full frontend build/typecheck could not be completed here.Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.