Multiple views and data flow
Besides the grid (table) view, FleekDash supports (or reserves) other views for posts.
Grid view (default on Posts list)
The main PostsListPage uses GridPostsWithConfig (or LazyGridPostsWithConfig), which is the table view described in this document. This is the default and most feature-complete view.
PostsViews and DataController
PostsViews is a component that can switch between views (e.g. grid, calendar, kanban) using a DataController and adapters (e.g. postsGridAdapter). It keeps the same data source, filters, and stats but renders differently (calendar by date, kanban by status, etc.).
If your installation uses PostsViews on a different route (e.g. /posts-multiview), you get list / grid / table in one place and optionally calendar/kanban where implemented. The grid in that context is the same table/grid as above; "list" might be a more compact row layout.
When to use which
Use the table (grid) view for sorting, filtering, inline editing, and bulk-like workflows (duplicate, delete). Use calendar or kanban when you prefer a date-based or status-based layout; not all actions may be available in every view.
Benefit: Choose the view that fits the task (spreadsheet-style vs timeline vs boards).
Caching, refresh, and data flow
Posts cache (usePostsCache)
The Posts list uses a client-side cache (e.g. usePostsCache) keyed by post type and status (and optionally filters). Fetched pages are stored with a TTL (e.g. 5 minutes) and a max entries (e.g. 20) so repeated visits or filter changes can be served from cache.
On delete: The post is removed from cache so the list updates without refetch. On update (inline or duplicate): The post is updated or added in cache. On explicit refresh: Cache can be invalidated and data refetched.
This reduces API calls and makes the list feel instant when switching status or returning to the page.
Refresh button
Refresh invalidates the relevant cache and refetches posts (and optionally stats and metadata). It shows loading/success/error and can offer retry. After approval or edits elsewhere, refresh keeps the list in sync.
Events
The page can listen for custom events (e.g. fleekdash:refresh-posts-grid) with a postType in the payload. If the type matches the current one, it triggers a refresh. So other parts of the app (e.g. AI-created post) can ask the grid to reload.
Inline updates and dashboard
When you change status, author, or date inline, the API is called and then onPostUpdated is run. The grid and cache update; optionally, a dashboard refresh event is fired so the dashboard KPIs and pending widget stay correct.
Benefit: Fast list and fewer redundant requests, with explicit refresh when you want the latest data.