The GitHub Actions job "Backport Approval Check" on 
texera.git/gh-readonly-queue/main/pr-8693-fcaf27a561bc0d29bad052b191062019f75eafa1
 has succeeded.
Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).

Head commit for run:
662387be647006356ed45e45ab988140bf178b94 / Xinyuan Lin <[email protected]>
refactor(frontend): remove the legacy user-file types (#8693)

### What changes were proposed in this PR?

Removes the frontend type layer for "user files", a dashboard entry kind
the backend has not served since #2781. **+127/−337 lines.** There is no
behaviour change for workflow, dataset or model entries.

- **Types:** `DashboardFile`, `UserFile` and the duplicate `SortMethod`
enum in `dashboard-file.interface.ts`. `FileUploadItem` stays, since the
uploaders use it.
- **Dashboard entry:** `isDashboardFile`, the file branch and `file`
getter of `DashboardEntry`, and `SearchResultItem.file` with its two
readers (search-bar `convertToName`, search-service result filter).
- **Registry:** `FileResourceDescriptor` and its wiring in
`ResourceRegistryService`, plus `EntityType.File`.
- **Search types:** `"file"` in the search resource-type unions and
their JSDoc. `DashboardResource` throws `Unknown resource type: file`
for it.

### History

| | |
| --- | --- |
| **Introduced by** | #756 (2020-05-26), "User System File Uploading"
(`UserFile`). Wired into the dashboard by #1251 (2021-08-05,
`DashboardFile`) and #1966 / #1982 (June 2023, unified search +
`DashboardEntry` file branch) |
| **Usage removed by** | #2781 (2024-08-20), "Remove File-Related
Components". It deleted `UserFileResource`, `UserFileAccessResource`,
the file search query builder and the user-file components |

It has been dead for about two years: no file entry can reach the
frontend. #8068 (2026-08-28) later registered `FileResourceDescriptor`
for a kind that could no longer appear.

> Reviewer note: most of the spec churn is not coverage loss. The File
descriptor was the only registered kind without rename, description,
share, download or publish support, so several specs used a File entry
to reach those guard branches. They now reach the same branches with a
stand-in descriptor instead:
> - `stubBareDescriptor()` in the card-item and list-item specs;
> - an injected `ModelResourceDescriptor` override in the registry spec;
> - `UNPUBLISHABLE_DESCRIPTOR` in the share-access spec.
>
> Only the cases that asserted File-specific behaviour were deleted.

### Any related issues, documentation, discussions?

Closes #8692

### How was this PR tested?

No new tests. The guard-branch specs are kept and re-pointed at a
stand-in descriptor, as described above.

>From `frontend/`:

- `npx ng test --watch=false --include='src/app/dashboard/**/*.spec.ts'
--include='src/app/hub/**/*.spec.ts'`: 72 spec files, all pass.
- `yarn format:ci`: clean.
- `npx ng build`: success.

To re-check:

```
git grep -nwE "DashboardFile|UserFile|isDashboardFile|FileResourceDescriptor" 
-- frontend   # no hits
```

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Report URL: https://github.com/apache/texera/actions/runs/36355064991

With regards,
GitHub Actions via GitBox

Reply via email to