PROD-WSF-002 — Define supported file types consistently
| Field | Value |
|---|---|
| Status | Open; source-verified |
| Severity | Medium |
| Components | sparqd/oqullus, sparqd/workspace-file-management-backend |
| Associated issues | Not opened |
Concrete observed case
The backend stores arbitrary uploads without a canonical media/type model.
Oqullus supports opening notebook, Markdown, and CSV by extension, but maps
Markdown to notebook, maps every Shared and Trash file to notebook, and uses
the notebook icon for every non-folder. The Home importer accepts any file even
though its error says notebook upload failed. Version History is shown for
Markdown and CSV, but View Changes always calls the notebook-diff parser.
Expected condition
The product distinguishes storage-only files from editable notebook, Markdown, and CSV resources. Type, icon, available actions, content validation, and error messages remain consistent in Home, Shared, Favorites, Trash, and editor tabs.
Why it matters
Misclassified files receive incorrect icons and actions and may be sent to a parser that cannot open them, while upload errors refer to the wrong resource kind.
Existing controls and workarounds
Notebook, Markdown, and CSV open paths inspect the extension again. Other files can usually be downloaded even when their displayed type is wrong.
Alternatives considered
- Recommended: persist a validated resource kind plus media type while keeping extension as presentation metadata.
- Centralized extension registry in Oqullus — smaller change but not reliable for renamed or API-uploaded content.
- Treat every object as a notebook — rejected because parsing and actions fail for general files.
Component involvement
- The backend persists and validates canonical resource kind and media type.
- Oqullus maps that contract consistently and restricts editor actions.
Reproduction and verification
Upload .ipynb, .md, .csv, .txt, and a binary file; compare type, icon,
open, share, move, download, Trash, and restore behavior in every view.
Resolution conditions
Close when a contract table and automated tests cover every supported kind and unsupported content remains downloadable without misleading editor actions.
Validation and blockers
Inconsistent mappings are source-confirmed. The approved list of editable and storage-only formats remains a product decision.