Flags currently has this unwieldy dropdown, which will only get worse over time as more applications and object types are added. It would be better to use a typeahead, like the one in global search:
Rough plan to implement this is:
- Implement a new datasource similar to PhabricatorSearchDocumentTypeDatasource.
- Use it in a way that's pretty much the same as PhabricatorSearchDocumentTypeDatasource.
You can't actually use that datasource because "indexable documents" and "flaggable objects" aren't the same set of objects, but your implementation should be pretty similar.