aglinxinyuan commented on code in PR #7464:
URL: https://github.com/apache/texera/pull/7464#discussion_r3900644868


##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/DashboardResource.scala:
##########
@@ -95,15 +92,12 @@ object DashboardResource {
     val query = params.resourceType match {
       case SearchQueryBuilder.WORKFLOW_RESOURCE_TYPE =>
         WorkflowSearchQueryBuilder.constructQuery(uid, params, includePublic)
-      case SearchQueryBuilder.PROJECT_RESOURCE_TYPE =>
-        ProjectSearchQueryBuilder.constructQuery(uid, params, includePublic)
       case SearchQueryBuilder.DATASET_RESOURCE_TYPE =>
         DatasetSearchQueryBuilder.constructQuery(uid, params, includePublic)
       case SearchQueryBuilder.ALL_RESOURCE_TYPE =>
         val q1 = WorkflowSearchQueryBuilder.constructQuery(uid, params, 
includePublic)
-        val q3 = ProjectSearchQueryBuilder.constructQuery(uid, params, 
includePublic)
         val q4 = DatasetSearchQueryBuilder.constructQuery(uid, params, 
includePublic)
-        q1.unionAll(q3).unionAll(q4)
+        q1.unionAll(q4)

Review Comment:
   Applied your suggestion verbatim — the two sub-queries are now 
`workflowQuery` and `datasetQuery`, so nothing points at removed numbering.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_



##########
amber/src/test/scala/org/apache/texera/web/resource/dashboard/file/WorkflowResourceSpec.scala:
##########
@@ -681,99 +634,104 @@ class WorkflowResourceSpec
     )
   }
 
-  "/search API" should "be able to search for resources in different tables" 
in {
+  "/search API" should "be able to search for resources by keyword" in {
 
-    // create different types of resources, project, workflow, and file
-    projectResource.createProject(sessionUser1, "test project1")
     workflowResource.persistWorkflow(testWorkflow1, sessionUser1)
     // search
     val DashboardClickableFileEntryList =
       dashboardResource.searchAllResourcesCall(
         sessionUser1,
         SearchQueryParams(getKeywordsArray("test"))
       )
-    assert(DashboardClickableFileEntryList.results.length == 2)
+    assert(DashboardClickableFileEntryList.results.length == 1)
 
   }
 
   it should "return all resources when no keyword provided" in {
-    projectResource.createProject(sessionUser1, "test project1")
     workflowResource.persistWorkflow(testWorkflow1, sessionUser1)
     val DashboardClickableFileEntryList =
       dashboardResource.searchAllResourcesCall(
         sessionUser1,
         SearchQueryParams(getKeywordsArray(""))
       )
-    assert(DashboardClickableFileEntryList.results.length == 2)
+    assert(DashboardClickableFileEntryList.results.length == 1)
   }
 
   it should "return multiple matching resources from a single resource type" 
in {
     workflowResource.persistWorkflow(testWorkflow1, sessionUser1)
-    projectResource.createProject(sessionUser1, "common project1")
-    projectResource.createProject(sessionUser1, "common project2")
+    workflowResource.persistWorkflow(testWorkflow2, sessionUser1)
     val DashboardClickableFileEntryList =
       dashboardResource.searchAllResourcesCall(
         sessionUser1,
-        SearchQueryParams(getKeywordsArray("common"))
+        SearchQueryParams(getKeywordsArray("test"))
       )
     assert(DashboardClickableFileEntryList.results.length == 2)
   }
 
   it should "handle multiple keywords correctly" in {
-    projectResource.createProject(sessionUser1, "test project1")
     workflowResource.persistWorkflow(testWorkflow1, sessionUser1)
+    workflowResource.persistWorkflow(testWorkflow2, sessionUser1)
     val DashboardClickableFileEntryList =
       dashboardResource.searchAllResourcesCall(
         sessionUser1,
-        SearchQueryParams(getKeywordsArray("test", "project1"))
+        SearchQueryParams(getKeywordsArray("test", "workflow1"))
       )
     assert(
       DashboardClickableFileEntryList.results.length == 1
-    ) // should only return the project
+    ) // should only return test_workflow1
   }
 
   it should "filter results by different resourceType" in {
-    // create different types of resources
-    // 3 projects, 2 file, and 1 workflow,
-    projectResource.createProject(sessionUser1, "test project1")
-    projectResource.createProject(sessionUser1, "test project2")
-    projectResource.createProject(sessionUser1, "test project3")
+    // create 3 workflows
     workflowResource.persistWorkflow(testWorkflow1, sessionUser1)
+    workflowResource.persistWorkflow(testWorkflow2, sessionUser1)
+    workflowResource.persistWorkflow(testWorkflow3, sessionUser1)
     // search resources with all resourceType
     var DashboardClickableFileEntryList =
       dashboardResource.searchAllResourcesCall(
         sessionUser1,
         SearchQueryParams(getKeywordsArray("test"))
       )
-    assert(DashboardClickableFileEntryList.results.length == 4)
+    assert(DashboardClickableFileEntryList.results.length == 3)
 
     // filter resources by workflow
     DashboardClickableFileEntryList = dashboardResource.searchAllResourcesCall(
       sessionUser1,
       SearchQueryParams(resourceType = "workflow", keywords = 
getKeywordsArray("test"))
     )
-    assert(DashboardClickableFileEntryList.results.length == 1)
+    assert(DashboardClickableFileEntryList.results.length == 3)
 
-    // filter resources by project
+    // filter resources by dataset
     DashboardClickableFileEntryList = dashboardResource.searchAllResourcesCall(
       sessionUser1,
-      SearchQueryParams(resourceType = "project", keywords = 
getKeywordsArray("test"))
+      SearchQueryParams(resourceType = "dataset", keywords = 
getKeywordsArray("test"))
     )
-    assert(DashboardClickableFileEntryList.results.length == 3)
+    assert(DashboardClickableFileEntryList.results.isEmpty)
+
+    // The counts above cannot distinguish a working filter from an ignored 
one, because every
+    // seeded row is a workflow and the only other searchable types are 
LakeFS-backed (a seeded

Review Comment:
   Applied — singular. Confirmed against `DashboardResource` that 
`searchAllResources` now dispatches exactly `workflow` and `dataset`, so "the 
only other searchable type" is accurate.
   
   Also corrected the two drifted arity claims in the description that your 
summary flagged: "4 of the 24 slots" -> 25, and "arity went 24 → 20" -> 25 → 
21. I re-derived those from the code rather than the delta — main's `apply()` 
has 25 params, this branch has 21, and the spec pins `have size 21`.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to