anchor.diff:  serve_stack( _, #state{stack=undefined}=State) ->
       % no stack, nothing .. do
       State;
  +serve_stack(aborted, #state{stack={button,But,RT}}=State0) when But== <<"|<">>;But== <<"<">>;But== <<"<<">> ->
  +    % deferred button can be executed for backward button <<"<">> 
  +    serve_top(aborted,State0#state{tailLock=true,stack=undefined,replyToFun=RT});
  +serve_stack(aborted, #state{stack={button,_Button,RT}}=State0) ->
  +    % deferred button can be executed for forward buttons <<">">> <<">>">> <<">|">> <<">|...">>
  +    serve_bot(aborted,<<>>,State0#state{stack=undefined,replyToFun=RT});
  +
   serve_stack(completed, #state{nav=ind,bufBot=B,guiBot=B,stack={button,Button,RT}}=State0) when
         Button =:= <<">">>;
         Button =:= <<">>">>;
         Button =:= <<">|">>;
         Button =:= <<">|...">>;
         Button =:= <<"more">> ->
  -    ?NoDbLog(debug, [], "~p stack exec ~p when guiCol true", [completed,Button]),
       serve_bot(completed,<<>>,State0#state{stack=undefined,replyToFun=RT});
  -serve_stack( _SN, #state{nav=ind,bufBot=B,guiBot=B}=State) -> 
  -    % ?Info("serve_stack at end of buffer ~p (NOP)",[B]),
  -    % gui is current at the end of the buffer, no new interesting data, nothing .. do
  -    State;
  -serve_stack(completed, #state{stack={button,<<"<">>,RT}}=State0) ->
  -    % deferred button can be executed for backward button <<"<">> 
  -    ?NoDbLog(debug, [], "~p stack exec ~p", [completed,<<"<">>]),
  +% serve_stack( _SN, #state{nav=ind,bufBot=B,guiBot=B}=State) -> 
  +%     % ?Info("serve_stack at end of buffer ~p (NOP)",[B]),
  +%     % gui is current at the end of the buffer, no new interesting data, nothing to do
  +%     State;
  +serve_stack(completed, #state{stack={button,But,RT}}=State0) when But== <<"|<">>; But== <<"<">>; But== <<"<<">> ->
       serve_top(completed,State0#state{tailLock=true,stack=undefined,replyToFun=RT});
  -serve_stack(completed, #state{stack={button,<<"<<">>,RT}}=State0) ->
  -    % deferred button can be executed for backward button <<"<<">> 
  -    ?NoDbLog(debug, [], "~p stack exec ~p", [completed,<<"<<">>]),
  -    serve_top(completed,State0#state{tailLock=true,stack=undefined,replyToFun=RT});
  +serve_stack(completed, #state{guiCnt=0,stack={button,<<">">>,RT}}=State0) ->
  +    serve_top(completed,State0#state{stack=undefined,replyToFun=RT});
   serve_stack(completed, #state{stack={button,_Button,RT}}=State0) ->
       % deferred button can be executed for forward buttons <<">">> <<">>">> <<">|">> <<">|...">>
  -    ?NoDbLog(debug, [], "~p stack exec ~p", [completed,_Button]),
       serve_bot(completed,<<>>,State0#state{stack=undefined,replyToFun=RT});
  -serve_stack(aborted, #state{stack={button,<<"<">>,RT}}=State0) ->
  -    % deferred button can be executed for backward button <<"<">> 
  -    ?NoDbLog(debug, [], "~p stack exec ~p", [aborted,<<"<">>]),
  -    serve_top(aborted,State0#state{tailLock=true,stack=undefined,replyToFun=RT});
  -serve_stack(aborted, #state{stack={button,<<"<<">>,RT}}=State0) ->
  -    % deferred button can be executed for backward button <<"<<">> 
  -    ?NoDbLog(debug, [], "~p stack exec ~p", [aborted,<<"<<">>]),
  -    serve_top(aborted,State0#state{tailLock=true,stack=undefined,replyToFun=RT});
  -serve_stack(aborted, #state{stack={button,_Button,RT}}=State0) ->
  -    % deferred button can be executed for forward buttons <<">">> <<">>">> <<">|">> <<">|...">>
  -    ?NoDbLog(debug, [], "~p stack exec ~p", [aborted,_Button]),
  -    serve_bot(aborted,<<>>,State0#state{stack=undefined,replyToFun=RT});
  -serve_stack(SN, #state{stack={button,<<">">>,RT},bl=BL,bufBot=BufBot,guiBot=GuiBot}=State0) ->
  -    KeysBefore = keys_before(BufBot,BL-1,State0),
  -    IsMember = KeysBefore == [] orelse lists:member(GuiBot, keys_before(BufBot,BL-1,State0)),
  -    case IsMember of
  -        false ->    % deferred forward can be executed now
  -                    ?NoDbLog(debug, [], "~p stack exec ~p", [SN,<<">">>]),
  -                    gui_append(#gres{state=SN},State0#state{tailLock=true,stack=undefined,replyToFun=RT});
  -        true ->     State0#state{tailLock=true}  % buffer has not grown by 1 full block yet, keep the stack
  -    end;
  +
  +serve_stack(filling, #state{nav=raw,stack={button,<<">">>,_},gl=GL,bufBot=BufBot,guiCnt=0}=State) when BufBot<GL ->
  +    % delay serving received rows, trying to get a full block for first serve
  +    % ?Info("skipping raw serve at ~p",[BufBot]),
  +    State;
  +serve_stack(filling, #state{nav=ind,stack={button,<<">">>,_},gl=GL,bufBot=_BufBot,indCnt=IndCnt,guiCnt=0}=State) when IndCnt<GL ->
  +    % delay serving received rows, trying to get a full gui block of sorted data before first serve
  +    % ?Info("skipping ind serve at ~p (~p)",[_BufBot,IndCnt]),
  +    State;
  +serve_stack(filling, #state{guiCnt=0,stack={button,<<">">>,RT}}=State0) ->
  +    serve_top(filling,State0#state{stack=undefined,replyToFun=RT});
  +% serve_stack(SN, #state{stack={button,<<">">>,RT},bl=BL,bufBot=BufBot,guiBot=GuiBot}=State0) ->
  +%     KeysBefore = keys_before(BufBot,BL-1,State0),
  +%     IsMember = KeysBefore == [] orelse lists:member(GuiBot, keys_before(BufBot,BL-1,State0)),
  +%     case IsMember of
  +%         false ->    % deferred forward can be executed now
  +%                     ?NoDbLog(debug, [], "~p stack exec ~p", [SN,<<">">>]),
  +%                     ?Info("gui_append at ~p",[BufBot]),
  +%                     gui_append(#gres{state=SN},State0#state{tailLock=true,stack=undefined,replyToFun=RT});
  +%         true ->     ?Info("skip serve at ~p",[BufBot]),
  +%                     State0#state{tailLock=true}  % buffer has not grown by 1 full block yet, keep the stack
  +%     end;
   serve_stack(SN, #state{stack={button,<<"<">>,RT},bl=BL,bufTop=BufTop,guiTop=GuiTop}=State0) ->
       if
           (BufTop == GuiTop) -> State0#state{tailLock=true}; % No new data, keep the stack
  
positive.code:         %% driver session maps to imem_sec:fetch_recs_async(SKey, Opts, Pid, Sock)
          %% driver session maps to imem_meta:fetch_recs_async(Opts, Pid, Sock)
          ok -> 
              % ?Debug("fetch(~p, ~p) ok", [FetchMode, TailMode]),
              State0#state{pfc=State0#state.pfc+1};
          {_, Error} -> 
              ?Error("fetch(~p, ~p) -> ~p", [FetchMode, TailMode, Error]),
  
negative.code: serve_stack(SN, #state{stack={button,<<">>">>,RT},gl=GL,bufBot=BufBot,guiBot=GuiBot}=State0) ->
      case lists:member(GuiBot,keys_before(BufBot,GL-1,State0)) of
          false ->    % deferred forward can be executed now
                      serve_bot(SN,<<"">>,State0#state{tailLock=true,stack=undefined, replyToFun=RT});
          true ->     State0#state{tailLock=true}  % buffer has not grown by 1 max gui length yet, keep the stack
      end;
  serve_stack(SN, #state{bufCnt=BufCnt,stack={button,Target,RT}}=State0) when is_integer(Target), (BufCnt>=Target) ->
      % deferred target can be executed now
      serve_target(SN,Target,State0#state{tailLock=true,stack=undefined,replyToFun=RT});
  serve_stack(tailing, #state{stack={button,<<">|...">>,RT}}=State0) ->
      serve_stack(tailing, State0#state{stack={button,<<"tail">>,RT}});
  serve_stack(tailing, #state{stack={button,<<"...">>,RT}}=State0) ->
      serve_stack(tailing, State0#state{stack={button,<<"tail">>,RT}});
  serve_stack(tailing, #state{bufCnt=BufCnt,bufBot=BufBot,guiCnt=GuiCnt,guiBot=GuiBot,guiCol=GuiCol,stack={button,<<"tail">>,RT},tailLock=TailLock,replyToFun=ReplyTo}=State0) ->
      if
          TailLock -> 
              reply_stack(tailing, ReplyTo, State0);                  % tailing is cancelled
          (BufCnt == 0) -> State0;                                    % no data, nothing to do, keep stack
          (BufBot == GuiBot) andalso (GuiCol == false) -> State0;     % no new data, nothing to do, keep stack
          (GuiCnt == 0) ->                                            % (re)initialize to buffer bottom
              serve_bot(tailing,<<"tail">>,State0#state{stack=undefined,replyToFun=RT});
          true ->
              % serve new data at the bottom of the buffer, ask client to come back
              gui_append(#gres{state=tailing,loop= <<"tail">>,focus=-1},State0#state{stack=undefined,replyToFun=RT})
      end;
  serve_stack(autofilling, #state{bufCnt=BufCnt,bufBot=BufBot,guiCnt=GuiCnt,guiBot=GuiBot,guiCol=GuiCol, stack = {button, <<"more">>, ReplyTo}} = State) ->
  